| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

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

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DataObject.h
Go to the documentation of this file.
1 // $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiKernel/GaudiKernel/DataObject.h,v 1.10 2008/11/12 23:39:47 marcocle Exp $
2 #ifndef GAUDIKERNEL_DATAOBJECT_H
3 #define GAUDIKERNEL_DATAOBJECT_H
4
5 // Framework include files
6 #include "GaudiKernel/ClassID.h"
7 #include "GaudiKernel/StatusCode.h"
8
9 // STL includes
10 #include <string>
11 #include <ostream>
12
13 // Forward declarations
14 class IOpaqueAddress;
15 class StreamBuffer;
16 class LinkManager;
17 class IRegistry;
18
19
20 // Definition of the CLID for this class
21 static const CLID CLID_DataObject = 1;
22
31 class GAUDI_API DataObject {
32 private:
34 unsigned long m_refCount;
36 unsigned char m_version;
38 IRegistry* m_pRegistry;
40 LinkManager* m_pLinkMgr;
41
42 public:
44 DataObject();
46 DataObject(const DataObject&);
48 virtual ~DataObject();
50 virtual unsigned long addRef();
52 virtual unsigned long release();
54 virtual const CLID& clID() const;
56 static const CLID& classID();
58 const std::string& name() const;
59
61 virtual StatusCode update();
62
64
65 void setRegistry(IRegistry* pRegistry) {
66 m_pRegistry = pRegistry;
67 }
69 IRegistry* registry() const {
70 return m_pRegistry;
71 }
73 LinkManager* linkMgr() const {
74 return m_pLinkMgr;
75 }
77 unsigned char version() const {
78 return m_version;
79 }
81 void setVersion(unsigned char vsn) {
82 m_version = vsn;
83 }
85 unsigned long refCount() const {
86 return m_refCount;
87 }
89 virtual std::ostream& fillStream( std::ostream& s ) const {
90 s << "DataObject at " << std::hex << this;
91 return s;
92 }
94 friend std::ostream& operator<< ( std::ostream& s, const DataObject& obj ) {
95 return obj.fillStream(s);
96 }
97 };
98
99 // Additional functions to support the Serialization of objects in the transient store
100
101 namespace Gaudi
102 {
103 GAUDI_API void pushCurrentDataObject(DataObject** pobjAddr);
104 GAUDI_API void popCurrentDataObject();
105 GAUDI_API DataObject* getCurrentDataObject();
106 }
107
108
109 #endif // GAUDIKERNEL_DATAOBJECT_H