Quick Links: |
#include <balber_berdecoderoptions.h>
Public Types | |
enum | { k_NUM_ATTRIBUTES = 5, NUM_ATTRIBUTES = k_NUM_ATTRIBUTES } |
enum | { e_ATTRIBUTE_INDEX_MAX_DEPTH = 0, e_ATTRIBUTE_INDEX_SKIP_UNKNOWN_ELEMENTS = 1, e_ATTRIBUTE_INDEX_TRACE_LEVEL = 2, e_ATTRIBUTE_INDEX_MAX_SEQUENCE_SIZE = 3, e_ATTRIBUTE_INDEX_DEFAULT_EMPTY_STRINGS = 4, ATTRIBUTE_INDEX_MAX_DEPTH, ATTRIBUTE_INDEX_SKIP_UNKNOWN_ELEMENTS, ATTRIBUTE_INDEX_TRACE_LEVEL, ATTRIBUTE_INDEX_MAX_SEQUENCE_SIZE, ATTRIBUTE_INDEX_DEFAULT_EMPTY_STRINGS } |
enum | { e_ATTRIBUTE_ID_MAX_DEPTH = 0, e_ATTRIBUTE_ID_SKIP_UNKNOWN_ELEMENTS = 1, e_ATTRIBUTE_ID_TRACE_LEVEL = 2, e_ATTRIBUTE_ID_MAX_SEQUENCE_SIZE = 3, e_ATTRIBUTE_ID_DEFAULT_EMPTY_STRINGS = 4, ATTRIBUTE_ID_MAX_DEPTH = e_ATTRIBUTE_ID_MAX_DEPTH, ATTRIBUTE_ID_SKIP_UNKNOWN_ELEMENTS, ATTRIBUTE_ID_TRACE_LEVEL = e_ATTRIBUTE_ID_TRACE_LEVEL, ATTRIBUTE_ID_MAX_SEQUENCE_SIZE = e_ATTRIBUTE_ID_MAX_SEQUENCE_SIZE, ATTRIBUTE_ID_DEFAULT_EMPTY_STRINGS } |
Public Member Functions | |
BerDecoderOptions () | |
BerDecoderOptions (const BerDecoderOptions &original) | |
~BerDecoderOptions () | |
BerDecoderOptions & | operator= (const BerDecoderOptions &rhs) |
template<class STREAM > | |
STREAM & | bdexStreamIn (STREAM &stream, int version) |
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 | setTraceLevel (int value) |
void | setMaxSequenceSize (int value) |
void | setDefaultEmptyStrings (bool value) |
bsl::ostream & | print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const |
template<class STREAM > | |
STREAM & | bdexStreamOut (STREAM &stream, int version) 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 |
const int & | maxDepth () const |
const bool & | skipUnknownElements () const |
const int & | traceLevel () const |
const int & | maxSequenceSize () const |
const bool & | defaultEmptyStrings () const |
Static Public Member Functions | |
static int | maxSupportedBdexVersion (int versionSelector) |
static int | maxSupportedBdexVersion () |
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_MAX_DEPTH |
static const bool | DEFAULT_SKIP_UNKNOWN_ELEMENTS |
static const int | DEFAULT_TRACE_LEVEL |
static const int | DEFAULT_MAX_SEQUENCE_SIZE |
static const bool | DEFAULT_DEFAULT_EMPTY_STRINGS |
static const bdlat_AttributeInfo | ATTRIBUTE_INFO_ARRAY [] |
BER decoding options
See Component balber_berdecoderoptions
anonymous enum |
anonymous enum |
balber::BerDecoderOptions::BerDecoderOptions | ( | ) |
Create an object of type BerDecoderOptions
having the default value.
balber::BerDecoderOptions::BerDecoderOptions | ( | const BerDecoderOptions & | original | ) |
Create a BderDecoderOptons
object having the same value as the specified original
.
balber::BerDecoderOptions::~BerDecoderOptions | ( | ) |
Destroy this object.
static int balber::BerDecoderOptions::maxSupportedBdexVersion | ( | int | versionSelector | ) | [static] |
Return the maximum valid BDEX format version, as indicated by the specified versionSelector
, to be passed to the bdexStreamOut
method. Note that it is highly recommended that versionSelector
be formatted as "YYYYMMDD", a date representation. Also note that versionSelector
should be a compile-time-chosen value that selects a format version supported by both externalizer and unexternalizer. See the bslx
package-level documentation for more information on BDEX streaming of value-semantic types and containers.
static int balber::BerDecoderOptions::maxSupportedBdexVersion | ( | ) | [static] |
Return the most current BDEX streaming version number supported by this class. See the bslx
package-level documentation for more information on BDEX streaming of value-semantic types and containers.
static const bdlat_AttributeInfo* balber::BerDecoderOptions::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* balber::BerDecoderOptions::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.
BerDecoderOptions& balber::BerDecoderOptions::operator= | ( | const BerDecoderOptions & | rhs | ) |
Assign to this object the value of the specified rhs
object.
STREAM& balber::BerDecoderOptions::bdexStreamIn | ( | STREAM & | stream, | |
int | version | |||
) |
Assign to this object the value read from the specified input stream
using the specified version
format, and return a reference to stream
. If stream
is initially invalid, this operation has no effect. If version
is not supported, this object is unaltered and stream
is invalidated, but otherwise unmodified. If version
is supported but stream
becomes invalid during this operation, this object has an undefined, but valid, state. Note that no version is read from stream
. See the bslx
package-level documentation for more information on BDEX streaming of value-semantic types and containers.
void balber::BerDecoderOptions::reset | ( | ) |
Reset this object to the default value (i.e., its value upon default construction).
int balber::BerDecoderOptions::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).
int balber::BerDecoderOptions::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.
int balber::BerDecoderOptions::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 balber::BerDecoderOptions::setMaxDepth | ( | int | value | ) |
Set the MaxDepth
attribute of this object to the specified value
.
void balber::BerDecoderOptions::setSkipUnknownElements | ( | bool | value | ) |
Set the SkipUnknownElements
attribute of this object to the specified value
.
void balber::BerDecoderOptions::setTraceLevel | ( | int | value | ) |
Set the TraceLevel
attribute of this object to the specified value
.
void balber::BerDecoderOptions::setMaxSequenceSize | ( | int | value | ) |
Set the MaxSequenceSize
attribute of this object to the specified value
.
void balber::BerDecoderOptions::setDefaultEmptyStrings | ( | bool | value | ) |
Set the DefaultEmptyStrings
attribute of this object to the specified value
.
bsl::ostream& balber::BerDecoderOptions::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.
STREAM& balber::BerDecoderOptions::bdexStreamOut | ( | STREAM & | stream, | |
int | version | |||
) | const |
Write the value of this object, using the specified version
format, to the specified output stream
, and return a reference to stream
. If stream
is initially invalid, this operation has no effect. If version
is not supported, stream
is invalidated, but otherwise unmodified. Note that version
is not written to stream
. See the bslx
package-level documentation for more information on BDEX streaming of value-semantic types and containers.
int balber::BerDecoderOptions::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).
int balber::BerDecoderOptions::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.
int balber::BerDecoderOptions::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.
const int& balber::BerDecoderOptions::maxDepth | ( | ) | const |
Return a reference to the non-modifiable "MaxDepth" attribute of this object.
const bool& balber::BerDecoderOptions::skipUnknownElements | ( | ) | const |
Return a reference to the non-modifiable "SkipUnknownElements" attribute of this object.
const int& balber::BerDecoderOptions::traceLevel | ( | ) | const |
Return a reference to the non-modifiable "TraceLevel" attribute of this object.
const int& balber::BerDecoderOptions::maxSequenceSize | ( | ) | const |
Return a reference to the non-modifiable "MaxSequenceSize" attribute of this object.
const bool& balber::BerDecoderOptions::defaultEmptyStrings | ( | ) | const |
Return a reference to the non-modifiable "DefaultEmptyStrings" attribute of this object.
const char balber::BerDecoderOptions::CLASS_NAME[] [static] |
const int balber::BerDecoderOptions::DEFAULT_MAX_DEPTH [static] |
const bool balber::BerDecoderOptions::DEFAULT_SKIP_UNKNOWN_ELEMENTS [static] |
const int balber::BerDecoderOptions::DEFAULT_TRACE_LEVEL [static] |
const int balber::BerDecoderOptions::DEFAULT_MAX_SEQUENCE_SIZE [static] |
const bool balber::BerDecoderOptions::DEFAULT_DEFAULT_EMPTY_STRINGS [static] |
const bdlat_AttributeInfo balber::BerDecoderOptions::ATTRIBUTE_INFO_ARRAY[] [static] |