| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Search for |

- File List
- File Members

# DataObject.h

Go to the documentation of this file.

    00001 // $Header: /local/reps/Gaudi/GaudiKernel/GaudiKernel/DataObject.h,v 1.8 2005/01/19 18:31:15 mato Exp $
    00002 #ifndef GAUDIKERNEL_DATAOBJECT_H
    00003 #define GAUDIKERNEL_DATAOBJECT_H
    00004
    00005 // Framework include files
    00006 #include "GaudiKernel/ClassID.h"
    00007 #include "GaudiKernel/StatusCode.h"
    00008
    00009 // STL includes
    00010 #include <string>
    00011 #include <ostream>
    00012
    00013 // Forward declarations
    00014 class IOpaqueAddress;
    00015 class StreamBuffer;
    00016 class LinkManager;
    00017 class IRegistry;
    00018
    00019
    00020 // Definition of the CLID for this class
    00021 static const CLID CLID_DataObject = 1;
    00022
    00031 class DataObject   {
    00032 private:
    00034   unsigned long       m_refCount;
    00036   unsigned char       m_version;
    00038   IRegistry*          m_pRegistry;
    00040   LinkManager*        m_pLinkMgr;
    00041
    00042 public:
    00044   DataObject();
    00046   DataObject(const DataObject&);
    00048   virtual ~DataObject();
    00050   virtual unsigned long addRef();
    00052   virtual unsigned long release();
    00054   virtual const CLID& clID() const;
    00056   static const CLID& classID();
    00058   const std::string& name() const;
    00059
    00061   virtual StreamBuffer& serialize(StreamBuffer& s);
    00063   virtual StreamBuffer& serialize(StreamBuffer& s)  const;
    00064
    00066
    00067   void setRegistry(IRegistry* pRegistry)    {
    00068     m_pRegistry = pRegistry;
    00069   }
    00071   IRegistry* registry() const   {
    00072     return m_pRegistry;
    00073   }
    00075   LinkManager* linkMgr()    const   {
    00076     return m_pLinkMgr;
    00077   }
    00079   const unsigned char version()    const  {
    00080     return m_version;
    00081   }
    00083   void setVersion(unsigned char vsn)    {
    00084     m_version = vsn;
    00085   }
    00087   unsigned long refCount() const {
    00088     return m_refCount;
    00089   }
    00091   virtual std::ostream& fillStream( std::ostream& s ) const {
    00092     s << "DataObject at " << std::hex << this;
    00093     return s;
    00094   }
    00096   friend std::ostream& operator<< ( std::ostream& s, const DataObject& obj ) {
    00097     return obj.fillStream(s);
    00098   }
    00099 };
    00100 #endif // GAUDIKERNEL_DATAOBJECT_H