[#BloombergLP-bdlc-IndexClerk]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::IndexClerk
:relfileprefix: ../../
:mrdocs:

Efficient, value&hyphen;semantic manager of reusable, non&hyphen;negative integer indices&period;

== Synopsis

Declared in `&lt;bdlc&lowbar;indexclerk&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class IndexClerk;
----

== Description

This class defines an efficient, value&hyphen;semantic manager type for reusable, non&hyphen;negative integer indices&period; The class invariants are that the all decommissioned indices must be non&hyphen;negative, less than the next new index, and unique&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlc/IndexClerk/2constructor-0a.adoc[`IndexClerk`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlc/IndexClerk/2destructor.adoc[`&#126;IndexClerk`] [.small]#[destructor]#
| Destroy this index clerk&period;
| xref:BloombergLP/bdlc/IndexClerk/operator_assign.adoc[`operator&equals;`] 
| Assign to this index clerk the value of the specified `rhs` index clerk, and return a reference to this modifiable index clerk&period;
| xref:BloombergLP/bdlc/IndexClerk/bdexStreamIn.adoc[`bdexStreamIn`] 
| Assign to this object the value read from the specified input stream&period;
| xref:BloombergLP/bdlc/IndexClerk/bdexStreamOut.adoc[`bdexStreamOut`] 
| Write the value of this object to the specified output stream&period;
| xref:BloombergLP/bdlc/IndexClerk/begin.adoc[`begin`] 
| Return an iterator to the first decommissioned index, or `end()`&period;
| xref:BloombergLP/bdlc/IndexClerk/end.adoc[`end`] 
| Return a `IndexClerkIter` referring to an invalid index, indicating the end of the sequence of decommissioned index&period;
| xref:BloombergLP/bdlc/IndexClerk/getIndex.adoc[`getIndex`] 
| Return the next available unused integer index&period; Existing decommissioned indices are reissued before new ones are created&period;
| xref:BloombergLP/bdlc/IndexClerk/isInUse.adoc[`isInUse`] 
| Return `true` if the specified `index` is currently in use&period;
| xref:BloombergLP/bdlc/IndexClerk/nextNewIndex.adoc[`nextNewIndex`] 
| Return the smallest index that has not yet been issued&period;
| xref:BloombergLP/bdlc/IndexClerk/numCommissionedIndices.adoc[`numCommissionedIndices`] 
| Return the number of indices currently in use&period;
| xref:BloombergLP/bdlc/IndexClerk/numDecommissionedIndices.adoc[`numDecommissionedIndices`] 
| Return the number of indices that are currently decommissioned&period;
| xref:BloombergLP/bdlc/IndexClerk/print.adoc[`print`] 
| Format this index clerk to the specified output stream&period;
| xref:BloombergLP/bdlc/IndexClerk/putIndex.adoc[`putIndex`] 
| Return the specified `index` to this index clerk for reuse&period;
| xref:BloombergLP/bdlc/IndexClerk/removeAll.adoc[`removeAll`] 
| Remove all indices from this index clerk&period;
| xref:BloombergLP/bdlc/IndexClerk/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;IndexClerk, UsesBslmaAllocator&gt;`] 
| Declare that this type uses a `bslma` allocator&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlc/IndexClerk/maxSupportedBdexVersion-09.adoc[`maxSupportedBdexVersion`] 
| `maxSupportedBdexVersion` overloads
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlc/operator_not_eq-014.adoc[BloombergLP::bdlc::operator!&equals;]`
| Return `true` if the specified `lhs` and `rhs` index clerks do not have the same value, and `false` otherwise&period;
| `xref:BloombergLP/bdlc/operator_eq-0e2.adoc[BloombergLP::bdlc::operator&equals;&equals;]`
| Return `true` if the specified `lhs` and `rhs` index clerks have the same value, and `false` otherwise&period;
|===


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