#include <ObjectReg.h>
Collaboration diagram for ObjectReg:
Public Member Functions | |
ObjectReg (IRegistry *registry, DataObject *object, bool store) | |
Standard constructor. | |
ObjectReg (const ObjectReg &rhs) | |
Copy constructor. | |
ObjectReg () | |
Default Constructor. | |
virtual | ~ObjectReg () |
Destructor. | |
virtual std::ostream & | fillStream (std::ostream &s) const |
Fill the ASCII output stream. | |
const std::string & | path () const |
The path at which this associated object was registered. | |
const IRegistry * | registry () const |
Retrieve the registry. | |
const DataObject * | object () const |
Retrieve const The object registered in the TES/AES system. | |
DataObject * | object () |
Retrieve nonconst. | |
bool | store () const |
Retrieve const True if the object should be stored. | |
void | setStore (bool value) |
Update True if the object should be stored. | |
int | entry () const |
The I/O stream entry number. | |
void | setEntry (int entry) |
ObjectReg & | operator= (const ObjectReg &rhs) |
Static Public Member Functions | |
static void * | operator new (size_t size) |
operator new | |
static void * | operator new (size_t size, void *pObj) |
placement operator new it is needed by libstdc++ 3.2.3 (e.g. | |
static void | operator delete (void *p) |
operator delete | |
static void | operator delete (void *p, void *pObj) |
placement operator delete not sure if really needed, but it does not harm | |
Private Member Functions | |
void | setRegistry (IRegistry *registry) |
Sets Object pointer. | |
void | setObject (DataObject *value) |
Sets Object pointer. | |
Private Attributes | |
IRegistry * | m_registry |
The IRegistry instance in the AES into which the object was registered. | |
DataObject * | m_object |
The object registered in the TES/AES system. | |
bool | m_store |
True if the object should be stored. | |
int | m_entry |
Output stream entry number. |
Definition at line 20 of file ObjectReg.h.
ObjectReg::ObjectReg | ( | IRegistry * | registry, | |
DataObject * | object, | |||
bool | store | |||
) |
Standard constructor.
Definition at line 22 of file ObjectReg.cc.
00024 : 00025 m_registry(0), 00026 m_object(0), 00027 m_store(store) 00028 { 00029 setRegistry(registry); 00030 setObject(object); 00031 }
ObjectReg::ObjectReg | ( | const ObjectReg & | rhs | ) |
Copy constructor.
Definition at line 33 of file ObjectReg.cc.
00033 : 00034 m_registry(0), 00035 m_object(0), 00036 m_store(rhs.m_store) 00037 { 00038 setRegistry(rhs.m_registry); 00039 setObject(rhs.m_object); 00040 }
ObjectReg::ObjectReg | ( | ) | [inline] |
Default Constructor.
Definition at line 33 of file ObjectReg.h.
00033 : m_registry(0), 00034 m_object(0), 00035 m_store(false) {}
ObjectReg::~ObjectReg | ( | ) | [virtual] |
Destructor.
Definition at line 42 of file ObjectReg.cc.
00043 { 00044 if (m_registry) { 00045 m_registry->release(); 00046 } 00047 if (0 != m_object) { 00048 m_object->release(); 00049 } 00050 }
std::ostream & ObjectReg::fillStream | ( | std::ostream & | s | ) | const [inline, virtual] |
Fill the ASCII output stream.
Definition at line 130 of file ObjectReg.h.
00131 { 00132 char l_store = (m_store) ? 'T' : 'F'; 00133 s << "{ " << "registry : " << m_registry << std::endl 00134 << "object : " << m_object << std::endl 00135 << "store : " << l_store << std::endl << " }"; 00136 return s; 00137 }
const std::string & ObjectReg::path | ( | ) | const |
The path at which this associated object was registered.
Definition at line 52 of file ObjectReg.cc.
00053 { 00054 return m_registry->identifier(); 00055 }
const IRegistry * ObjectReg::registry | ( | ) | const |
Retrieve the registry.
Definition at line 57 of file ObjectReg.cc.
00058 { 00059 return m_registry; 00060 }
const DataObject * ObjectReg::object | ( | ) | const |
Retrieve const The object registered in the TES/AES system.
Definition at line 3 of file ObjectReg.cc.
00004 { 00005 return m_object; 00006 }
DataObject * ObjectReg::object | ( | ) |
bool ObjectReg::store | ( | ) | const |
Retrieve const True if the object should be stored.
Definition at line 12 of file ObjectReg.cc.
00013 { 00014 return m_store; 00015 }
void ObjectReg::setStore | ( | bool | value | ) |
Update True if the object should be stored.
Definition at line 17 of file ObjectReg.cc.
00018 { 00019 m_store = value; 00020 }
int ObjectReg::entry | ( | ) | const |
The I/O stream entry number.
This is meant to be used by the framework.
Definition at line 94 of file ObjectReg.cc.
00095 { 00096 return m_entry; 00097 }
void ObjectReg::setEntry | ( | int | entry | ) |
Definition at line 103 of file ObjectReg.cc.
00103 { 00104 if (this != &rhs) { 00105 setRegistry(rhs.m_registry); 00106 setObject(rhs.m_object); 00107 m_store=rhs.m_store; 00108 } 00109 return *this; 00110 }
static void* ObjectReg::operator new | ( | size_t | size | ) | [inline, static] |
operator new
Definition at line 73 of file ObjectReg.h.
00074 { 00075 return ( sizeof(ObjectReg) == size ? 00076 boost::singleton_pool<ObjectReg, sizeof(ObjectReg)>::malloc() : 00077 ::operator new(size) ); 00078 }
static void* ObjectReg::operator new | ( | size_t | size, | |
void * | pObj | |||
) | [inline, static] |
placement operator new it is needed by libstdc++ 3.2.3 (e.g.
in std::vector) it is not needed in libstdc++ >= 3.4
Definition at line 83 of file ObjectReg.h.
static void ObjectReg::operator delete | ( | void * | p | ) | [inline, static] |
static void ObjectReg::operator delete | ( | void * | p, | |
void * | pObj | |||
) | [inline, static] |
placement operator delete not sure if really needed, but it does not harm
Definition at line 98 of file ObjectReg.h.
00099 { 00100 ::operator delete (p, pObj); 00101 }
void ObjectReg::setRegistry | ( | IRegistry * | registry | ) | [private] |
Sets Object pointer.
Definition at line 78 of file ObjectReg.cc.
00079 { 00080 if (registry == m_registry) { 00081 return; 00082 } 00083 00084 if (0 != registry) { 00085 registry->addRef(); 00086 } 00087 00088 if (0 != m_registry) { 00089 m_registry->release(); 00090 } 00091 m_registry = registry; 00092 }
void ObjectReg::setObject | ( | DataObject * | value | ) | [private] |
IRegistry* ObjectReg::m_registry [private] |
The IRegistry instance in the AES into which the object was registered.
Definition at line 112 of file ObjectReg.h.
DataObject* ObjectReg::m_object [private] |
bool ObjectReg::m_store [private] |
int ObjectReg::m_entry [mutable, private] |