[#BloombergLP-bdld-DatumArrayRef] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdld.adoc[bdld]::DatumArrayRef :relfileprefix: ../../ :mrdocs: 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>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class DatumArrayRef; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdld/DatumArrayRef/SizeType.adoc[`SizeType`] | `SizeType` is an alias for an unsigned integral value, representing the length of a datum array. | xref:BloombergLP/bdld/DatumArrayRef/const_iterator.adoc[`const_iterator`] | Const iterator for this array reference. | xref:BloombergLP/bdld/DatumArrayRef/const_pointer.adoc[`const_pointer`] | Const pointer to an element. | xref:BloombergLP/bdld/DatumArrayRef/const_reference.adoc[`const_reference`] | Const reference to an element. | xref:BloombergLP/bdld/DatumArrayRef/const_reverse_iterator.adoc[`const_reverse_iterator`] | Const reverse iterator for this array reference. | xref:BloombergLP/bdld/DatumArrayRef/difference_type.adoc[`difference_type`] | Iterator difference type for this array reference. | xref:BloombergLP/bdld/DatumArrayRef/element_type.adoc[`element_type`] | This `typedef` is an alias for `element_type`. | xref:BloombergLP/bdld/DatumArrayRef/iterator.adoc[`iterator`] | Iterator for this array reference. | xref:BloombergLP/bdld/DatumArrayRef/pointer.adoc[`pointer`] | Pointer to an element. | xref:BloombergLP/bdld/DatumArrayRef/reference.adoc[`reference`] | Reference to an element. | xref:BloombergLP/bdld/DatumArrayRef/reverse_iterator.adoc[`reverse_iterator`] | Reverse iterator for this array reference. | xref:BloombergLP/bdld/DatumArrayRef/size_type.adoc[`size_type`] | Size type for this array reference. | xref:BloombergLP/bdld/DatumArrayRef/value_type.adoc[`value_type`] | Value type for this array reference. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdld/DatumArrayRef/2constructor-09.adoc[`DatumArrayRef`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdld/DatumArrayRef/back.adoc[`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`. | xref:BloombergLP/bdld/DatumArrayRef/begin.adoc[`begin`] | Return an iterator providing non‐modifiable access to the first element of the array this reference object represents. | xref:BloombergLP/bdld/DatumArrayRef/cbegin.adoc[`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`. | xref:BloombergLP/bdld/DatumArrayRef/cend.adoc[`cend`] | Return an iterator providing non‐modifiable access pointing past‐the‐end of the array this reference object represents. | xref:BloombergLP/bdld/DatumArrayRef/crbegin.adoc[`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`. | xref:BloombergLP/bdld/DatumArrayRef/crend.adoc[`crend`] | Return a reverse iterator providing non‐modifiable access pointing past‐the‐end of the array this reference object represents. | xref:BloombergLP/bdld/DatumArrayRef/data.adoc[`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`. | xref:BloombergLP/bdld/DatumArrayRef/empty.adoc[`empty`] | Return `size() == 0`. | xref:BloombergLP/bdld/DatumArrayRef/end.adoc[`end`] | Return a past‐the‐end iterator for this array reference. | xref:BloombergLP/bdld/DatumArrayRef/front.adoc[`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`. | xref:BloombergLP/bdld/DatumArrayRef/length.adoc[`length`] | Return a const pointer to the length of the array. | xref:BloombergLP/bdld/DatumArrayRef/operator_subs.adoc[`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()`. | xref:BloombergLP/bdld/DatumArrayRef/print.adoc[`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. | xref:BloombergLP/bdld/DatumArrayRef/rbegin.adoc[`rbegin`] | Return a reverse iterator to the last element of this array reference. | xref:BloombergLP/bdld/DatumArrayRef/rend.adoc[`rend`] | Return a past‐the‐end reverse iterator for this array reference. | xref:BloombergLP/bdld/DatumArrayRef/size.adoc[`size`] | Return a const‐pointer to the number of elements of the array this reference object represents. | xref:BloombergLP/bdld/DatumArrayRef/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<DatumArrayRef, HasPrintMethod>`] | `DatumArrayRef` is trivially copyable. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdld/operator_not_eq-0c.adoc[`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. | xref:BloombergLP/bdld/operator_eq-07.adoc[`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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#