#include <bdlar_choiceref.h>
◆ ChoiceConstRef() [1/3]
template<class t_CHOICE >
| bdlar::ChoiceConstRef::ChoiceConstRef |
( |
const t_CHOICE & |
choice, |
|
|
typename bsl::enable_if< IsChoice< t_CHOICE >::value >::type * |
= 0 |
|
) |
| |
|
inlineexplicit |
Create ChoiceConstRef object that type erases the supplied choice object.
◆ ChoiceConstRef() [2/3]
| bdlar::ChoiceConstRef::ChoiceConstRef |
( |
const void * |
objectAddress, |
|
|
const ChoiceConstVtable * |
vtable |
|
) |
| |
|
inline |
Create ChoiceConstRef object.
- Precondition
- The behaviour is undefined unless
objectAddress and vtable point to the valid objects.
◆ ChoiceConstRef() [3/3]
| bdlar::ChoiceConstRef::ChoiceConstRef |
( |
const ChoiceRef & |
object | ) |
|
|
inline |
Create ChoiceConstRef object that wraps the same object as the specified object.
◆ accessSelection()
template<typename t_ACCESSOR >
| int bdlar::ChoiceConstRef::accessSelection |
( |
t_ACCESSOR & |
accessor | ) |
const |
|
inline |
Invoke the specified accessor on the (non-modifiable) selection, supplying accessor with the corresponding selection information structure. The supplied accessor must be a callable type that can be called as if it had the following signature:
template <class t_INFO>
int accessor(const SELECTION& refOrValue, const t_INFO& info);
Return the value returned from the invocation of accessor.
- Precondition
- The behavior is undefined unless
selectionId() != -1.
◆ hasSelection() [1/2]
| bool bdlar::ChoiceConstRef::hasSelection |
( |
const char * |
selectionName, |
|
|
int |
selectionNameLength |
|
) |
| const |
|
inline |
Return true if the object has a selection with the specified selectionName of the specified selectionNameLength, and false otherwise.
◆ hasSelection() [2/2]
| bool bdlar::ChoiceConstRef::hasSelection |
( |
int |
selectionId | ) |
const |
|
inline |
Return true if the object has a selection with the specified selectionId, and false otherwise.
◆ objectAddress()
| const void * bdlar::ChoiceConstRef::objectAddress |
( |
| ) |
const |
|
inline |
Return a pointer to the wrapped array.
◆ selectionId()
| int bdlar::ChoiceConstRef::selectionId |
( |
| ) |
const |
|
inline |
Return the id of the current selection if the selection is defined, and -1 otherwise.
◆ vtable()
Return a pointer to the vtable.
◆ xsdName()
| const char * bdlar::ChoiceConstRef::xsdName |
( |
int |
format | ) |
const |
|
inline |
The documentation for this class was generated from the following file: