Loading [MathJax]/extensions/tex2jax.js
Go to the documentation of this file.
55 bool m_hasKey =
false;
78 bool hasKey()
const {
return m_hasKey; }
79 long index()
const override {
return traits::identifier( m_key ); }
102 setParent(
nullptr );
116 long cnt = --m_refCount;
117 if ( cnt <= 0 )
delete this;
146 m_key = traits::makeKey( k );
unsigned long addRef()
Add reference to object (Increase reference counter).
long index() const override
Distance in the parent container.
void setKey(const key_type &key)
Set object key.
StreamBuffer & serialize(StreamBuffer &s) const override
Serialize the object for writing.
KeyedObject()=default
Standard Constructor. The object key is preset to the invalid value.
virtual long remove(ContainedObject *value)=0
Release object from the container (the pointer will be removed from the container,...
KeyedObject(const key_type &kval)
Standard Constructor accepting the object's key.
Containers::key_traits< key_type > traits
definition of the container key traits to be made friend
Definition of the templated KeyedObject class.
bool hasKey() const
Check if the object has a key assigned or not.
KEY key_type
Definition of the key-type to access object.
KeyedObject(const KeyedObject ©)
NOBODY may copy these objects.
StreamBuffer & serialize(StreamBuffer &s) override
Serialize the object for reading.
const key_type & key() const
Retrieve Key of the object.
GAUDI_API void cannotAssignObjectKey()
Function to be called when an object key cannot be assigned.
~KeyedObject() override
Standard destructor.
unsigned long release()
Release reference. If the reference count is ZERO, delete the object.
virtual StreamBuffer & serialize(StreamBuffer &s) const
Serialize the object for writing.