Quick Links:

bal | bbl | bdl | bsl

Classes | Enumerations | Functions

bdlat_ChoiceFunctions Namespace Reference
[Component bdlat_choicefunctions]

Classes

struct  IsChoice

Enumerations

enum  { k_UNDEFINED_SELECTION_ID = -1, UNDEFINED_SELECTION_ID = k_UNDEFINED_SELECTION_ID, BDEAT_UNDEFINED_SELECTION_ID = k_UNDEFINED_SELECTION_ID }

Functions

template<class TYPE >
int makeSelection (TYPE *object, int selectionId)
template<class TYPE >
int makeSelection (TYPE *object, const char *selectionName, int selectionNameLength)
template<class TYPE , class MANIPULATOR >
int manipulateSelection (TYPE *object, MANIPULATOR &manipulator)
template<class TYPE , class ACCESSOR >
int accessSelection (const TYPE &object, ACCESSOR &accessor)
template<class TYPE >
bool hasSelection (const TYPE &object, const char *selectionName, int selectionNameLength)
template<class TYPE >
bool hasSelection (const TYPE &object, int selectionId)
template<class TYPE >
int selectionId (const TYPE &object)
template<class TYPE >
int bdlat_choiceMakeSelection (TYPE *object, int selectionId)
template<class TYPE >
int bdlat_choiceMakeSelection (TYPE *object, const char *selectionName, int selectionNameLength)
template<class TYPE , class MANIPULATOR >
int bdlat_choiceManipulateSelection (TYPE *object, MANIPULATOR &manipulator)
template<class TYPE , class ACCESSOR >
int bdlat_choiceAccessSelection (const TYPE &object, ACCESSOR &accessor)
template<class TYPE >
bool bdlat_choiceHasSelection (const TYPE &object, const char *selectionName, int selectionNameLength)
template<class TYPE >
bool bdlat_choiceHasSelection (const TYPE &object, int selectionId)
template<class TYPE >
int bdlat_choiceSelectionId (const TYPE &object)

Enumeration Type Documentation

anonymous enum
Enumerator:
k_UNDEFINED_SELECTION_ID 

indicates selection not made

UNDEFINED_SELECTION_ID 
BDEAT_UNDEFINED_SELECTION_ID 

Function Documentation

template<class TYPE >
int bdlat_ChoiceFunctions::makeSelection ( TYPE *  object,
int  selectionId 
)

Set the value of the specified object to be the default for the selection indicated by the specified selectionId. Return 0 on success, and non-zero value otherwise (i.e., the selection is not found).

template<class TYPE >
int bdlat_ChoiceFunctions::makeSelection ( TYPE *  object,
const char *  selectionName,
int  selectionNameLength 
)

Set the value of the specified object to be the default for the selection indicated by the specified selectionName of the specified selectionNameLength. Return 0 on success, and non-zero value otherwise (i.e., the selection is not found).

template<class TYPE , class MANIPULATOR >
int bdlat_ChoiceFunctions::manipulateSelection ( TYPE *  object,
MANIPULATOR &  manipulator 
)

Invoke the specified manipulator on the address of the (modifiable) selection of the specified object, supplying manipulator with the corresponding selection information structure. Return the value returned from the invocation of manipulator. The behavior is undefined unless k_UNDEFINED_SELECTION_ID != selectionId(*object).

template<class TYPE , class ACCESSOR >
int bdlat_ChoiceFunctions::accessSelection ( const TYPE &  object,
ACCESSOR &  accessor 
)

Invoke the specified accessor on the (non-modifiable) selection of the specified object, supplying accessor with the corresponding selection information structure. Return the value returned from the invocation of accessor. The behavior is undefined unless k_UNDEFINED_SELECTION_ID != selectionId(object).

template<class TYPE >
bool bdlat_ChoiceFunctions::hasSelection ( const TYPE &  object,
const char *  selectionName,
int  selectionNameLength 
)

Return true if the specified object has a selection with the specified selectionName of the specified selectionNameLength, and false otherwise.

template<class TYPE >
bool bdlat_ChoiceFunctions::hasSelection ( const TYPE &  object,
int  selectionId 
)

Return true if the specified object has a selection with the specified selectionId, and false otherwise.

template<class TYPE >
int bdlat_ChoiceFunctions::selectionId ( const TYPE &  object  ) 

Return the id of the current selection if the selection is defined, and k_UNDEFINED_SELECTION_ID otherwise.

template<class TYPE >
int bdlat_ChoiceFunctions::bdlat_choiceMakeSelection ( TYPE *  object,
int  selectionId 
)
template<class TYPE >
int bdlat_ChoiceFunctions::bdlat_choiceMakeSelection ( TYPE *  object,
const char *  selectionName,
int  selectionNameLength 
)
template<class TYPE , class MANIPULATOR >
int bdlat_ChoiceFunctions::bdlat_choiceManipulateSelection ( TYPE *  object,
MANIPULATOR &  manipulator 
)
template<class TYPE , class ACCESSOR >
int bdlat_ChoiceFunctions::bdlat_choiceAccessSelection ( const TYPE &  object,
ACCESSOR &  accessor 
)
template<class TYPE >
bool bdlat_ChoiceFunctions::bdlat_choiceHasSelection ( const TYPE &  object,
const char *  selectionName,
int  selectionNameLength 
)
template<class TYPE >
bool bdlat_ChoiceFunctions::bdlat_choiceHasSelection ( const TYPE &  object,
int  selectionId 
)
template<class TYPE >
int bdlat_ChoiceFunctions::bdlat_choiceSelectionId ( const TYPE &  object  )