[#BloombergLP-bdld-DatumIntMapRef] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdld.adoc[bdld]::DatumIntMapRef :relfileprefix: ../../ :mrdocs: This class provides a read‐only view to a map of datums (an array of `DatumIntMapEntry` objects). It holds the array by a `const` pointer and an integral size value. It acts as return value for accessors inside the `Datum` class that return a map of `Datum` objects. Note that zero‐size maps are valid. == Synopsis Declared in `<bdld_datum.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class DatumIntMapRef; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdld/DatumIntMapRef/SizeType.adoc[`SizeType`] | `SizeType` is an alias for an unsigned integral value, representing the capacity of a datum array, the capacity of a datum map, the capacity of the _keys‐capacity_ of a datum‐key‐owning map or the length of a string. | xref:BloombergLP/bdld/DatumIntMapRef/const_iterator.adoc[`const_iterator`] | Const iterator for this integer map reference. | xref:BloombergLP/bdld/DatumIntMapRef/const_pointer.adoc[`const_pointer`] | Const pointer to an element. | xref:BloombergLP/bdld/DatumIntMapRef/const_reference.adoc[`const_reference`] | Const reference to an element. | xref:BloombergLP/bdld/DatumIntMapRef/const_reverse_iterator.adoc[`const_reverse_iterator`] | Const reverse iterator for this integer map reference. | xref:BloombergLP/bdld/DatumIntMapRef/difference_type.adoc[`difference_type`] | Iterator difference type for this integer map reference. | xref:BloombergLP/bdld/DatumIntMapRef/element_type.adoc[`element_type`] | Element type for this integer map reference. | xref:BloombergLP/bdld/DatumIntMapRef/iterator.adoc[`iterator`] | Iterator for this array reference. | xref:BloombergLP/bdld/DatumIntMapRef/pointer.adoc[`pointer`] | Pointer to a map entry. | xref:BloombergLP/bdld/DatumIntMapRef/reference.adoc[`reference`] | Reference to an element. | xref:BloombergLP/bdld/DatumIntMapRef/reverse_iterator.adoc[`reverse_iterator`] | Reverse iterator for this integer map reference. | xref:BloombergLP/bdld/DatumIntMapRef/size_type.adoc[`size_type`] | Size type for this integer map reference. | xref:BloombergLP/bdld/DatumIntMapRef/value_type.adoc[`value_type`] | Value type for this integer map reference. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdld/DatumIntMapRef/2constructor.adoc[`DatumIntMapRef`] [.small]#[constructor]# | Create a `DatumIntMapRef` object having the specified `data` of the specified `size` and the specified `sorted` flag. The behavior is undefined unless `0 != data` or `0 == size`. Note that the pointer to the array is just copied. | xref:BloombergLP/bdld/DatumIntMapRef/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/DatumIntMapRef/begin.adoc[`begin`] | Return an iterator to the first map entry. | xref:BloombergLP/bdld/DatumIntMapRef/cbegin.adoc[`cbegin`] | Return an iterator providing non‐modifiable access to the first element of the array of map entries this reference object represents; return a past‐the‐end iterator if `size() == 0`. | xref:BloombergLP/bdld/DatumIntMapRef/cend.adoc[`cend`] | Return an iterator providing non‐modifiable access pointing past‐the‐end of the array this reference object represents. | xref:BloombergLP/bdld/DatumIntMapRef/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/DatumIntMapRef/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/DatumIntMapRef/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/DatumIntMapRef/empty.adoc[`empty`] | Return `size() == 0`. | xref:BloombergLP/bdld/DatumIntMapRef/end.adoc[`end`] | Return a past‐the‐end iterator for this map reference. | xref:BloombergLP/bdld/DatumIntMapRef/find.adoc[`find`] | Return a const pointer to the datum having the specified `key`, if it exists and 0 otherwise. Note that the `find` has order of `O(n)` if the data is not sorted based on the keys; if the data is sorted, it has order of `O(log(n))`. Also note that if multiple entries with matching keys are present, which matching record is found is unspecified. | xref:BloombergLP/bdld/DatumIntMapRef/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/DatumIntMapRef/isSorted.adoc[`isSorted`] | Return `true` if underlying map is sorted and `false` otherwise. | xref:BloombergLP/bdld/DatumIntMapRef/operator_subs.adoc[`operator[]`] | Return a reference providing non‐modifiable access to the element at the specified `position` in the array of map entries this reference object represents. The behavior is undefined unless `position < size()`. | xref:BloombergLP/bdld/DatumIntMapRef/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/DatumIntMapRef/rbegin.adoc[`rbegin`] | Return a reverse iterator to the last map entry. | xref:BloombergLP/bdld/DatumIntMapRef/rend.adoc[`rend`] | Return a past‐the‐end reverse iterator for this map reference. | xref:BloombergLP/bdld/DatumIntMapRef/size.adoc[`size`] | Return a const‐pointer to the number of elements of the array this reference object represents. | xref:BloombergLP/bdld/DatumIntMapRef/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<DatumIntMapRef, HasPrintMethod>`] | `DatumIntMapRef` is trivially copyable. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdld/operator_not_eq-04.adoc[`operator!=`] | Return `true` if the specified `lhs` and `rhs` have different values, and `false` otherwise. Two `DatumIntMapRef` objects have different values if they hold maps of different sizes or operator `==` returns `false` for at least one of the corresponding elements in the maps. | xref:BloombergLP/bdld/operator_eq-0c.adoc[`operator==`] | Return `true` if the specified `lhs` and `rhs` have the same value, and `false` otherwise. Two `DatumIntMapRef` objects have the same value if they hold maps of the same size and all the corresponding `DatumIntMapEntry` elements in the two maps also compare equal. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#