BDE 4.14.0 Production release
Loading...
Searching...
No Matches
balb::Enumerated Struct Reference

#include <balb_testmessages.h>

Public Types

enum  Value { NEW_YORK = 0 , NEW_JERSEY = 1 , LONDON = 2 }
 
enum  { NUM_ENUMERATORS = 3 }
 

Static Public Member Functions

static int maxSupportedBdexVersion ()
 
static const char * toString (Value value)
 
static int fromString (Value *result, const char *string, int stringLength)
 
static int fromString (Value *result, const bsl::string &string)
 
static int fromInt (Value *result, int number)
 
template<class STREAM >
static STREAM & bdexStreamIn (STREAM &stream, Value &value, int version)
 
static bsl::ostream & print (bsl::ostream &stream, Value value)
 
template<class STREAM >
static STREAM & bdexStreamOut (STREAM &stream, Value value, int version)
 

Static Public Attributes

static const char CLASS_NAME []
 
static const bdlat_EnumeratorInfo ENUMERATOR_INFO_ARRAY []
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
NUM_ENUMERATORS 

◆ Value

Enumerator
NEW_YORK 
NEW_JERSEY 
LONDON 

Member Function Documentation

◆ bdexStreamIn()

template<class STREAM >
STREAM & balb::Enumerated::bdexStreamIn ( STREAM &  stream,
Enumerated::Value value,
int  version 
)
static

Assign to the specified value the value read from the specified input stream using the specified version format and return a reference to the modifiable stream. If stream is initially invalid, this operation has no effect. If stream becomes invalid during this operation, the value is valid, but its value is undefined. If the specified version is not supported, stream is marked invalid, but value is unaltered. Note that no version is read from stream. (See the package-group-level documentation for more information on bdex streaming of container types.)

◆ bdexStreamOut()

template<class STREAM >
STREAM & balb::Enumerated::bdexStreamOut ( STREAM &  stream,
Enumerated::Value  value,
int  version 
)
static

Write the specified value to the specified output stream and return a reference to the modifiable stream. Optionally specify an explicit version format; by default, the maximum supported version is written to stream and used as the format. If version is specified, that format is used but not written to stream. If version is not supported, stream is left unmodified. (See the package-group-level documentation for more information on bdex streaming of container types).

◆ fromInt()

static int balb::Enumerated::fromInt ( Value result,
int  number 
)
static

Load into the specified result the enumerator matching the specified number. Return 0 on success, and a non-zero value with no effect on result otherwise (i.e., number does not match any enumerator).

◆ fromString() [1/2]

int balb::Enumerated::fromString ( Value result,
const bsl::string string 
)
inlinestatic

Load into the specified result the enumerator matching the specified string. Return 0 on success, and a non-zero value with no effect on result otherwise (i.e., string does not match any enumerator).

◆ fromString() [2/2]

static int balb::Enumerated::fromString ( Value result,
const char *  string,
int  stringLength 
)
static

Load into the specified result the enumerator matching the specified string of the specified stringLength. Return 0 on success, and a non-zero value with no effect on result otherwise (i.e., string does not match any enumerator).

◆ maxSupportedBdexVersion()

int balb::Enumerated::maxSupportedBdexVersion ( )
inlinestatic

Return the most current bdex streaming version number supported by this class. See the bslx package-level documentation for more information on bdex streaming of value-semantic types and containers.

◆ print()

bsl::ostream & balb::Enumerated::print ( bsl::ostream &  stream,
Enumerated::Value  value 
)
inlinestatic

Write to the specified stream the string representation of the specified enumeration value. Return a reference to the modifiable stream.

◆ toString()

static const char * balb::Enumerated::toString ( Value  value)
static

Return the string representation exactly matching the enumerator name corresponding to the specified enumeration value.

Member Data Documentation

◆ CLASS_NAME

const char balb::Enumerated::CLASS_NAME[]
static

◆ ENUMERATOR_INFO_ARRAY

const bdlat_EnumeratorInfo balb::Enumerated::ENUMERATOR_INFO_ARRAY[]
static

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