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

#include <s_baltst_timingrequest.h>

Public Types

enum  { SELECTION_ID_UNDEFINED = -1 , SELECTION_ID_SQRT = 0 , SELECTION_ID_BASIC = 1 , SELECTION_ID_BIG = 2 }
 
enum  { NUM_SELECTIONS = 3 }
 
enum  { SELECTION_INDEX_SQRT = 0 , SELECTION_INDEX_BASIC = 1 , SELECTION_INDEX_BIG = 2 }
 

Public Member Functions

 TimingRequest (bslma::Allocator *basicAllocator=0)
 
 TimingRequest (const TimingRequest &original, bslma::Allocator *basicAllocator=0)
 
 ~TimingRequest ()
 Destroy this object.
 
TimingRequestoperator= (const TimingRequest &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)
 
s_baltst::SqrtmakeSqrt ()
 
s_baltst::SqrtmakeSqrt (const s_baltst::Sqrt &value)
 
s_baltst::BasicRecordmakeBasic ()
 
s_baltst::BasicRecordmakeBasic (const s_baltst::BasicRecord &value)
 
s_baltst::BigRecordmakeBig ()
 
s_baltst::BigRecordmakeBig (const s_baltst::BigRecord &value)
 
template<class MANIPULATOR >
int manipulateSelection (MANIPULATOR &manipulator)
 
s_baltst::Sqrtsqrt ()
 
s_baltst::BasicRecordbasic ()
 
s_baltst::BigRecordbig ()
 
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 s_baltst::Sqrtsqrt () const
 
const s_baltst::BasicRecordbasic () const
 
const s_baltst::BigRecordbig () const
 
bool isSqrtValue () const
 
bool isBasicValue () const
 
bool isBigValue () 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 []
 

Detailed Description

A choice record representative of a typical request object.

See s_baltst_timingrequest

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
SELECTION_ID_UNDEFINED 
SELECTION_ID_SQRT 
SELECTION_ID_BASIC 
SELECTION_ID_BIG 

◆ anonymous enum

anonymous enum
Enumerator
NUM_SELECTIONS 

◆ anonymous enum

anonymous enum
Enumerator
SELECTION_INDEX_SQRT 
SELECTION_INDEX_BASIC 
SELECTION_INDEX_BIG 

Constructor & Destructor Documentation

◆ TimingRequest() [1/2]

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

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

◆ TimingRequest() [2/2]

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

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

◆ ~TimingRequest()

s_baltst::TimingRequest::~TimingRequest ( )
inline

Member Function Documentation

◆ accessSelection()

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

◆ basic() [1/2]

s_baltst::BasicRecord & s_baltst::TimingRequest::basic ( )
inline

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

◆ basic() [2/2]

const s_baltst::BasicRecord & s_baltst::TimingRequest::basic ( ) const
inline

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

◆ big() [1/2]

s_baltst::BigRecord & s_baltst::TimingRequest::big ( )
inline

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

◆ big() [2/2]

const s_baltst::BigRecord & s_baltst::TimingRequest::big ( ) const
inline

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

◆ isBasicValue()

bool s_baltst::TimingRequest::isBasicValue ( ) const
inline

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

◆ isBigValue()

bool s_baltst::TimingRequest::isBigValue ( ) const
inline

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

◆ isSqrtValue()

bool s_baltst::TimingRequest::isSqrtValue ( ) const
inline

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

◆ isUndefinedValue()

bool s_baltst::TimingRequest::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::TimingRequest::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::TimingRequest::lookupSelectionInfo ( int  id)
static

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

◆ makeBasic() [1/2]

s_baltst::BasicRecord & s_baltst::TimingRequest::makeBasic ( )

◆ makeBasic() [2/2]

s_baltst::BasicRecord & s_baltst::TimingRequest::makeBasic ( const s_baltst::BasicRecord value)

◆ makeBig() [1/2]

s_baltst::BigRecord & s_baltst::TimingRequest::makeBig ( )

◆ makeBig() [2/2]

s_baltst::BigRecord & s_baltst::TimingRequest::makeBig ( const s_baltst::BigRecord value)

◆ makeSelection() [1/2]

int s_baltst::TimingRequest::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::TimingRequest::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).

◆ makeSqrt() [1/2]

s_baltst::Sqrt & s_baltst::TimingRequest::makeSqrt ( )

◆ makeSqrt() [2/2]

s_baltst::Sqrt & s_baltst::TimingRequest::makeSqrt ( const s_baltst::Sqrt value)

◆ manipulateSelection()

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

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

◆ print()

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

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

◆ selectionId()

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

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

◆ selectionName()

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

◆ sqrt() [1/2]

s_baltst::Sqrt & s_baltst::TimingRequest::sqrt ( )
inline

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

◆ sqrt() [2/2]

const s_baltst::Sqrt & s_baltst::TimingRequest::sqrt ( ) const
inline

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

Member Data Documentation

◆ CLASS_NAME

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

◆ d_basic

bsls::ObjectBuffer< s_baltst::BasicRecord > s_baltst::TimingRequest::d_basic

◆ d_big

bsls::ObjectBuffer< s_baltst::BigRecord > s_baltst::TimingRequest::d_big

◆ d_sqrt

bsls::ObjectBuffer< s_baltst::Sqrt > s_baltst::TimingRequest::d_sqrt

◆ SELECTION_INFO_ARRAY

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

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