BDE 4.14.0 Production release
Loading...
Searching...
No Matches
baljsn::DatumEncoderOptions Class Reference

#include <baljsn_datumencoderoptions.h>

Public Member Functions

 DatumEncoderOptions ()
 
 DatumEncoderOptions (const DatumEncoderOptions &original)
 
 ~DatumEncoderOptions ()
 Destroy this object.
 
DatumEncoderOptionsoperator= (const DatumEncoderOptions &rhs)
 Assign to this object the value of the specified rhs object.
 
void reset ()
 
void setStrictTypes (bool value)
 
void setInitialIndentLevel (int value)
 
void setSpacesPerLevel (int value)
 
void setEncodingStyle (baljsn::EncodingStyle::Value value)
 
void setEncodeQuotedDecimal64 (bool value)
 
bool strictTypes () const
 Return the "StrictTypes" attribute of this object.
 
int initialIndentLevel () const
 Return the "InitialIndentLevel" attribute of this object.
 
int spacesPerLevel () const
 Return the "SpacesPerLevel" attribute of this object.
 
baljsn::EncodingStyle::Value encodingStyle () const
 Return the "EncodingStyle" attribute of this object.
 
bool encodeQuotedDecimal64 () const
 
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
 

Static Public Attributes

static const bool s_DEFAULT_INITIALIZER_STRICT_TYPES
 
static const bool s_DEFAULT_INITIALIZER_ENCODE_QUOTED_DECIMAL64
 
static const int s_DEFAULT_INITIALIZER_INITIAL_INDENT_LEVEL
 
static const int s_DEFAULT_INITIALIZER_SPACES_PER_LEVEL
 
static const baljsn::EncodingStyle::Value s_DEFAULT_INITIALIZER_ENCODING_STYLE
 

Detailed Description

This simply constrained (value-semantic) attribute class specifies options for encoding Datum objects in the JSON format. See the Attributes section for information on the class attributes. Note that the class invariants are identically the constraints on the individual attributes.

See baljsn_datumencoderoptions

Constructor & Destructor Documentation

◆ DatumEncoderOptions() [1/2]

baljsn::DatumEncoderOptions::DatumEncoderOptions ( )

Create an object of type DatumEncoderOptions having the default value.

◆ DatumEncoderOptions() [2/2]

baljsn::DatumEncoderOptions::DatumEncoderOptions ( const DatumEncoderOptions original)

Create an object of type DatumEncoderOptions having the value of the specified original object.

◆ ~DatumEncoderOptions()

baljsn::DatumEncoderOptions::~DatumEncoderOptions ( )

Member Function Documentation

◆ encodeQuotedDecimal64()

bool baljsn::DatumEncoderOptions::encodeQuotedDecimal64 ( ) const
inline

Return the value of the "EncodeQuotedDecimal64" attribute of this object.

◆ encodingStyle()

baljsn::EncodingStyle::Value baljsn::DatumEncoderOptions::encodingStyle ( ) const
inline

◆ initialIndentLevel()

int baljsn::DatumEncoderOptions::initialIndentLevel ( ) const
inline

◆ operator=()

DatumEncoderOptions & baljsn::DatumEncoderOptions::operator= ( const DatumEncoderOptions rhs)

◆ print()

bsl::ostream & baljsn::DatumEncoderOptions::print ( bsl::ostream &  stream,
int  level = 0,
int  spacesPerLevel = 4 
) const

Format this object to the specified output stream at the optionally specified indentation level and return a reference to the modifiable stream. If level is specified, optionally specify spacesPerLevel, the number of spaces per indentation level for this and all of its nested objects. Each line is indented by the absolute value of level * spacesPerLevel. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, suppress line breaks and format the entire output on one line. If stream is initially invalid, this operation has no effect. Note that a trailing newline is provided in multiline mode only.

◆ reset()

void baljsn::DatumEncoderOptions::reset ( )

Reset this object to the default value (i.e., its value upon default construction).

◆ setEncodeQuotedDecimal64()

void baljsn::DatumEncoderOptions::setEncodeQuotedDecimal64 ( bool  value)
inline

Set the "EncodeQuotedDecimal64" attribute of this object to the specified value.

◆ setEncodingStyle()

void baljsn::DatumEncoderOptions::setEncodingStyle ( baljsn::EncodingStyle::Value  value)
inline

Set the "EncodingStyle" attribute of this object to the specified value.

◆ setInitialIndentLevel()

void baljsn::DatumEncoderOptions::setInitialIndentLevel ( int  value)
inline

Set the "InitialIndentLevel" attribute of this object to the specified value. The behavior is undefined unless 0 <= value.

◆ setSpacesPerLevel()

void baljsn::DatumEncoderOptions::setSpacesPerLevel ( int  value)
inline

Set the "SpacesPerLevel" attribute of this object to the specified value. The behavior is undefined unless 0 <= value.

◆ setStrictTypes()

void baljsn::DatumEncoderOptions::setStrictTypes ( bool  value)
inline

Set the "StrictTypes" attribute of this object to the specified value.

◆ spacesPerLevel()

int baljsn::DatumEncoderOptions::spacesPerLevel ( ) const
inline

◆ strictTypes()

bool baljsn::DatumEncoderOptions::strictTypes ( ) const
inline

Member Data Documentation

◆ s_DEFAULT_INITIALIZER_ENCODE_QUOTED_DECIMAL64

const bool baljsn::DatumEncoderOptions::s_DEFAULT_INITIALIZER_ENCODE_QUOTED_DECIMAL64
static

◆ s_DEFAULT_INITIALIZER_ENCODING_STYLE

const baljsn::EncodingStyle::Value baljsn::DatumEncoderOptions::s_DEFAULT_INITIALIZER_ENCODING_STYLE
static

◆ s_DEFAULT_INITIALIZER_INITIAL_INDENT_LEVEL

const int baljsn::DatumEncoderOptions::s_DEFAULT_INITIALIZER_INITIAL_INDENT_LEVEL
static

◆ s_DEFAULT_INITIALIZER_SPACES_PER_LEVEL

const int baljsn::DatumEncoderOptions::s_DEFAULT_INITIALIZER_SPACES_PER_LEVEL
static

◆ s_DEFAULT_INITIALIZER_STRICT_TYPES

const bool baljsn::DatumEncoderOptions::s_DEFAULT_INITIALIZER_STRICT_TYPES
static

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