#include <bdlat_arrayutil.h>
|
| template<class TYPE , class ACCESSOR > |
| static int | accessElementByCategory (const TYPE &array, ACCESSOR &accessor, int index) |
| |
| template<class TYPE , class MANIPULATOR > |
| static int | manipulateElementByCategory (TYPE *array, MANIPULATOR &manipulator, int index) |
| |
This struct provides a namespace for suite of function templates providing non-primitive operations on "array" types.
◆ accessElementByCategory()
template<class TYPE , class ACCESSOR >
| int bdlat::ArrayUtil::accessElementByCategory |
( |
const TYPE & |
array, |
|
|
ACCESSOR & |
accessor, |
|
|
int |
index |
|
) |
| |
|
inlinestatic |
Invoke the specified accessor on the non-modifiable element at the specified index of the specified array and on a prvalue of the category tag type for the dynamic category of the element. See {bdlat_typecategory |Category Tags and Enumerators} for documentation about category tags. Return the value from the invocation of accessor. The accessor must be an accessor functor. See {bdlat_typecategory |ACCESSOR Functors} for the requirements on accessor. The behavior is undefined unless 0 <= index < bdlat_ArrayFunctions::size(array).
◆ manipulateElementByCategory()
template<class TYPE , class MANIPULATOR >
| int bdlat::ArrayUtil::manipulateElementByCategory |
( |
TYPE * |
array, |
|
|
MANIPULATOR & |
manipulator, |
|
|
int |
index |
|
) |
| |
|
inlinestatic |
Invoke the specified manipulator on the address of the element at the specified index of the specified array and on a prvalue of the category tag type for the dynamic category of the element. See {bdlat_typecategory |Category Tags and Enumerators} for documentation about category tags. Return the value from the invocation of manipulator. The manipulator must be a manipulator functor. See {bdlat_typecategory |MANIPULATOR Functors} for the requirements on manipulator. The behavior is undefined unless 0 <= index < bdlat_ArrayFunctions::size(array).
The documentation for this struct was generated from the following file: