BloombergLP::bdld::Datum::dataTypeToAscii

Return the ASCII name corresponding to the specified type.

Synopsis

Declared in <bdld_datum.h>

static
char const*
dataTypeToAscii(DataType type);

Description

Return the non-modifiable string representation corresponding to the specified type, if it exists, and a unique (error) string otherwise. The string representation of type matches its corresponding enumerator name with the e_ prefix elided.

For example: ` bsl::cout << bdld::Datum::dataTypeToAscii(bdld::Datum::e_NIL); ` will print the following on standard output: NIL Note that specifying a type that does not match any of the enumerators will result in a string representation that is distinct from any of those corresponding to the enumerators, but is otherwise unspecified.

Return Value

the ASCII name corresponding to the specified type

Parameters

NameDescription
typedatum type enumerator to convert