#include <baljsn_decoderoptions.h>
List of all members.
Public Types |
enum | { ATTRIBUTE_ID_MAX_DEPTH = 0,
ATTRIBUTE_ID_SKIP_UNKNOWN_ELEMENTS = 1,
ATTRIBUTE_ID_VALIDATE_INPUT_IS_UTF8 = 2
} |
enum | { NUM_ATTRIBUTES = 3
} |
enum | { ATTRIBUTE_INDEX_MAX_DEPTH = 0,
ATTRIBUTE_INDEX_SKIP_UNKNOWN_ELEMENTS = 1,
ATTRIBUTE_INDEX_VALIDATE_INPUT_IS_UTF8 = 2
} |
Public Member Functions |
| DecoderOptions () |
| DecoderOptions (const DecoderOptions &original) |
| ~DecoderOptions () |
DecoderOptions & | operator= (const DecoderOptions &rhs) |
void | reset () |
template<class MANIPULATOR > |
int | manipulateAttributes (MANIPULATOR &manipulator) |
template<class MANIPULATOR > |
int | manipulateAttribute (MANIPULATOR &manipulator, int id) |
template<class MANIPULATOR > |
int | manipulateAttribute (MANIPULATOR &manipulator, const char *name, int nameLength) |
void | setMaxDepth (int value) |
void | setSkipUnknownElements (bool value) |
void | setValidateInputIsUtf8 (bool value) |
bsl::ostream & | print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const |
template<class ACCESSOR > |
int | accessAttributes (ACCESSOR &accessor) const |
template<class ACCESSOR > |
int | accessAttribute (ACCESSOR &accessor, int id) const |
template<class ACCESSOR > |
int | accessAttribute (ACCESSOR &accessor, const char *name, int nameLength) const |
int | maxDepth () const |
bool | skipUnknownElements () const |
bool | validateInputIsUtf8 () const |
Static Public Member Functions |
static const bdlat_AttributeInfo * | lookupAttributeInfo (int id) |
static const bdlat_AttributeInfo * | lookupAttributeInfo (const char *name, int nameLength) |
Static Public Attributes |
static const char | CLASS_NAME [] |
static const int | DEFAULT_INITIALIZER_MAX_DEPTH |
static const bool | DEFAULT_INITIALIZER_SKIP_UNKNOWN_ELEMENTS |
static const bool | DEFAULT_INITIALIZER_VALIDATE_INPUT_IS_UTF8 |
static const bdlat_AttributeInfo | ATTRIBUTE_INFO_ARRAY [] |
Detailed Description
Options for controlling the JSON decoding process.
See Component baljsn_decoderoptions
Member Enumeration Documentation
- Enumerator:
ATTRIBUTE_ID_MAX_DEPTH |
|
ATTRIBUTE_ID_SKIP_UNKNOWN_ELEMENTS |
|
ATTRIBUTE_ID_VALIDATE_INPUT_IS_UTF8 |
|
- Enumerator:
ATTRIBUTE_INDEX_MAX_DEPTH |
|
ATTRIBUTE_INDEX_SKIP_UNKNOWN_ELEMENTS |
|
ATTRIBUTE_INDEX_VALIDATE_INPUT_IS_UTF8 |
|
Constructor & Destructor Documentation
baljsn::DecoderOptions::DecoderOptions |
( |
|
) |
|
baljsn::DecoderOptions::DecoderOptions |
( |
const DecoderOptions & |
original |
) |
|
Create an object of type DecoderOptions
having the value of the specified original
object.
baljsn::DecoderOptions::~DecoderOptions |
( |
|
) |
|
Member Function Documentation
static const bdlat_AttributeInfo* baljsn::DecoderOptions::lookupAttributeInfo |
( |
int |
id |
) |
[static] |
Return attribute information for the attribute indicated by the specified id
if the attribute exists, and 0 otherwise.
static const bdlat_AttributeInfo* baljsn::DecoderOptions::lookupAttributeInfo |
( |
const char * |
name, |
|
|
int |
nameLength | |
|
) |
| | [static] |
Return attribute information for the attribute indicated by the specified name
of the specified nameLength
if the attribute exists, and 0 otherwise.
Assign to this object the value of the specified rhs
object.
void baljsn::DecoderOptions::reset |
( |
|
) |
|
Reset this object to the default value (i.e., its value upon default construction).
template<class MANIPULATOR >
int baljsn::DecoderOptions::manipulateAttributes |
( |
MANIPULATOR & |
manipulator |
) |
|
Invoke the specified manipulator
sequentially on the address of each (modifiable) attribute of this object, supplying manipulator
with the corresponding attribute information structure until such invocation returns a non-zero value. Return the value from the last invocation of manipulator
(i.e., the invocation that terminated the sequence).
template<class MANIPULATOR >
int baljsn::DecoderOptions::manipulateAttribute |
( |
MANIPULATOR & |
manipulator, |
|
|
int |
id | |
|
) |
| | |
Invoke the specified manipulator
on the address of the (modifiable) attribute indicated by the specified id
, supplying manipulator
with the corresponding attribute information structure. Return the value returned from the invocation of manipulator
if id
identifies an attribute of this class, and -1 otherwise.
template<class MANIPULATOR >
int baljsn::DecoderOptions::manipulateAttribute |
( |
MANIPULATOR & |
manipulator, |
|
|
const char * |
name, |
|
|
int |
nameLength | |
|
) |
| | |
Invoke the specified manipulator
on the address of the (modifiable) attribute indicated by the specified name
of the specified nameLength
, supplying manipulator
with the corresponding attribute information structure. Return the value returned from the invocation of manipulator
if name
identifies an attribute of this class, and -1 otherwise.
void baljsn::DecoderOptions::setMaxDepth |
( |
int |
value |
) |
|
Set the "MaxDepth" attribute of this object to the specified value
.
void baljsn::DecoderOptions::setSkipUnknownElements |
( |
bool |
value |
) |
|
Set the "SkipUnknownElements" attribute of this object to the specified value
.
void baljsn::DecoderOptions::setValidateInputIsUtf8 |
( |
bool |
value |
) |
|
Set the "ValidateInputIsUtf8" attribute of this object to the specified value
.
bsl::ostream& baljsn::DecoderOptions::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.
template<class ACCESSOR >
int baljsn::DecoderOptions::accessAttributes |
( |
ACCESSOR & |
accessor |
) |
const |
Invoke the specified accessor
sequentially on each (non-modifiable) attribute of this object, supplying accessor
with the corresponding attribute information structure until such invocation returns a non-zero value. Return the value from the last invocation of accessor
(i.e., the invocation that terminated the sequence).
template<class ACCESSOR >
int baljsn::DecoderOptions::accessAttribute |
( |
ACCESSOR & |
accessor, |
|
|
int |
id | |
|
) |
| | const |
Invoke the specified accessor
on the (non-modifiable) attribute of this object indicated by the specified id
, supplying accessor
with the corresponding attribute information structure. Return the value returned from the invocation of accessor
if id
identifies an attribute of this class, and -1 otherwise.
template<class ACCESSOR >
int baljsn::DecoderOptions::accessAttribute |
( |
ACCESSOR & |
accessor, |
|
|
const char * |
name, |
|
|
int |
nameLength | |
|
) |
| | const |
Invoke the specified accessor
on the (non-modifiable) attribute of this object indicated by the specified name
of the specified nameLength
, supplying accessor
with the corresponding attribute information structure. Return the value returned from the invocation of accessor
if name
identifies an attribute of this class, and -1 otherwise.
int baljsn::DecoderOptions::maxDepth |
( |
|
) |
const |
Return a reference to the non-modifiable "MaxDepth" attribute of this object.
bool baljsn::DecoderOptions::skipUnknownElements |
( |
|
) |
const |
Return a reference to the non-modifiable "SkipUnknownElements" attribute of this object.
bool baljsn::DecoderOptions::validateInputIsUtf8 |
( |
|
) |
const |
Return a reference to the non-modifiable "ValidateInputIsUtf8" attribute of this object.
Member Data Documentation
The documentation for this class was generated from the following file: