[#BloombergLP-bdlat_TypeName] = xref:BloombergLP.adoc[BloombergLP]::bdlat_TypeName :relfileprefix: ../ :mrdocs: Static template functions for returning a string representation for the name of a type. == Synopsis Declared in `<bdlat_typename.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct bdlat_TypeName; ---- == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlat_TypeName/className.adoc[`className`] | Return a null‐terminated string containing the exported name for the specified `TYPE`, or a 0 pointer if `TYPE` does not export a name. A type exports a name by overloading the function `bdlat_TypeName_className(const TYPE&)` in TYPE's namespace. The default implementation of `bdlat_TypeName_className` will automatically return the `CLASS_NAME` value for types that have the `bdlat_TypeTraitBasicChoice`, `bdlat_TypeTraitBasicSequence`, `bdlat_TypeTraitBasicCustomizedType`, or `bdlat_TypeTraitBasicEnumeration` trait (i.e., types generated using `bas_codegen.pl`). | xref:BloombergLP/bdlat_TypeName/name.adoc[`name`] | Return a null‐terminated string containing the name of the specified `TYPE`. If `TYPE` is a fundamental type, string, date, time, or datetime, then return a canonical representation of the type's name. Otherwise, if `className` applied to the specified `object` returns a non‐null value, then return that value. Otherwise, return `typeid(TYPE).name()`. Note that the returned name refers to the _static_ `TYPE`, not to the dynamic type of `object`. | xref:BloombergLP/bdlat_TypeName/xsdName.adoc[`xsdName`] | Return a null‐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. The `format` is interpreted as the bit‐wise OR of one or more of the values defined in the `bdlat_formattingmode` component. Formatting mode bits outside of `bdlat_FormattingMode::TYPE_MASK` are ignored. If the specified `object` corresponds to one of the XSD built‐in types, then return the XSD type's name. Otherwise, if `className(object)` returns a non‐null value, then return that value. Otherwise, return "anyType". The behavior is undefined unless the `format` is valid for the specified `TYPE`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#