BDE 4.14.0 Production release
Loading...
Searching...
No Matches
s_baltst::MyEnumerationUnpreservedWithFallback Struct Reference

#include <s_baltst_myenumerationunpreservedwithfallback.h>

Public Types

enum  Value { UNKNOWN = 0 , VALUE1 = 1 , VALUE2 = 2 }
 
enum  { NUM_ENUMERATORS = 3 }
 

Static Public Member Functions

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)
 
static int makeFallback (Value *result)
 
static bool hasFallback (Value)
 
static bool isFallback (Value value)
 
static bsl::ostream & print (bsl::ostream &stream, Value value)
 

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
UNKNOWN 
VALUE1 
VALUE2 

Member Function Documentation

◆ fromInt()

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

◆ hasFallback()

bool s_baltst::MyEnumerationUnpreservedWithFallback::hasFallback ( MyEnumerationUnpreservedWithFallback::Value  )
inlinestatic

Return true to indicate that this type supports a fallback enumerator.

◆ isFallback()

bool s_baltst::MyEnumerationUnpreservedWithFallback::isFallback ( MyEnumerationUnpreservedWithFallback::Value  value)
inlinestatic

Return true if the specified value equals the fallback enumerator, and false otherwise.

◆ makeFallback()

int s_baltst::MyEnumerationUnpreservedWithFallback::makeFallback ( MyEnumerationUnpreservedWithFallback::Value result)
inlinestatic

Load into the specified result the fallback enumerator value and return 0 to indicate success.

◆ print()

bsl::ostream & s_baltst::MyEnumerationUnpreservedWithFallback::print ( bsl::ostream &  stream,
MyEnumerationUnpreservedWithFallback::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 * s_baltst::MyEnumerationUnpreservedWithFallback::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 s_baltst::MyEnumerationUnpreservedWithFallback::CLASS_NAME[]
static

◆ ENUMERATOR_INFO_ARRAY

const bdlat_EnumeratorInfo s_baltst::MyEnumerationUnpreservedWithFallback::ENUMERATOR_INFO_ARRAY[]
static

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