#include <bdlcc_objectcatalog.h>
List of all members.
Detailed Description
template<class TYPE>
class bdlcc::ObjectCatalog< TYPE >
This class defines an efficient indexed object catalog of TYPE
objects. This container is exception neutral with no guarantee of rollback: if an exception is thrown during the invocation of a method on a pre-existing instance, the object is left in a valid but undefined state. In no event is memory leaked or a mutex left in a locked state.
See Component bdlcc_objectcatalog
Constructor & Destructor Documentation
Create an empty object catalog, using the optionally specified allocator
to supply any memory.
Destroy this object catalog.
Member Function Documentation
Add the value of the specified object
to this catalog and return a non-zero integer handle that may be used to refer to the object in future calls to this catalog. The behavior is undefined if the catalog was full.
Add the value of the specified object
to this catalog and return a non-zero integer handle that may be used to refer to the object in future calls to this catalog, leaving object
in an unspecified but valid state. The behavior is undefined if the catalog was full.
Optionally load into the optionally specified valueBuffer
the value of the object having the specified handle
and remove it from this catalog. Return zero on success, and a non-zero value if the handle
is not contained in this catalog. Note that valueBuffer
is assigned into, and thus must point to a valid TYPE
instance.
Remove all objects that are currently held in this catalog and optionally load into the optionally specified buffer
the removed objects.
Replace the object having the specified handle
with the specified newObject
. Return 0 on success, and a non-zero value if the handle is not contained in this catalog.
Replace the object having the specified handle
with the specified newObject
, leaving newObject
in an unspecified but valid state. Return 0 on success, and a non-zero value if the handle is not contained in this catalog.
Return the allocator used by this object.
Locate the object having the specified handle
and optionally load its value into the optionally specified valueBuffer
. Return zero on success, and a non-zero value if the handle
is not contained in this catalog. Note that valueBuffer
is assigned into, and thus must point to a valid TYPE
instance. Note that the overload with valueBuffer
passed is not supported unless TYPE
has a copy constructor.
Return true
if the catalog contains an item that compares equal to the specified object
and false
otherwise.
Return a "snapshot" of the number of items currently contained in this catalog.
Return a const
reference to the object having the specified handle
. The behavior is undefined unless handle
is contained in this catalog.
Verify that this catalog is in a consistent state. This function is introduced for testing purposes only.
Friends And Related Function Documentation
The documentation for this class was generated from the following file: