BDE 4.14.0 Production release
Loading...
Searching...
No Matches
s_baltst::Choice3 Class Reference

#include <s_baltst_ratsnest.h>

Public Types

enum  {
  SELECTION_ID_UNDEFINED = -1 , SELECTION_ID_SELECTION1 = 0 , SELECTION_ID_SELECTION2 = 1 , SELECTION_ID_SELECTION3 = 2 ,
  SELECTION_ID_SELECTION4 = 3
}
 
enum  { NUM_SELECTIONS = 4 }
 
enum  { SELECTION_INDEX_SELECTION1 = 0 , SELECTION_INDEX_SELECTION2 = 1 , SELECTION_INDEX_SELECTION3 = 2 , SELECTION_INDEX_SELECTION4 = 3 }
 

Public Member Functions

 Choice3 (bslma::Allocator *basicAllocator=0)
 
 Choice3 (const Choice3 &original, bslma::Allocator *basicAllocator=0)
 
 ~Choice3 ()
 Destroy this object.
 
Choice3operator= (const Choice3 &rhs)
 Assign to this object the value of the specified rhs object.
 
void reset ()
 
int makeSelection (int selectionId)
 
int makeSelection (const char *name, int nameLength)
 
Sequence6makeSelection1 ()
 
Sequence6makeSelection1 (const Sequence6 &value)
 
unsigned char & makeSelection2 ()
 
unsigned char & makeSelection2 (unsigned char value)
 
s_baltst::CustomStringmakeSelection3 ()
 
s_baltst::CustomStringmakeSelection3 (const s_baltst::CustomString &value)
 
s_baltst::CustomIntmakeSelection4 ()
 
s_baltst::CustomIntmakeSelection4 (const s_baltst::CustomInt &value)
 
template<class MANIPULATOR >
int manipulateSelection (MANIPULATOR &manipulator)
 
Sequence6selection1 ()
 
unsigned char & selection2 ()
 
s_baltst::CustomStringselection3 ()
 
s_baltst::CustomIntselection4 ()
 
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
 
int selectionId () const
 
template<class ACCESSOR >
int accessSelection (ACCESSOR &accessor) const
 
const Sequence6selection1 () const
 
const unsigned char & selection2 () const
 
const s_baltst::CustomStringselection3 () const
 
const s_baltst::CustomIntselection4 () const
 
bool isSelection1Value () const
 
bool isSelection2Value () const
 
bool isSelection3Value () const
 
bool isSelection4Value () const
 
bool isUndefinedValue () const
 
const char * selectionName () const
 Return the symbolic name of the current selection of this object.
 

Static Public Member Functions

static const bdlat_SelectionInfolookupSelectionInfo (int id)
 
static const bdlat_SelectionInfolookupSelectionInfo (const char *name, int nameLength)
 

Static Public Attributes

static const char CLASS_NAME []
 
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY []
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
SELECTION_ID_UNDEFINED 
SELECTION_ID_SELECTION1 
SELECTION_ID_SELECTION2 
SELECTION_ID_SELECTION3 
SELECTION_ID_SELECTION4 

◆ anonymous enum

anonymous enum
Enumerator
NUM_SELECTIONS 

◆ anonymous enum

anonymous enum
Enumerator
SELECTION_INDEX_SELECTION1 
SELECTION_INDEX_SELECTION2 
SELECTION_INDEX_SELECTION3 
SELECTION_INDEX_SELECTION4 

Constructor & Destructor Documentation

◆ Choice3() [1/2]

s_baltst::Choice3::Choice3 ( bslma::Allocator basicAllocator = 0)
inlineexplicit

Create an object of type Choice3 having the default value. Use the optionally specified basicAllocator to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

◆ Choice3() [2/2]

s_baltst::Choice3::Choice3 ( const Choice3 original,
bslma::Allocator basicAllocator = 0 
)

Create an object of type Choice3 having the value of the specified original object. Use the optionally specified basicAllocator to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

◆ ~Choice3()

s_baltst::Choice3::~Choice3 ( )
inline

Member Function Documentation

◆ accessSelection()

template<class ACCESSOR >
int s_baltst::Choice3::accessSelection ( ACCESSOR &  accessor) const

Invoke the specified accessor on the non-modifiable selection, supplying accessor with the corresponding selection information structure. Return the value returned from the invocation of accessor if this object has a defined selection, and -1 otherwise.

◆ isSelection1Value()

bool s_baltst::Choice3::isSelection1Value ( ) const
inline

Return true if the value of this object is a "Selection1" value, and return false otherwise.

◆ isSelection2Value()

bool s_baltst::Choice3::isSelection2Value ( ) const
inline

Return true if the value of this object is a "Selection2" value, and return false otherwise.

◆ isSelection3Value()

bool s_baltst::Choice3::isSelection3Value ( ) const
inline

Return true if the value of this object is a "Selection3" value, and return false otherwise.

◆ isSelection4Value()

bool s_baltst::Choice3::isSelection4Value ( ) const
inline

Return true if the value of this object is a "Selection4" value, and return false otherwise.

◆ isUndefinedValue()

bool s_baltst::Choice3::isUndefinedValue ( ) const
inline

Return true if the value of this object is undefined, and false otherwise.

◆ lookupSelectionInfo() [1/2]

static const bdlat_SelectionInfo * s_baltst::Choice3::lookupSelectionInfo ( const char *  name,
int  nameLength 
)
static

Return selection information for the selection indicated by the specified name of the specified nameLength if the selection exists, and 0 otherwise.

◆ lookupSelectionInfo() [2/2]

static const bdlat_SelectionInfo * s_baltst::Choice3::lookupSelectionInfo ( int  id)
static

