BloombergLP::bdlat_TypeName::xsdName

Return the XSD type name for the specified object and format.

Synopsis

Declared in <bdlat_typename.h>

template<class TYPE>
static
char const*
xsdName(
    TYPE const& object,
    int format);

Description

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.

Return Value

XSD type name for object and format

Parameters

NameDescription
objectobject whose type name is returned for XSD
formatformatting mode bit-flags from bdlat_formattingmode