This class implements a value‐semantic type for representing a sequence of (randomly accessible) user field values.

Synopsis

Declared in <ball_userfields.h>

class UserFields;

Type Aliases

Name

Description

ConstIterator

Constant iterator over the user field values in this object.

Member Functions

Name

Description

UserFields [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. Note that if no allocator was supplied at construction the currently installed default allocator is used.

append

Append the specified value to this object.

appendCharArray

Append the specified value to this object.

appendDatetimeTz

Append the specified datetime‐with‐timezone value to this object.

appendDouble

Append the specified floating‐point value to this object.

appendInt64

Append the specified 64‐bit integer value to this object.

appendNull

Append an element having the unset value to this object.

appendString

Append the specified string value to this object.

begin

Return an iterator providing non‐modifiable access to the first element in the sequence of user field values maintained by this object, or the end iterator if this object is empty.

end

Return an iterator providing non‐modifiable access to the past‐the‐end element in the sequence of user field values maintained by this object.

length

Return the number of user field values in this object.

operator[]

Subscript operators

print

Write the value of this object to the specified output stream in a human‐readable format, and return a reference to stream. Optionally specify an initial indentation level, whose absolute value is incremented recursively for nested objects. If level is specified, optionally specify spacesPerLevel, whose absolute value indicates the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by level). If stream is not valid on entry, this operation has no effect. Note that the format is not fully specified, and can change without notice.

removeAll

Remove all of the user field values from this object. After this method is called length is 0.

swap

Efficiently exchange the value of this object with the value of the specified other object. This method provides the no‐throw exception‐safety guarantee. The behavior is undefined unless this object was created with the same allocator as other.

value

Same as the preceding overload.

operator BloombergLP::bslmf::NestedTraitDeclaration<UserFields, UsesBslmaAllocator>

Declare that this type uses a bslma allocator.

Friends

Name

Description

BloombergLP::ball::swap

Swap the value of the specified a object with the value of the specified b object. If a and b were created with the same allocator, then this method provides the no‐throw exception‐safety guarantee; otherwise, it provides the basic guarantee.

BloombergLP::ball::operator==

Return true if the specified lhs and rhs objects have the same value, and false otherwise. Two ball::UserFields objects have the same value if they have the same number of elements, and each element in lhs has the same value as corresponding element at the same index in rhs.

Non-Member Functions

Name

Description

operator!=

Return true if the specified lhs and rhs objects do not have the same value, and false otherwise. Two UserFields objects do not have the same value if they have a different number of elements, or if any element in lhs has a different value from the corresponding element at the same index in rhs.

Created with MrDocs