BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bdljsn::ReadOptions Class Reference

#include <bdljsn_readoptions.h>

Detailed Description

This simply constrained (value-semantic) attribute class specifies options for reading a JSON document. See the Attributes for information on the class attributes.

Note
Note that the class invariants are identically the constraints on the individual attributes.

See bdljsn_readoptions

Public Member Functions

 ReadOptions ()
 
 ReadOptions (const ReadOptions &original)
 
 ~ReadOptions ()
 
ReadOptionsoperator= (const ReadOptions &rhs)
 
ReadOptionsreset ()
 
ReadOptionssetAllowTrailingText (bool value)
 
ReadOptionssetMaxNestedDepth (int value)
 
bool allowTrailingText () const
 
int maxNestedDepth () const
 
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
 

Static Public Attributes

static const bool s_DEFAULT_INITIALIZER_ALLOW_TRAILING_TEXT
 
static const int s_DEFAULT_INITIALIZER_MAX_NESTED_DEPTH
 

Constructor & Destructor Documentation

◆ ReadOptions() [1/2]

bdljsn::ReadOptions::ReadOptions ( )

Create an object of type ReadOptions having the (default) attribute values:

int maxNestedDepth() const
Return the maxNestedDepth attribute of this object.
Definition bdljsn_readoptions.h:283
ReadOptions & setAllowTrailingText(bool value)
Definition bdljsn_readoptions.h:260

◆ ReadOptions() [2/2]

bdljsn::ReadOptions::ReadOptions ( const ReadOptions original)
inline

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

◆ ~ReadOptions()

bdljsn::ReadOptions::~ReadOptions ( )
inline

Destroy this object.

Member Function Documentation

◆ allowTrailingText()

bool bdljsn::ReadOptions::allowTrailingText ( ) const
inline

Return the allowTrailingText attribute of this object.

◆ maxNestedDepth()

int bdljsn::ReadOptions::maxNestedDepth ( ) const
inline

Return the maxNestedDepth attribute of this object.

◆ operator=()

ReadOptions & bdljsn::ReadOptions::operator= ( const ReadOptions rhs)
inline

Assign to this object the value of the specified rhs object and return a non-const reference to this object.

◆ print()

bsl::ostream & bdljsn::ReadOptions::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
Note that a trailing newline is provided in multiline mode only. Also note that the format is not fully specified, and can change without notice.

◆ reset()

ReadOptions & bdljsn::ReadOptions::reset ( )

Reset this object to the default value (i.e., its value upon default construction) and return a non-const reference to this object.

◆ setAllowTrailingText()

ReadOptions & bdljsn::ReadOptions::setAllowTrailingText ( bool  value)
inline

Set the allowTrailingText attribute of this object to th specified value and return a non-const reference to this object.

◆ setMaxNestedDepth()

ReadOptions & bdljsn::ReadOptions::setMaxNestedDepth ( int  value)
inline

Set the maxNestedDepth attribute of this object to the specified value and return a non-const reference to this object.

Precondition
The behavior is undefined unless 0 < value.

Member Data Documentation

◆ s_DEFAULT_INITIALIZER_ALLOW_TRAILING_TEXT

const bool bdljsn::ReadOptions::s_DEFAULT_INITIALIZER_ALLOW_TRAILING_TEXT
static

◆ s_DEFAULT_INITIALIZER_MAX_NESTED_DEPTH

const int bdljsn::ReadOptions::s_DEFAULT_INITIALIZER_MAX_NESTED_DEPTH
static

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