BDE 4.14.0 Production release
|
Provide a type for the value of a user supplied field.
This component provides a value-semantic class, ball::UserFieldValue
, that represents the value of a user supplied log field value. A user field value acts as a discriminated union, and may represent a value of any of types described in ball::UserFieldType
or an unset value (indicated by the type ball::UserFieldType::e_VOID
).
This section illustrates intended use of this component.
The following snippets of code illustrate how to create and use a ball::UserFieldValue
object. Note that ball::UserFieldValue
objects are typically used in a description of a sequence of user fields (see ball_userfields ).
First, we create a default ball::UserFieldValue
, valueA
, and observe that it is in the unset state, meaning that isUnset
is true and its type is ball::UserFieldValue::e_VOID
:
Next, we create a second ball::UserFieldValue
having the value 5, and then confirm its value and observe that it does not compare equal to the valueA
:
Finally, we call reset
of valueB
resetting it to the unset state, and observe that valueA
now compares equal to valueB
: