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

#include <bdlar_anyref.h>

Detailed Description

A type-erased universal wrapper for reference to any type category with read/write access.

See bdlar_anyref

Public Member Functions

 AnyRef (void *objectAddress, const SimpleTypeVtable *vtable)
 
 AnyRef (void *objectAddress, const EnumVtable *vtable)
 
 AnyRef (void *objectAddress, const NullableValueVtable *vtable)
 
 AnyRef (void *objectAddress, const ArrayVtable *vtable)
 
 AnyRef (void *objectAddress, const SequenceVtable *vtable)
 
 AnyRef (void *objectAddress, const ChoiceVtable *vtable)
 
 AnyRef (void *objectAddress, const CustomizedTypeVtable *vtable)
 
 AnyRef (void *objectAddress, const DynamicTypeVtable *vtable)
 
 AnyRef (void *objectAddress, AnyVtable vtable, bdlat_TypeCategory::Value category)
 
 AnyRef (const AnyRefData &data)
 
void reset () const
 
const ArrayVtable * arrayVtable () const
 
const ChoiceVtable * choiceVtable () const
 
const CustomizedTypeVtable * customizedTypeVtable () const
 
const DynamicTypeVtable * dynamicTypeVtable () const
 
const EnumVtable * enumVtable () const
 
const NullableValueVtable * nullableValueVtable () const
 
const SequenceVtable * sequenceVtable () const
 
const SimpleTypeVtable * simpleTypeVtable () const
 
void * objectAddress () const
 
bdlat_TypeCategory::Value typeCategory () const
 

Constructor & Destructor Documentation

◆ AnyRef() [1/10]

bdlar::AnyRef::AnyRef ( void *  objectAddress,
const SimpleTypeVtable *  vtable 
)
inline

Create an AnyRef object.

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

◆ AnyRef() [2/10]

bdlar::AnyRef::AnyRef ( void *  objectAddress,
const EnumVtable *  vtable 
)
inline

Create an AnyRef object.

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

◆ AnyRef() [3/10]

bdlar::AnyRef::AnyRef ( void *  objectAddress,
const NullableValueVtable *  vtable 
)
inline

Create an AnyRef object.

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

◆ AnyRef() [4/10]

bdlar::AnyRef::AnyRef ( void *  objectAddress,
const ArrayVtable *  vtable 
)
inline

Create an AnyRef object.

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

◆ AnyRef() [5/10]

bdlar::AnyRef::AnyRef ( void *  objectAddress,
const SequenceVtable *  vtable 
)
inline

Create an AnyRef object.

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

◆ AnyRef() [6/10]

bdlar::AnyRef::AnyRef ( void *  objectAddress,
const ChoiceVtable *  vtable 
)
inline

Create an AnyRef object.

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

◆ AnyRef() [7/10]

bdlar::AnyRef::AnyRef ( void *  objectAddress,
const CustomizedTypeVtable *  vtable 
)
inline

Create an AnyRef object.

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

◆ AnyRef() [8/10]

bdlar::AnyRef::AnyRef ( void *  objectAddress,
const DynamicTypeVtable *  vtable 
)
inline

Create an AnyRef object.

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

◆ AnyRef() [9/10]

bdlar::AnyRef::AnyRef ( void *  objectAddress,
AnyVtable  vtable,
bdlat_TypeCategory::Value  category 
)
inline

Create an AnyRef object.

◆ AnyRef() [10/10]

bdlar::AnyRef::AnyRef ( const AnyRefData &  data)
inline

Create an AnyRef object.

Member Function Documentation

◆ arrayVtable()

const ArrayVtable * bdlar::AnyRef::arrayVtable ( ) const
inline

Return a pointer to the vtable.

Precondition
The behavior is undefined unless typeCategory() == bdlat_TypeCategory::e_ARRAY_CATEGORY.

◆ choiceVtable()

const ChoiceVtable * bdlar::AnyRef::choiceVtable ( ) const
inline

Return a pointer to the vtable.

Precondition
The behavior is undefined unless typeCategory() == bdlat_TypeCategory::e_CHOICE_CATEGORY.

◆ customizedTypeVtable()

const CustomizedTypeVtable * bdlar::AnyRef::customizedTypeVtable ( ) const
inline

Return a pointer to the vtable.

Precondition
The behavior is undefined unless typeCategory() == bdlat_TypeCategory::e_CUSTOMIZED_TYPE_CATEGORY.

◆ dynamicTypeVtable()

const DynamicTypeVtable * bdlar::AnyRef::dynamicTypeVtable ( ) const
inline

Return a pointer to the vtable.

Precondition
The behavior is undefined unless typeCategory() == bdlat_TypeCategory::e_DYNAMIC_CATEGORY.

◆ enumVtable()

const EnumVtable * bdlar::AnyRef::enumVtable ( ) const
inline

Return a pointer to the vtable.

Precondition
The behavior is undefined unless typeCategory() == bdlat_TypeCategory::e_ENUMERATION_CATEGORY.

◆ nullableValueVtable()

const NullableValueVtable * bdlar::AnyRef::nullableValueVtable ( ) const
inline

Return a pointer to the vtable.

Precondition
The behavior is undefined unless typeCategory() == bdlat_TypeCategory::e_NULLABLE_VALUE_CATEGORY.

◆ objectAddress()

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

Return a pointer to the wrapped object.

◆ reset()

void bdlar::AnyRef::reset ( ) const

Reset the referred object to the default value.

◆ sequenceVtable()

const SequenceVtable * bdlar::AnyRef::sequenceVtable ( ) const
inline

Return a pointer to the vtable.

Precondition
The behavior is undefined unless typeCategory() == bdlat_TypeCategory::e_SEQUENCE_CATEGORY.

◆ simpleTypeVtable()

const SimpleTypeVtable * bdlar::AnyRef::simpleTypeVtable ( ) const
inline

Return a pointer to the vtable.

Precondition
The behavior is undefined unless typeCategory() == bdlat_TypeCategory::e_SIMPLE_CATEGORY.

◆ typeCategory()

bdlat_TypeCategory::Value bdlar::AnyRef::typeCategory ( ) const
inline

Return type category of the referred object.


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