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

#include <bdlar_dynamictyperef.h>

Public Member Functions

template<class t_DYNAMIC >
 DynamicTypeRef (t_DYNAMIC &dynamic, typename bsl::enable_if< IsDynamic< t_DYNAMIC >::value >::type *=0)
 
 DynamicTypeRef (void *objectAddress, const DynamicTypeVtable *vtable)
 
void reset () const
 
AnyRefData valueRef () const
 
const DynamicTypeVtablevtable () const
 
void * objectAddress () const
 
bdlat_TypeCategory::Value typeCategory () const
 
AnyConstRefData valueConstRef () const
 

Constructor & Destructor Documentation

◆ DynamicTypeRef() [1/2]

template<class t_DYNAMIC >
bdlar::DynamicTypeRef::DynamicTypeRef ( t_DYNAMIC &  dynamic,
typename bsl::enable_if< IsDynamic< t_DYNAMIC >::value >::type *  = 0 
)
inlineexplicit

Create DynamicTypeRef object that type erases the supplied dynamic object.

◆ DynamicTypeRef() [2/2]

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

Create DynamicTypeRef object.

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

Member Function Documentation

◆ objectAddress()

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

Return a pointer to the wrapped object.

◆ reset()

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

Reset the referred object to the default value.

◆ typeCategory()

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

Return type category of the referred object.

◆ valueConstRef()

AnyConstRefData bdlar::DynamicTypeRef::valueConstRef ( ) const
inline

Return a reference to the (non-modifiable) value.

Precondition
The behavior is undefined if the referred object is null.

◆ valueRef()

AnyRefData bdlar::DynamicTypeRef::valueRef ( ) const
inline

Return a reference to the (modifiable) value.

Precondition
The behavior is undefined if the referred object is null.

◆ vtable()

const DynamicTypeVtable * bdlar::DynamicTypeRef::vtable ( ) const
inline

Return a pointer to the vtable.


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