Quick Links: |
#include <bdljsn_readoptions.h>
Public Member Functions | |
ReadOptions () | |
ReadOptions (const ReadOptions &original) | |
~ReadOptions () | |
ReadOptions & | operator= (const ReadOptions &rhs) |
void | reset () |
void | setAllowTrailingText (bool value) |
void | setMaxNestedDepth (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 |
This simply constrained (value-semantic) attribute class specifies options for reading a JSON document. See the Attributes section under DESCRIPTION in the component-level documentation for information on the class attributes. Note that the class invariants are identically the constraints on the individual attributes.
See Component bdljsn_readoptions
bdljsn::ReadOptions::ReadOptions | ( | ) |
Create an object of type ReadOptions
having the (default) attribute values:
setAllowTrailingText() == false maxNestedDepth() == 64
bdljsn::ReadOptions::ReadOptions | ( | const ReadOptions & | original | ) |
Create an object of type ReadOptions
having the value of the specified original
object.
bdljsn::ReadOptions::~ReadOptions | ( | ) |
Destroy this object.
ReadOptions& bdljsn::ReadOptions::operator= | ( | const ReadOptions & | rhs | ) |
Assign to this object the value of the specified rhs
object and return a non-'const' reference to this object.
void bdljsn::ReadOptions::reset | ( | ) |
Reset this object to the default value (i.e., its value upon default construction).
void bdljsn::ReadOptions::setAllowTrailingText | ( | bool | value | ) |
Set the allowTrailingText
attribute of this object to the specified value
.
void bdljsn::ReadOptions::setMaxNestedDepth | ( | int | value | ) |
Set the maxNestedDepth
attribute of this object to the specified value
. The behavior is undefined unless 0 < value
.
bool bdljsn::ReadOptions::allowTrailingText | ( | ) | const |
Return the allowTrailingText
attribute of this object.
int bdljsn::ReadOptions::maxNestedDepth | ( | ) | const |
Return the maxNestedDepth
attribute of this object.
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 that a trailing newline is provided in multiline mode only. Also note that the format is not fully specified, and can change without notice.
const bool bdljsn::ReadOptions::s_DEFAULT_INITIALIZER_ALLOW_TRAILING_TEXT [static] |
const int bdljsn::ReadOptions::s_DEFAULT_INITIALIZER_MAX_NESTED_DEPTH [static] |