[#BloombergLP-bdlar-ArrayRef] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlar.adoc[bdlar]::ArrayRef :relfileprefix: ../../ :mrdocs: Type‐erased non‐const reference to an object in the `bdlat` array category. == Synopsis Declared in `<bdlar_arrayref.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class ArrayRef; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlar/ArrayRef/2constructor-0b.adoc[`ArrayRef`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlar/ArrayRef/accessElement.adoc[`accessElement`] | Invoke the specified `accessor` on the array element at the specified `index`. The supplied `accessor` must be a callable type that can be called as if it had the following signature: ` int accessor(const ELEMENT& refOrValue); ` Return the value from the invocation of `accessor`. The behavior is undefined unless `0 <= index < size()`. | xref:BloombergLP/bdlar/ArrayRef/elementCategory.adoc[`elementCategory`] | Return the element type category of the wrapped array. | xref:BloombergLP/bdlar/ArrayRef/manipulateElement.adoc[`manipulateElement`] | Invoke the specified `manipulator` on the array element at the specified `index`. The supplied `manipulator` must be a callable type that can be called as if it had the following signature: ` int manipulator(ELEMENT *refOrValue); ` Return the value from the invocation of `manipulator`. The behavior is undefined unless `0 <= index < size()`. | xref:BloombergLP/bdlar/ArrayRef/objectAddress.adoc[`objectAddress`] | Return a pointer to the wrapped array. | xref:BloombergLP/bdlar/ArrayRef/reset.adoc[`reset`] | Reset the referred object to the default value. | xref:BloombergLP/bdlar/ArrayRef/resize.adoc[`resize`] | Set the size to the specified `newSize`. If `newSize > size()`, then `newSize ‐ size()` elements with default values are appended to the array. If `newSize < size()`, then the `size() ‐ newSize` elements at the end of the array are destroyed. The behavior is undefined unless `0 <= newSize`. | xref:BloombergLP/bdlar/ArrayRef/size.adoc[`size`] | Return the number of elements in the wrapped array. | xref:BloombergLP/bdlar/ArrayRef/vtable.adoc[`vtable`] | Return a pointer to the vtable. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlar/bdlat_arrayAccessElement-08.adoc[`bdlat_arrayAccessElement`] | Invoke the specified `accessor` on the array element at the specified `index` of the specified `array`. Return the value from the invocation of `accessor`. | xref:BloombergLP/bdlar/bdlat_arrayManipulateElement.adoc[`bdlat_arrayManipulateElement`] | Invoke the specified `manipulator` on the address of the element at the specified `index` of the specified `array`. Return the value from the invocation of `manipulator`. | xref:BloombergLP/bdlar/bdlat_arrayResize.adoc[`bdlat_arrayResize`] | Set the size of the specified `array` to the specified `newSize`. | xref:BloombergLP/bdlar/bdlat_arraySize-0f.adoc[`bdlat_arraySize`] | Return the number of elements in the specified `array`. | xref:BloombergLP/bdlar/bdlat_valueTypeReset-044.adoc[`bdlat_valueTypeReset`] | Reset the specified `ref` to its default‐constructed state. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#