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

#include <bdlar_customizedtyperef.h>

Public Member Functions

template<class t_TYPE >
 CustomizedTypeRef (t_TYPE &object, typename bsl::enable_if< IsCustomized< t_TYPE >::value >::type *=0)
 
 CustomizedTypeRef (void *objectAddress, const CustomizedTypeVtable *vtable)
 
template<class t_BASE_TYPE >
int convertFromBaseType (const t_BASE_TYPE &value) const
 
template<class t_MANIPULATOR >
int createBaseAndConvert (t_MANIPULATOR &baseManipulator) const
 
void reset () const
 
bdlat_TypeCategory::Value baseCategory () const
 
AnyConstRefData convertToBaseType () const
 
const CustomizedTypeVtablevtable () const
 
void * objectAddress () const
 
void * tmpAnyBuffer () const
 

Constructor & Destructor Documentation

◆ CustomizedTypeRef() [1/2]

template<class t_TYPE >
bdlar::CustomizedTypeRef::CustomizedTypeRef ( t_TYPE &  object,
typename bsl::enable_if< IsCustomized< t_TYPE >::value >::type *  = 0 
)
inlineexplicit

Create CustomizedTypeRef object that type erases the supplied "customized type" object.

◆ CustomizedTypeRef() [2/2]

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

Create CustomizedTypeRef object.

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

Member Function Documentation

◆ baseCategory()

bdlat_TypeCategory::Value bdlar::CustomizedTypeRef::baseCategory ( ) const
inline

Return a type category of the base type.

◆ convertFromBaseType()

template<class t_BASE_TYPE >
int bdlar::CustomizedTypeRef::convertFromBaseType ( const t_BASE_TYPE &  value) const

Assign a value converted from the specified base value. Return 0 if successful and non-zero otherwise.

◆ convertToBaseType()

AnyConstRefData bdlar::CustomizedTypeRef::convertToBaseType ( ) const
inline

Return a reference to the base value.

◆ createBaseAndConvert()

template<class t_MANIPULATOR >
int bdlar::CustomizedTypeRef::createBaseAndConvert ( t_MANIPULATOR &  baseManipulator) const
inline

Create an uninitialized value of the base type, apply the specified baseManipulator to it, then call the bdlat_CustomizedTypeFunctions::convertFromBaseType function with this object and the value.

◆ objectAddress()

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

Return a pointer to the wrapped object.

◆ reset()

void bdlar::CustomizedTypeRef::reset ( ) const
inline

Reset the referred object to the default value.

◆ tmpAnyBuffer()

void * bdlar::CustomizedTypeRef::tmpAnyBuffer ( ) const
inline

Return a pointer to buffer large enough to store one AnyConstRef object.

◆ vtable()

const CustomizedTypeVtable * bdlar::CustomizedTypeRef::vtable ( ) const
inline

Return a pointer to the vtable.


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