[#BloombergLP-bdlcc-ObjectCatalog] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::ObjectCatalog :relfileprefix: ../../ :mrdocs: Thread‐safe indexed catalog of `TYPE` objects. == Synopsis Declared in `<bdlcc_objectcatalog.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> class ObjectCatalog; ---- == Description 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. == 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. | xref:BloombergLP/bdlcc/ObjectCatalog/2destructor.adoc[`~ObjectCatalog`] [.small]#[destructor]# | Destroy this object catalog. | xref:BloombergLP/bdlcc/ObjectCatalog/add-07.adoc[`add`] | `add` overloads | xref:BloombergLP/bdlcc/ObjectCatalog/allocator.adoc[`allocator`] | Return the allocator used by this object. | 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. | xref:BloombergLP/bdlcc/ObjectCatalog/length.adoc[`length`] | Return a "snapshot" of the number of items currently contained in this catalog. | xref:BloombergLP/bdlcc/ObjectCatalog/remove.adoc[`remove`] | Remove the object with the specified `handle` from this catalog. | 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`. The behavior is undefined unless `handle` is contained in this catalog. | xref:BloombergLP/bdlcc/ObjectCatalog/verifyState.adoc[`verifyState`] | Verify that this catalog is in a consistent state. This function is introduced for testing purposes only. | xref:BloombergLP/bdlcc/ObjectCatalog/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<ObjectCatalog, UsesBslmaAllocator>`] | Declare that this type uses a `bslma` allocator. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bdlcc/ObjectCatalogIter.adoc[BloombergLP::bdlcc::ObjectCatalogIter]` | Thread‐safe iterator over an `ObjectCatalog` of `TYPE` objects. | `xref:BloombergLP/bdlcc/ObjectCatalog_AutoCleanup.adoc[BloombergLP::bdlcc::ObjectCatalog_AutoCleanup]` | Proctor that cleans up a managed `ObjectCatalog` node on destruction. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#