#include <balb_testmessages.h>
◆ anonymous enum
Enumerator |
---|
NUM_ENUMERATORS | |
◆ Value
Enumerator |
---|
NEW_YORK | |
NEW_JERSEY | |
LONDON | |
◆ 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]
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
.
◆ CLASS_NAME
const char balb::Enumerated::CLASS_NAME[] |
|
static |
◆ ENUMERATOR_INFO_ARRAY
The documentation for this struct was generated from the following file: