8#ifndef INCLUDED_BDLAT_ARRAYUTIL
9#define INCLUDED_BDLAT_ARRAYUTIL
184#include <bdlscm_version.h>
195#include <bsl_cstddef.h>
218 template <
class ACCESSOR>
219 class AccessByCategoryAdapter;
228 template <
class MANIPULATOR>
229 class ManipulateByCategoryAdapter;
243 template <
class TYPE,
class ACCESSOR>
258 template <
class TYPE,
class MANIPULATOR>
260 MANIPULATOR& manipulator,
270template <
class ACCESSOR>
271class ArrayUtil::AccessByCategoryAdapter {
276 ACCESSOR *d_accessor_p;
283 explicit AccessByCategoryAdapter(ACCESSOR *accessor);
290 template <
class VALUE_TYPE>
291 int operator()(
const VALUE_TYPE& value)
const;
300template <
class MANIPULATOR>
301class ArrayUtil::ManipulateByCategoryAdapter {
306 MANIPULATOR *d_manipulator_p;
313 explicit ManipulateByCategoryAdapter(MANIPULATOR *manipulator);
320 template <
class VALUE_TYPE>
321 int operator()(VALUE_TYPE *value)
const;
333template <
class TYPE,
class ACCESSOR>
339#if !defined(BSLS_PLATFORM_CMP_SUN)
348 const AccessByCategoryAdapter<ACCESSOR> adapter(&accessor);
352template <
class TYPE,
class MANIPULATOR>
355 MANIPULATOR& manipulator,
358#if !defined(BSLS_PLATFORM_CMP_SUN)
368 const ManipulateByCategoryAdapter<MANIPULATOR> adapter(&manipulator);
377template <
class ACCESSOR>
379ArrayUtil::AccessByCategoryAdapter<ACCESSOR>::AccessByCategoryAdapter(
381: d_accessor_p(accessor)
386template <
class ACCESSOR>
387template <
class VALUE_TYPE>
389int ArrayUtil::AccessByCategoryAdapter<ACCESSOR>::operator()(
390 const VALUE_TYPE& value)
const
400template <
class MANIPULATOR>
402ArrayUtil::ManipulateByCategoryAdapter<
403 MANIPULATOR>::ManipulateByCategoryAdapter(MANIPULATOR *manipulator)
404: d_manipulator_p(manipulator)
408template <
class MANIPULATOR>
409template <
class VALUE_TYPE>
411int ArrayUtil::ManipulateByCategoryAdapter<MANIPULATOR>::operator()(
412 VALUE_TYPE *value)
const
static int manipulateByCategory(TYPE *object, MANIPULATOR &manipulator)
Definition bdlat_typecategory.h:1404
static int accessByCategory(const TYPE &object, ACCESSOR &accessor)
Definition bdlat_typecategory.h:1444
#define BSLMF_ASSERT(expr)
Definition bslmf_assert.h:229
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
int manipulateElement(TYPE *array, MANIPULATOR &manipulator, int index)
bsl::size_t size(const TYPE &array)
Return the number of elements in the specified array.
int accessElement(const TYPE &array, ACCESSOR &accessor, int index)
bdlat_TypeCategory::Value select(const TYPE &object)
Definition bdlat_arrayutil.h:198
Definition bdlat_arrayutil.h:206
static int manipulateElementByCategory(TYPE *array, MANIPULATOR &manipulator, int index)
Definition bdlat_arrayutil.h:354
static int accessElementByCategory(const TYPE &array, ACCESSOR &accessor, int index)
Definition bdlat_arrayutil.h:335
Definition bdlat_arrayfunctions.h:718
@ e_ARRAY_CATEGORY
Definition bdlat_typecategory.h:1046