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"
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 
32 private:
34  unsigned long m_refCount;
36  unsigned char m_version;
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  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);
106 }
107 
108 
109 #endif // GAUDIKERNEL_DATAOBJECT_H
GAUDI_API void popCurrentDataObject()
The stream buffer is a small object collecting object data.
Definition: StreamBuffer.h:40
GAUDI_API DataObject * getCurrentDataObject()
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
LinkManager * m_pLinkMgr
Store of symbolic links.
Definition: DataObject.h:40
LinkManager * linkMgr() const
Retrieve Link manager.
Definition: DataObject.h:73
unsigned char m_version
Version number.
Definition: DataObject.h:36
virtual std::ostream & fillStream(std::ostream &s) const
Fill the output stream (ASCII)
Definition: DataObject.h:89
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
unsigned long refCount() const
Return the refcount.
Definition: DataObject.h:85
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
unsigned int CLID
Class ID definition.
Definition: ClassID.h:9
GAUDI_API void pushCurrentDataObject(DataObject **pobjAddr)
unsigned char version() const
Retrieve version number of this object representation.
Definition: DataObject.h:77
def update
Definition: install.py:213
string s
Definition: gaudirun.py:210
IRegistry * m_pRegistry
Pointer to the Registry Object.
Definition: DataObject.h:38
Opaque address interface definition.
This is a number of static methods for bootstrapping the Gaudi framework.
Definition: Bootstrap.h:14
#define GAUDI_API
Definition: Kernel.h:108
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
unsigned long m_refCount
Reference count.
Definition: DataObject.h:34
std::ostream & operator<<(std::ostream &str, const GaudiAlg::ID &id)
Operator overloading for ostream.
Definition: GaudiHistoID.h:136
void setVersion(unsigned char vsn)
Set version number of this object representation.
Definition: DataObject.h:81