[#BloombergLP-balxml-NamespaceRegistry] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::NamespaceRegistry :relfileprefix: ../../ :mrdocs: Mapping that associates a unique integer with each registered namespace URI. == Synopsis Declared in `<balxml_namespaceregistry.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class NamespaceRegistry; ---- == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balxml/NamespaceRegistry/_04enum.adoc[`Unnamed enum`] | Preregistered namespace identifiers. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balxml/NamespaceRegistry/2constructor-03.adoc[`NamespaceRegistry`] [.small]#[constructor]# | Constructors | xref:BloombergLP/balxml/NamespaceRegistry/2destructor.adoc[`~NamespaceRegistry`] [.small]#[destructor]# | Destroy this object. Release all memory to the allocator used at construction. | xref:BloombergLP/balxml/NamespaceRegistry/operator_assign.adoc[`operator=`] | Discard the contents of this registry and assign it the contents of the specified `rhs` registry. For a given URI, the results of calling `lookup` by URI will produce equal results for this object and for `rhs`. For a given integer ID, the result of calling `lookup` by ID will produce different pointers that compare equal using `strcmp`. | xref:BloombergLP/balxml/NamespaceRegistry/lookup-05.adoc[`lookup`] | `lookup` overloads | xref:BloombergLP/balxml/NamespaceRegistry/lookupOrRegister.adoc[`lookupOrRegister`] | Return the integer ID for the specified `namespaceUri`, assigning a new ID if the `namespaceUri` has not been registered before. Note that the IDs for pre‐registered namespaces (including the empty URI) are less than zero. (See "Preregistered Namespaces" in the 'balxml_namespaceregistry component‐level documentation.) | xref:BloombergLP/balxml/NamespaceRegistry/print.adoc[`print`] | Print the contents of this object to the specified `stream` in human‐readable form. | xref:BloombergLP/balxml/NamespaceRegistry/reset.adoc[`reset`] | Removes all registered namespaces. Preregistered namespaces are not removed. | xref:BloombergLP/balxml/NamespaceRegistry/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<NamespaceRegistry, UsesBslmaAllocator>`] | `NamespaceRegistry` uses a `bslma::Allocator` to supply memory. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/balxml/operator_eq-0ed.adoc[BloombergLP::balxml::operator==]` | Must be a friend for engineering reasons. Unlike most value‐semantic types, there is no efficient way to read the entire value of a namespace registry object. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balxml/operator_not_eq-006.adoc[`operator!=`] | Return true if the specified `lhs` registry does not have the same value as the specified `rhs` registry and false otherwise. The two registries do not have the same value if there exists a URI string, `u`, such that `lhs.lookup(u)` != `rhs.lookup(u)`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#