Quick Links:

bal | bbl | bdl | bsl

Namespaces

Component ball_userfieldtype
[Package ball]

Enumerate the set of data types for a user supplied attribute. More...

Namespaces

namespace  ball

Detailed Description

Outline
Purpose:
Enumerate the set of data types for a user supplied attribute.
Classes:
ball::UserFieldType namespace for an enum of user supplied attribute types
Description:
This component provides a namespace for the enum type, ball::UserFieldType, that enumerates the set of types a user defined log attribute may have.
Enumerators:
  Name                    Description
  ------------            -------------------------------------------------
  e_VOID                  Enumerator representing an unset value
  e_INT64                 Enumerator representing an integral value
  e_DOUBLE                Enumerator representing an double value
  e_STRING                Enumerator representing a string value
  e_DATETIMETZ            Enumerator representing a DatetimeTz value
  e_CHAR_ARRAY            Enumerator representing a bsl::vector<char> value
Usage:
This section illustrates intended use of this component.
Example 1: Basic Syntax:
The following snippets of code provide a simple illustration of ball::UserFieldType usage.
First, we create a variable value of type ball::UserFieldType::Enum and initialize it to the value ball::UserFieldType::e_STRING:
  ball::UserFieldType::Enum value = ball::UserFieldType::e_STRING;
Next, we store a pointer to its ASCII representation in a variable asciiValue of type const char *:
  const char *asciiValue = ball::UserFieldType::toAscii(value);
  assert(0 == bsl::strcmp(asciiValue, "STRING"));
Finally, we print the value to bsl::cout:
  bsl::cout << value << bsl::endl;
This statement produces the following output on stdout:
  STRING