Quick Links:

bal | bbl | bdl | bsl

Public Types | Static Public Member Functions | Static Public Attributes

balb::Enumerated Struct Reference

#include <balb_testmessages.h>

List of all members.

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

Enumerator:
NEW_YORK 
NEW_JERSEY 
LONDON 
anonymous enum
Enumerator:
NUM_ENUMERATORS 

Member Function Documentation

static int balb::Enumerated::maxSupportedBdexVersion (  )  [static]

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.

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

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

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).

static int balb::Enumerated::fromString ( Value result,
const bsl::string string 
) [static]

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).

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).

template<class STREAM >
static STREAM& balb::Enumerated::bdexStreamIn ( STREAM &  stream,
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.)

static bsl::ostream& balb::Enumerated::print ( bsl::ostream &  stream,
Value  value 
) [static]

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

template<class STREAM >
static STREAM& balb::Enumerated::bdexStreamOut ( STREAM &  stream,
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).


Member Data Documentation

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

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