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

#include <bdlar_enumref.h>

Public Member Functions

template<class t_ENUM >
 EnumConstRef (const t_ENUM &enumeration, typename bsl::enable_if< IsEnum< t_ENUM >::value >::type *=0)
 
 EnumConstRef (const void *objectAddress, const EnumConstVtable *vtable)
 
 EnumConstRef (const EnumRef &object)
 
const EnumConstVtablevtable () const
 
bool hasFallback () const
 
bool isFallback () const
 
const void * objectAddress () const
 
void toInt (int *result) const
 
void toString (bsl::string *result) const
 
const char * xsdName (int format) const
 

Constructor & Destructor Documentation

◆ EnumConstRef() [1/3]

template<class t_ENUM >
bdlar::EnumConstRef::EnumConstRef ( const t_ENUM &  enumeration,
typename bsl::enable_if< IsEnum< t_ENUM >::value >::type *  = 0 
)
inlineexplicit

Create an EnumConstRef object that type erases the supplied enumeration object.

◆ EnumConstRef() [2/3]

bdlar::EnumConstRef::EnumConstRef ( const void *  objectAddress,
const EnumConstVtable vtable 
)
inline

Create an EnumConstRef object.

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

◆ EnumConstRef() [3/3]

bdlar::EnumConstRef::EnumConstRef ( const EnumRef object)
inline

Create an EnumConstRef object that wraps the same object as the specified object.

Member Function Documentation

◆ hasFallback()

bool bdlar::EnumConstRef::hasFallback ( ) const
inline

Return true if the specified enumerator held by this object supports a fallback enumerator, and false otherwise.

◆ isFallback()

bool bdlar::EnumConstRef::isFallback ( ) const
inline

Return true if the specified enumerator held by this object is equal to a fallback enumerator, and false otherwise.

◆ objectAddress()

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

Return a pointer to the wrapped object.

◆ toInt()

void bdlar::EnumConstRef::toInt ( int *  result) const
inline

Load into the specified result the integer representation of the enumerator value held by this object.

◆ toString()

void bdlar::EnumConstRef::toString ( bsl::string result) const
inline

Load into the specified result the string representation of the enumerator value held by this object.

◆ vtable()

const EnumConstVtable * bdlar::EnumConstRef::vtable ( ) const
inline

Return a pointer to the vtable.

◆ xsdName()

const char * bdlar::EnumConstRef::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: