Type‐erased non‐const reference to an object in the bdlat array category.

Synopsis

Declared in <bdlar_arrayref.h>

class ArrayRef;

Member Functions

Name

Description

ArrayRef [constructor]

Constructors

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().

elementCategory

Return the element type category of the wrapped array.

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().

objectAddress

Return a pointer to the wrapped array.

reset

Reset the referred object to the default value.

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.

size

Return the number of elements in the wrapped array.

vtable

Return a pointer to the vtable.

Non-Member Functions

Name

Description

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.

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.

bdlat_arrayResize

Set the size of the specified array to the specified newSize.

bdlat_arraySize

Return the number of elements in the specified array.

bdlat_valueTypeReset

Reset the specified ref to its default‐constructed state.

Created with MrDocs