|
Gaudi Framework, version v23r2 |
| Home | Generated: Thu Jun 28 2012 |
00001 // $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiKernel/GaudiKernel/DataObject.h,v 1.10 2008/11/12 23:39:47 marcocle 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 GAUDI_API 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 StatusCode update(); 00062 00064 00065 void setRegistry(IRegistry* pRegistry) { 00066 m_pRegistry = pRegistry; 00067 } 00069 IRegistry* registry() const { 00070 return m_pRegistry; 00071 } 00073 LinkManager* linkMgr() const { 00074 return m_pLinkMgr; 00075 } 00077 unsigned char version() const { 00078 return m_version; 00079 } 00081 void setVersion(unsigned char vsn) { 00082 m_version = vsn; 00083 } 00085 unsigned long refCount() const { 00086 return m_refCount; 00087 } 00089 virtual std::ostream& fillStream( std::ostream& s ) const { 00090 s << "DataObject at " << std::hex << this; 00091 return s; 00092 } 00094 friend std::ostream& operator<< ( std::ostream& s, const DataObject& obj ) { 00095 return obj.fillStream(s); 00096 } 00097 }; 00098 00099 // Additional functions to support the Serialization of objects in the transient store 00100 00101 namespace Gaudi 00102 { 00103 GAUDI_API void pushCurrentDataObject(DataObject** pobjAddr); 00104 GAUDI_API void popCurrentDataObject(); 00105 GAUDI_API DataObject* getCurrentDataObject(); 00106 } 00107 00108 00109 #endif // GAUDIKERNEL_DATAOBJECT_H