Return selection information for the selection indicated by the specified id if the selection exists, and 0 otherwise.

◆ makeSelection() [1/2]

int s_baltst::Choice3::makeSelection ( const char *  name,
int  nameLength 
)

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

◆ makeSelection() [2/2]

int s_baltst::Choice3::makeSelection ( int  selectionId)

Set the value of this 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).

◆ makeSelection1() [1/2]

Sequence6 & s_baltst::Choice3::makeSelection1 ( )

◆ makeSelection1() [2/2]

Sequence6 & s_baltst::Choice3::makeSelection1 ( const Sequence6 value)

◆ makeSelection2() [1/2]

unsigned char & s_baltst::Choice3::makeSelection2 ( )

Set the value of this object to be a "Selection2" value. Optionally specify the value of the "Selection2". If value is not specified, the default "Selection2" value is used.

◆ makeSelection2() [2/2]

unsigned char & s_baltst::Choice3::makeSelection2 ( unsigned char  value)

◆ makeSelection3() [1/2]

s_baltst::CustomString & s_baltst::Choice3::makeSelection3 ( )

◆ makeSelection3() [2/2]

s_baltst::CustomString & s_baltst::Choice3::makeSelection3 ( const s_baltst::CustomString value)

◆ makeSelection4() [1/2]

s_baltst::CustomInt & s_baltst::Choice3::makeSelection4 ( )

◆ makeSelection4() [2/2]

s_baltst::CustomInt & s_baltst::Choice3::makeSelection4 ( const s_baltst::CustomInt value)

◆ manipulateSelection()

template<class MANIPULATOR >
int s_baltst::Choice3::manipulateSelection ( MANIPULATOR &  manipulator)

Invoke the specified manipulator on the address of the modifiable selection, supplying manipulator with the corresponding selection information structure. Return the value returned from the invocation of manipulator if this object has a defined selection, and -1 otherwise.

◆ operator=()

Choice3 & s_baltst::Choice3::operator= ( const Choice3 rhs)

◆ print()

bsl::ostream & s_baltst::Choice3::print ( bsl::ostream &  stream,
int  level = 0,
int  spacesPerLevel = 4 
) const

Format this object to the specified output stream at the optionally specified indentation level and return a reference to the modifiable stream. If level is specified, optionally specify spacesPerLevel, the number of spaces per indentation level for this and all of its nested objects. Each line is indented by the absolute value of level * spacesPerLevel. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, suppress line breaks and format the entire output on one line. If stream is initially invalid, this operation has no effect. Note that a trailing newline is provided in multiline mode only.

◆ reset()

void s_baltst::Choice3::reset ( )

Reset this object to the default value (i.e., its value upon default construction).

◆ selection1() [1/2]

Sequence6 & s_baltst::Choice3::selection1 ( )
inline

Return a reference to the modifiable "Selection1" selection of this object if "Selection1" is the current selection. The behavior is undefined unless "Selection1" is the selection of this object.

◆ selection1() [2/2]

const Sequence6 & s_baltst::Choice3::selection1 ( ) const
inline

Return a reference to the non-modifiable "Selection1" selection of this object if "Selection1" is the current selection. The behavior is undefined unless "Selection1" is the selection of this object.

◆ selection2() [1/2]

unsigned char & s_baltst::Choice3::selection2 ( )
inline

Return a reference to the modifiable "Selection2" selection of this object if "Selection2" is the current selection. The behavior is undefined unless "Selection2" is the selection of this object.

◆ selection2() [2/2]

const unsigned char & s_baltst::Choice3::selection2 ( ) const
inline

Return a reference to the non-modifiable "Selection2" selection of this object if "Selection2" is the current selection. The behavior is undefined unless "Selection2" is the selection of this object.

◆ selection3() [1/2]

s_baltst::CustomString & s_baltst::Choice3::selection3 ( )
inline

Return a reference to the modifiable "Selection3" selection of this object if "Selection3" is the current selection. The behavior is undefined unless "Selection3" is the selection of this object.

◆ selection3() [2/2]

const s_baltst::CustomString & s_baltst::Choice3::selection3 ( ) const
inline

Return a reference to the non-modifiable "Selection3" selection of this object if "Selection3" is the current selection. The behavior is undefined unless "Selection3" is the selection of this object.

◆ selection4() [1/2]

s_baltst::CustomInt & s_baltst::Choice3::selection4 ( )
inline

Return a reference to the modifiable "Selection4" selection of this object if "Selection4" is the current selection. The behavior is undefined unless "Selection4" is the selection of this object.

◆ selection4() [2/2]

const s_baltst::CustomInt & s_baltst::Choice3::selection4 ( ) const
inline

Return a reference to the non-modifiable "Selection4" selection of this object if "Selection4" is the current selection. The behavior is undefined unless "Selection4" is the selection of this object.

◆ selectionId()

int s_baltst::Choice3::selectionId ( ) const
inline

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

◆ selectionName()

const char * s_baltst::Choice3::selectionName ( ) const

Member Data Documentation

◆ CLASS_NAME

const char s_baltst::Choice3::CLASS_NAME[]
static

◆ d_selection1

bsls::ObjectBuffer< Sequence6 > s_baltst::Choice3::d_selection1

◆ d_selection2

bsls::ObjectBuffer< unsigned char > s_baltst::Choice3::d_selection2

◆ d_selection3

bsls::ObjectBuffer< s_baltst::CustomString > s_baltst::Choice3::d_selection3

◆ d_selection4

bsls::ObjectBuffer< s_baltst::CustomInt > s_baltst::Choice3::d_selection4

◆ SELECTION_INFO_ARRAY

const bdlat_SelectionInfo s_baltst::Choice3::SELECTION_INFO_ARRAY[]
static

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