This class implements a value-semantic type for representing the value of a user field in a log record.
Declared in <ball_userfieldvalue.h>
class UserFieldValue;
A user field value acts as a discriminated union, and may represent a value of any of the types described in ball::UserFieldType or an unset value (indicated by type ball::UserFieldType::e_VOID).
| Name | Description |
|---|---|
UserFieldValue [constructor] | Constructors |
operator= | Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object. |
allocator | Return the allocator used by this object to supply memory. |
isUnset | Return true if this object has the unset value, and false otherwise. Note that if isUnset() returns true, then type() returns ball::UserFieldType::e_VOID. |
print | Format this object to the specified output stream. |
reset | Set this object to have the unset value. After this operation, type() == ball::UserFieldType::e_VOID. |
setCharArray | Set this object to have the specified value. After this operation, type() == ball::UserFieldType::e_CHAR_ARRAY. |
setDatetimeTz | Set this object to have the specified value. After this operation, type() == ball::UserFieldType::e_DATETIMETZ. |
setDouble | Set this object to have the specified value. After this operation, type() == ball::UserFieldType::e_DOUBLE. |
setInt64 | Set this object to have the specified value. After this operation, type() == ball::UserFieldType::e_INT64. |
setString | Set this object to have the specified value. After this operation, type() == ball::UserFieldType::e_STRING. |
swap | Efficiently exchange the value of this object with the value of the specified other object. |
theCharArray | Return a reference providing non-modifiable access to the bsl::vector<char> value of this object. |
theDatetimeTz | Return a reference providing non-modifiable access to the DatetimeTz value of this object. |
theDouble | Return a reference providing non-modifiable access to the double value of this object. The behavior is undefined unless type() == ball::UserFieldType::e_DOUBLE. |
theInt64 | Return a reference providing non-modifiable access to the 64-bit integer value of this object. |
theString | Return a reference providing non-modifiable access to the string value of this object. The behavior is undefined unless type() == ball::UserFieldType::e_STRING. |
type | Return the type of this user field value. The type ball::UserFieldValue::e_VOID represents the unset value. |
operator BloombergLP::bslmf::NestedTraitDeclaration<UserFieldValue, UsesBslmaAllocator> | Declare that this type uses a bslma allocator. |
| Name | Description |
|---|---|
BloombergLP::ball::swap | Swap the value of the specified a object with the value of the specified b object. |
BloombergLP::ball::operator== | Return true if the specified lhs and rhs objects have the same value, and false otherwise. |
| Name | Description |
|---|---|
operator!= | Return true if the specified lhs and rhs objects do not have the same value, and false otherwise. |