This class provides a read‐only view to an array of datums. It holds the array by a const pointer and an integral length value. It acts as return value for accessors inside the Datum class that return an array of datums. Note that zero‐length arrays are valid.

Synopsis

Declared in <bdld_datum.h>

class DatumArrayRef;

Type Aliases

Name

Description

SizeType

SizeType is an alias for an unsigned integral value, representing the length of a datum array.

const_iterator

Const iterator for this array reference.

const_pointer

Const pointer to an element.

const_reference

Const reference to an element.

const_reverse_iterator

Const reverse iterator for this array reference.

difference_type

Iterator difference type for this array reference.

element_type

This typedef is an alias for element_type.

iterator

Iterator for this array reference.

pointer

Pointer to an element.

reference

Reference to an element.

reverse_iterator

Reverse iterator for this array reference.

size_type

Size type for this array reference.

value_type

Value type for this array reference.

Member Functions

Name

Description

DatumArrayRef [constructor]

Constructors

back

Return a reference providing non‐modifiable access to the last element of the array this reference object represents. The behavior is undefined unless size() > 0.

begin

Return an iterator providing non‐modifiable access to the first element of the array this reference object represents.

cbegin

Return an iterator providing non‐modifiable access to the first element of the array this reference object represents; return a past‐the‐end iterator if size() == 0.

cend

Return an iterator providing non‐modifiable access pointing past‐the‐end of the array this reference object represents.

crbegin

Return a reverse iterator providing non‐modifiable access to the last element of the array this reference object represents, and the past‐the‐end reverse iterator if size() == 0.

crend

Return a reverse iterator providing non‐modifiable access pointing past‐the‐end of the array this reference object represents.

data

Return the address providing non‐modifiable access to the first element of the array this reference object represents. Return a valid pointer which cannot be dereferenced if the size() == 0.

empty

Return size() == 0.

end

Return a past‐the‐end iterator for this array reference.

front

Return a reference providing non‐modifiable access to the first element of the array this reference object represents. The behavior is undefined unless size() > 0.

length

Return a const pointer to the length of the array.

operator[]

Return a reference providing non‐modifiable access to the element at the specified position in the array this reference object represents. The behavior is undefined unless position < size().

print

Write the value of this object to the specified output stream in a human‐readable format, and return a reference to the modifiable 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 this human‐readable format is not fully specified, and can change without notice.

rbegin

Return a reverse iterator to the last element of this array reference.

rend

Return a past‐the‐end reverse iterator for this array reference.

size

Return a const‐pointer to the number of elements of the array this reference object represents.

operator BloombergLP::bslmf::NestedTraitDeclaration<DatumArrayRef, HasPrintMethod>

DatumArrayRef is trivially copyable.

Non-Member Functions

Name

Description

operator!=

Return true if the specified lhs and rhs have different values, and false otherwise. Two DatumArrayRef objects have different values if they hold arrays of different lengths or invoking operator == returns false for at least one of the corresponding elements in the arrays.

operator==

Return true if the specified lhs and rhs have the same value, and false otherwise. Two DatumArrayRef objects have the same value if they hold arrays of the same length and all the corresponding Datum objects in the two arrays also compare equal.

Created with MrDocs