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

#include <s_baltst_sequencewithanonymity.h>

Public Types

enum  { SELECTION_ID_UNDEFINED = -1 , SELECTION_ID_SELECTION5 = 0 , SELECTION_ID_SELECTION6 = 1 }
 
enum  { NUM_SELECTIONS = 2 }
 
enum  { SELECTION_INDEX_SELECTION5 = 0 , SELECTION_INDEX_SELECTION6 = 1 }
 

Public Member Functions

 SequenceWithAnonymityChoice1 (bslma::Allocator *basicAllocator=0)
 
 SequenceWithAnonymityChoice1 (const SequenceWithAnonymityChoice1 &original, bslma::Allocator *basicAllocator=0)
 
 ~SequenceWithAnonymityChoice1 ()
 Destroy this object.
 
SequenceWithAnonymityChoice1operator= (const SequenceWithAnonymityChoice1 &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)
 
bool & makeSelection5 ()
 
bool & makeSelection5 (bool value)
 
bsl::stringmakeSelection6 ()
 
bsl::stringmakeSelection6 (const bsl::string &value)
 
template<class MANIPULATOR >
int manipulateSelection (MANIPULATOR &manipulator)
 
bool & selection5 ()
 
bsl::stringselection6 ()
 
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 bool & selection5 () const
 
const bsl::stringselection6 () const
 
bool isSelection5Value () const
 
bool isSelection6Value () 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_SELECTION5 
SELECTION_ID_SELECTION6 

◆ anonymous enum

anonymous enum
Enumerator
NUM_SELECTIONS 

◆ anonymous enum

anonymous enum
Enumerator
SELECTION_INDEX_SELECTION5 
SELECTION_INDEX_SELECTION6 

Constructor & Destructor Documentation

◆ SequenceWithAnonymityChoice1() [1/2]

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

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

◆ SequenceWithAnonymityChoice1() [2/2]

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

Create an object of type SequenceWithAnonymityChoice1 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.

◆ ~SequenceWithAnonymityChoice1()

s_baltst::SequenceWithAnonymityChoice1::~SequenceWithAnonymityChoice1 ( )
inline

Member Function Documentation

◆ accessSelection()

template<class ACCESSOR >
int s_baltst::SequenceWithAnonymityChoice1::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.

◆ isSelection5Value()

bool s_baltst::SequenceWithAnonymityChoice1::isSelection5Value ( ) const
inline

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

◆ isSelection6Value()

bool s_baltst::SequenceWithAnonymityChoice1::isSelection6Value ( ) const
inline

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

◆ isUndefinedValue()

bool s_baltst::SequenceWithAnonymityChoice1::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::SequenceWithAnonymityChoice1::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::SequenceWithAnonymityChoice1::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::SequenceWithAnonymityChoice1::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::SequenceWithAnonymityChoice1::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).

◆ makeSelection5() [1/2]

bool & s_baltst::SequenceWithAnonymityChoice1::makeSelection5 ( )

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

◆ makeSelection5() [2/2]

bool & s_baltst::SequenceWithAnonymityChoice1::makeSelection5 ( bool  value)

◆ makeSelection6() [1/2]

bsl::string & s_baltst::SequenceWithAnonymityChoice1::makeSelection6 ( )

◆ makeSelection6() [2/2]

bsl::string & s_baltst::SequenceWithAnonymityChoice1::makeSelection6 ( const bsl::string value)

◆ manipulateSelection()

template<class MANIPULATOR >
int s_baltst::SequenceWithAnonymityChoice1::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=()

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

◆ print()

bsl::ostream & s_baltst::SequenceWithAnonymityChoice1::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::SequenceWithAnonymityChoice1::reset ( )

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

◆ selection5() [1/2]

bool & s_baltst::SequenceWithAnonymityChoice1::selection5 ( )
inline

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

◆ selection5() [2/2]

const bool & s_baltst::SequenceWithAnonymityChoice1::selection5 ( ) const
inline

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

◆ selection6() [1/2]

bsl::string & s_baltst::SequenceWithAnonymityChoice1::selection6 ( )
inline

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

◆ selection6() [2/2]

const bsl::string & s_baltst::SequenceWithAnonymityChoice1::selection6 ( ) const
inline

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

◆ selectionId()

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

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

◆ selectionName()

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

Member Data Documentation

◆ CLASS_NAME

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

◆ d_selection5

bsls::ObjectBuffer< bool > s_baltst::SequenceWithAnonymityChoice1::d_selection5

◆ d_selection6

bsls::ObjectBuffer< bsl::string > s_baltst::SequenceWithAnonymityChoice1::d_selection6

◆ SELECTION_INFO_ARRAY

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

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