[#BloombergLP-bdlat_TypeName]
= xref:BloombergLP.adoc[BloombergLP]::bdlat&lowbar;TypeName
:relfileprefix: ../
:mrdocs:

Static template functions for returning a string representation for the name of a type&period;

== Synopsis

Declared in `&lt;bdlat&lowbar;typename&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct bdlat&lowbar;TypeName;
----

== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlat_TypeName/className.adoc[`className`] 
| Return a null&hyphen;terminated string containing the exported name for the specified `TYPE`, or a 0 pointer if `TYPE` does not export a name&period; A type exports a name by overloading the function `bdlat&lowbar;TypeName&lowbar;className(const TYPE&amp;)` in TYPE&apos;s namespace&period; The default implementation of `bdlat&lowbar;TypeName&lowbar;className` will automatically return the `CLASS&lowbar;NAME` value for types that have the `bdlat&lowbar;TypeTraitBasicChoice`, `bdlat&lowbar;TypeTraitBasicSequence`, `bdlat&lowbar;TypeTraitBasicCustomizedType`, or `bdlat&lowbar;TypeTraitBasicEnumeration` trait (i&period;e&period;, types generated using `bas&lowbar;codegen&period;pl`)&period;
| xref:BloombergLP/bdlat_TypeName/name.adoc[`name`] 
| Return a null&hyphen;terminated string containing the name of the specified `TYPE`&period; If `TYPE` is a fundamental type, string, date, time, or datetime, then return a canonical representation of the type&apos;s name&period; Otherwise, if `className` applied to the specified `object` returns a non&hyphen;null value, then return that value&period; Otherwise, return `typeid(TYPE)&period;name()`&period; Note that the returned name refers to the _static_ `TYPE`, not to the dynamic type of `object`&period;
| xref:BloombergLP/bdlat_TypeName/xsdName.adoc[`xsdName`] 
| Return a null&hyphen;terminated text string containing the name of the specified `TYPE` with the specified `format` as it would appear in an XML Schema (XSD) element declaration&period; The `format` is interpreted as the bit&hyphen;wise OR of one or more of the values defined in the `bdlat&lowbar;formattingmode` component&period; Formatting mode bits outside of `bdlat&lowbar;FormattingMode&colon;&colon;TYPE&lowbar;MASK` are ignored&period; If the specified `object` corresponds to one of the XSD built&hyphen;in types, then return the XSD type&apos;s name&period; Otherwise, if `className(object)` returns a non&hyphen;null value, then return that value&period; Otherwise, return &quot;anyType&quot;&period; The behavior is undefined unless the `format` is valid for the specified `TYPE`&period;
|===



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