[#BloombergLP-bdlcc-ObjectCatalog]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::ObjectCatalog
:relfileprefix: ../../
:mrdocs:

Thread&hyphen;safe indexed catalog of `TYPE` objects&period;

== Synopsis

Declared in `&lt;bdlcc&lowbar;objectcatalog&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
class ObjectCatalog;
----

== Description

This class defines an efficient indexed object catalog of `TYPE` objects&period; This container is _exception_ _neutral_ with no guarantee of rollback&colon; if an exception is thrown during the invocation of a method on a pre&hyphen;existing instance, the object is left in a valid but undefined state&period; In no event is memory leaked or a mutex left in a locked state&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlcc/ObjectCatalog/2constructor.adoc[`ObjectCatalog`]         [.small]#[constructor]#
| Create an empty object catalog, using the optionally specified `allocator` to supply any memory&period;
| xref:BloombergLP/bdlcc/ObjectCatalog/2destructor.adoc[`&#126;ObjectCatalog`] [.small]#[destructor]#
| Destroy this object catalog&period;
| xref:BloombergLP/bdlcc/ObjectCatalog/add-07.adoc[`add`] 
| `add` overloads
| xref:BloombergLP/bdlcc/ObjectCatalog/allocator.adoc[`allocator`] 
| Return the allocator used by this object&period;
| xref:BloombergLP/bdlcc/ObjectCatalog/find-06.adoc[`find`] 
| `find` overloads
| xref:BloombergLP/bdlcc/ObjectCatalog/isMember.adoc[`isMember`] 
| Return `true` if the catalog contains an item that compares equal to the specified `object` and `false` otherwise&period;
| xref:BloombergLP/bdlcc/ObjectCatalog/length.adoc[`length`] 
| Return a &quot;snapshot&quot; of the number of items currently contained in this catalog&period;
| xref:BloombergLP/bdlcc/ObjectCatalog/remove.adoc[`remove`] 
| Remove the object with the specified `handle` from this catalog&period;
| xref:BloombergLP/bdlcc/ObjectCatalog/removeAll-0b.adoc[`removeAll`] 
| `removeAll` overloads
| xref:BloombergLP/bdlcc/ObjectCatalog/replace-0c.adoc[`replace`] 
| `replace` overloads
| xref:BloombergLP/bdlcc/ObjectCatalog/value.adoc[`value`] 
| Return a `const` reference to the object having the specified `handle`&period; The behavior is undefined unless `handle` is contained in this catalog&period;
| xref:BloombergLP/bdlcc/ObjectCatalog/verifyState.adoc[`verifyState`] 
| Verify that this catalog is in a consistent state&period; This function is introduced for testing purposes only&period;
| xref:BloombergLP/bdlcc/ObjectCatalog/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;ObjectCatalog, UsesBslmaAllocator&gt;`] 
| Declare that this type uses a `bslma` allocator&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlcc/ObjectCatalogIter.adoc[BloombergLP::bdlcc::ObjectCatalogIter]`
| Thread&hyphen;safe iterator over an `ObjectCatalog` of `TYPE` objects&period;
| `xref:BloombergLP/bdlcc/ObjectCatalog_AutoCleanup.adoc[BloombergLP::bdlcc::ObjectCatalog&lowbar;AutoCleanup]`
| Proctor that cleans up a managed `ObjectCatalog` node on destruction&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
