[#BloombergLP-bsls-NameOf]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::NameOf
:relfileprefix: ../../
:mrdocs:

This `class` provides a means to display the type name of its template parameter `TYPE`&period; An instance of this `class` can be implicitly (or explicitly via the `name` accessor) cast to a `const char &ast;` which will point to a buffer containing the description of the type&period; Note that all instances of a given type will refer to the same character buffer containing the name&period;

== Synopsis

Declared in `&lt;bsls&lowbar;nameof&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
class NameOf
    : public xref:BloombergLP/bsls/NameOf_Base.adoc[NameOf&lowbar;Base]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bsls/NameOf_Base.adoc[NameOf&lowbar;Base]`
| This `class` provide non&hyphen;template implementation code for the `NameOf` template class&period;
|===

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsls/NameOf/2constructor.adoc[`NameOf`]         [.small]#[constructor]#
| Initialize the base class of this object to the name of `TYPE`&period;
| xref:BloombergLP/bsls/NameOf/name.adoc[`name`] 
| Return a pointer to the a string containing the name of `TYPE`, this serves as a convenient way to explicitly cast the return value to a `const char &ast;`&period;
| xref:BloombergLP/bsls/NameOf/2conversion.adoc[`operator char const*`] 
| Return a pointer to the a string containing the name of `TYPE`&period;
|===


== Protected Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsls/NameOf_Base/_04enum.adoc[`Unnamed enum`] 
| Compile&hyphen;time constants for trimming compiler&hyphen;specific type&hyphen;name prefixes&period;
|===


== Protected Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsls/NameOf_Base/initBuffer.adoc[`initBuffer`] 
| Initialize the specified `buffer` with the type name contained in the specified `functionName`, where `functionName` is the function name of the `NameOf` constructor&period; Return either a pointer to `buffer`, or if `buffer` couldn&apos;t be properly initialized, `functionName`&period;
|===



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