1 #ifndef GAUDIKERNEL_KEYEDOBJECT_H 2 #define GAUDIKERNEL_KEYEDOBJECT_H 51 bool m_hasKey =
false;
74 bool hasKey()
const {
return m_hasKey; }
112 long cnt = --m_refCount;
113 if ( cnt <= 0 )
delete this;
146 #endif // GAUDIKERNEL_KEYEDOBJECT_H virtual StreamBuffer & serialize(StreamBuffer &s) const
Serialize the object for writing.
static long addRef(obj_type *v)
Add reference counter to object when inserted into the container.
Definition of the templated KeyedObject class.
The stream buffer is a small object collecting object data.
KEY key_type
Definition of the key-type to access object.
KeyedObject(const KeyedObject ©)
NOBODY may copy these objects.
static key_type makeKey(long k)
Create key from its full integer representation.
KeyedObject(const key_type &kval)
Standard Constructor accepting the object's key.
long index() const override
Distance in the parent container.
void setKey(const key_type &key)
Set object key.
Containers::key_traits< key_type > traits
definition of the container key traits to be made friend
StreamBuffer & serialize(StreamBuffer &s) const override
Serialize the object for writing.
bool hasKey() const
Check if the object has a key assigned or not.
unsigned long addRef()
Add reference to object (Increase reference counter).
unsigned long release()
Release reference. If the reference count is ZERO, delete the object.
static long identifier(const key_type &k)
Full unhashed key identifier.
All classes that their objects may be contained in an LHCb ObjectContainer (e.g.
GAUDI_API void cannotAssignObjectKey()
Function to be called when an object key cannot be assigned.
virtual long remove(ContainedObject *value)=0
Release object from the container (the pointer will be removed from the container,...
static long release(obj_type *v)
Release reference to object.
~KeyedObject() override
Standard destructor.
ObjectContainerBase is the base class for Gaudi container classes.
const key_type & key() const
Retrieve Key of the object.
static void setKey(obj_type *v, const key_type &k)
Set object key when inserted into the container.