BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bdlar::ArrayConstRef Class Reference

#include <bdlar_arrayref.h>

Public Member Functions

template<class t_ARRAY >
 ArrayConstRef (const t_ARRAY &array, typename bsl::enable_if< IsArray< t_ARRAY >::value >::type *=0)
 
 ArrayConstRef (const void *objectAddress, const ArrayConstVtable *vtable)
 
 ArrayConstRef (const ArrayRef &object)
 
template<class t_ACCESSOR >
int accessElement (t_ACCESSOR &accessor, int index) const
 
bdlat_TypeCategory::Value elementCategory () const
 
const ArrayConstVtablevtable () const
 
const void * objectAddress () const
 
bsl::size_t size () const
 
const char * xsdName (int format) const
 

Constructor & Destructor Documentation

◆ ArrayConstRef() [1/3]

template<class t_ARRAY >
bdlar::ArrayConstRef::ArrayConstRef ( const t_ARRAY &  array,
typename bsl::enable_if< IsArray< t_ARRAY >::value >::type *  = 0 
)
inlineexplicit

Create ArrayConstRef object that type erases the supplied array object.

◆ ArrayConstRef() [2/3]

bdlar::ArrayConstRef::ArrayConstRef ( const void *  objectAddress,
const ArrayConstVtable vtable 
)
inline

Create ArrayConstRef object.

Precondition
The behaviour is undefined unless objectAddress and vtable point to the valid objects.

◆ ArrayConstRef() [3/3]

bdlar::ArrayConstRef::ArrayConstRef ( const ArrayRef object)
inline

Create ArrayConstRef object that wraps the same object as the specified object.

Member Function Documentation

◆ accessElement()

template<class t_ACCESSOR >
int bdlar::ArrayConstRef::accessElement ( t_ACCESSOR &  accessor,
int  index 
) const
inline

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& ref);

Return the value from the invocation of accessor.

Precondition
The behavior is undefined unless 0 <= index < size().

◆ elementCategory()

bdlat_TypeCategory::Value bdlar::ArrayConstRef::elementCategory ( ) const
inline

Return the element type category of the wrapped array.

◆ objectAddress()

const void * bdlar::ArrayConstRef::objectAddress ( ) const
inline

Return a pointer to the wrapped array.

◆ size()

bsl::size_t bdlar::ArrayConstRef::size ( ) const
inline

Return the number of elements in the wrapped array.

◆ vtable()

const ArrayConstVtable * bdlar::ArrayConstRef::vtable ( ) const
inline

Return a pointer to the vtable.

◆ xsdName()

const char * bdlar::ArrayConstRef::xsdName ( int  format) const
inline

Return the bdlat_TypeName::xsdName value for the underlying object.


The documentation for this class was generated from the following file: