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

#include <bdlar_nullablevalueref.h>

Public Types

typedef bdlat_TypeCategory::NullableValue CategoryTag
 

Public Member Functions

template<class t_NULLABLE >
 NullableValueConstRef (const t_NULLABLE &nullable, typename bsl::enable_if< IsNullable< t_NULLABLE >::value >::type *=0)
 
 NullableValueConstRef (const void *objectAddress, const NullableValueConstVtable *vtable)
 
 NullableValueConstRef (const NullableValueRef &object)
 
template<class t_ACCESSOR >
int accessValue (t_ACCESSOR &accessor) const
 
const NullableValueConstVtablevtable () const
 
bool isNull () const
 
const void * objectAddress () const
 
bdlat_TypeCategory::Value valueCategory () const
 
const char * xsdName (int format) const
 

Member Typedef Documentation

◆ CategoryTag

Constructor & Destructor Documentation

◆ NullableValueConstRef() [1/3]

template<class t_NULLABLE >
bdlar::NullableValueConstRef::NullableValueConstRef ( const t_NULLABLE &  nullable,
typename bsl::enable_if< IsNullable< t_NULLABLE >::value >::type *  = 0 
)
inlineexplicit

Create NullableValueConstRef object that type erases the supplied nullable object.

◆ NullableValueConstRef() [2/3]

bdlar::NullableValueConstRef::NullableValueConstRef ( const void *  objectAddress,
const NullableValueConstVtable vtable 
)
inline

Create NullableValueConstRef object.

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

◆ NullableValueConstRef() [3/3]

bdlar::NullableValueConstRef::NullableValueConstRef ( const NullableValueRef object)
inline

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

Member Function Documentation

◆ accessValue()

template<class t_ACCESSOR >
int bdlar::NullableValueConstRef::accessValue ( t_ACCESSOR &  accessor) const
inline

Invoke the specified accessor on the referred non-null value. The supplied accessor must be a callable type that can be called as if it had the following signature:

int accessor(const VALUE& refOrValue);

Return the value from the invocation of accessor.

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

◆ isNull()

bool bdlar::NullableValueConstRef::isNull ( ) const
inline

Return true if the referred object contains a null value, and false otherwise.

◆ objectAddress()

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

Return a pointer to the wrapped object.

◆ valueCategory()

bdlat_TypeCategory::Value bdlar::NullableValueConstRef::valueCategory ( ) const
inline

Return the value type category.

◆ vtable()

const NullableValueConstVtable * bdlar::NullableValueConstRef::vtable ( ) const
inline

Return a pointer to the vtable.

◆ xsdName()

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