Quick Links:

bal | bbl | bdl | bsl

Public Types | Static Public Member Functions | Static Public Attributes

baljsn::EncodingStyle Struct Reference

#include <baljsn_encodingstyle.h>

List of all members.

Public Types

enum  Value { e_COMPACT = 0, e_PRETTY = 1 }
enum  { NUM_ENUMERATORS = 2 }

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_view &string)
static int fromInt (Value *result, int number)
static bsl::ostream & print (bsl::ostream &stream, Value value)

Static Public Attributes

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

Detailed Description

Enumeration of encoding style (COMPACT or PRETTY).

See Component baljsn_encodingstyle


Member Enumeration Documentation

Enumerator:
e_COMPACT 
e_PRETTY 
anonymous enum
Enumerator:
NUM_ENUMERATORS 

Member Function Documentation

static const char* baljsn::EncodingStyle::toString ( Value  value  )  [static]

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

static int baljsn::EncodingStyle::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 baljsn::EncodingStyle::fromString ( Value result,
const bsl::string_view &  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 baljsn::EncodingStyle::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).

static bsl::ostream& baljsn::EncodingStyle::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.


Member Data Documentation

const char baljsn::EncodingStyle::CLASS_NAME[] [static]

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