8#ifndef INCLUDED_BALBER_BERDECODEROPTIONS
9#define INCLUDED_BALBER_BERDECODEROPTIONS
51#include <balscm_version.h>
64#include <bsl_iosfwd.h>
81 int d_maxSequenceSize;
82 bool d_skipUnknownElements;
83 bool d_defaultEmptyStrings;
91#ifndef BDE_OMIT_INTERNAL_DEPRECATED
108#ifndef BDE_OMIT_INTERNAL_DEPRECATED
134#ifndef BDE_OMIT_INTERNAL_DEPRECATED
183#ifndef BDE_OMIT_INTERNAL_DEPRECATED
232 template <
class STREAM>
245 template<
class MANIPULATOR>
254 template<
class MANIPULATOR>
263 template<
class MANIPULATOR>
301 bsl::ostream&
print(bsl::ostream& stream,
303 int spacesPerLevel = 4)
const;
313 template <
class STREAM>
322 template<
class ACCESSOR>
330 template<
class ACCESSOR>
339 template<
class ACCESSOR>
342 int nameLength)
const;
411#ifndef BDE_OMIT_INTERNAL_DEPRECATED
424: d_maxDepth(DEFAULT_MAX_DEPTH)
425, d_traceLevel(DEFAULT_TRACE_LEVEL)
426, d_maxSequenceSize(DEFAULT_MAX_SEQUENCE_SIZE)
427, d_skipUnknownElements(DEFAULT_SKIP_UNKNOWN_ELEMENTS)
428, d_defaultEmptyStrings(DEFAULT_DEFAULT_EMPTY_STRINGS)
433template <
class STREAM>
442 d_skipUnknownElements, 1);
445 d_maxSequenceSize, 1);
447 d_defaultEmptyStrings, 1);
467template <
class MANIPULATOR>
473 ret = manipulator(&d_maxDepth,
480 &d_skipUnknownElements,
486 ret = manipulator(&d_traceLevel,
500 &d_defaultEmptyStrings,
509template <
class MANIPULATOR>
513 enum { k_NOT_FOUND = -1 };
517 return manipulator(&d_maxDepth,
523 &d_skipUnknownElements,
541 &d_defaultEmptyStrings,
550template <
class MANIPULATOR>
556 enum { k_NOT_FOUND = -1 };
560 if (!attributeInfo) {
576 d_skipUnknownElements = value;
582 d_traceLevel = value;
588 d_maxSequenceSize = value;
594 d_defaultEmptyStrings = value;
598template <
class STREAM>
607 stream, d_skipUnknownElements, 1);
611 stream, d_defaultEmptyStrings, 1);
620template <
class ACCESSOR>
626 ret = accessor(d_maxDepth,
633 d_skipUnknownElements,
639 ret = accessor(d_traceLevel,
645 ret = accessor(d_maxSequenceSize,
652 d_defaultEmptyStrings,
661template <
class ACCESSOR>
665 enum { k_NOT_FOUND = -1 };
669 return accessor(d_maxDepth,
675 d_skipUnknownElements,
680 return accessor(d_traceLevel,
692 d_defaultEmptyStrings,
701template <
class ACCESSOR>
705 int nameLength)
const
707 enum { k_NOT_FOUND = -1 };
711 if (!attributeInfo) {
727 return d_skipUnknownElements;
739 return d_maxSequenceSize;
745 return d_defaultEmptyStrings;
753 const BerDecoderOptions& rhs)
755 return lhs.maxDepth() == rhs.maxDepth()
756 && lhs.skipUnknownElements() == rhs.skipUnknownElements()
757 && lhs.traceLevel() == rhs.traceLevel()
758 && lhs.maxSequenceSize() == rhs.maxSequenceSize()
759 && lhs.defaultEmptyStrings() == rhs.defaultEmptyStrings();
764 const BerDecoderOptions& rhs)
766 return lhs.maxDepth() != rhs.maxDepth()
767 || lhs.skipUnknownElements() != rhs.skipUnknownElements()
768 || lhs.traceLevel() != rhs.traceLevel()
769 || lhs.maxSequenceSize() != rhs.maxSequenceSize()
770 || lhs.defaultEmptyStrings() != rhs.defaultEmptyStrings();
775 const BerDecoderOptions& rhs)
777 return rhs.print(stream, 0, -1);
Definition balber_berdecoderoptions.h:76
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
void setTraceLevel(int value)
Definition balber_berdecoderoptions.h:580
static const bool DEFAULT_SKIP_UNKNOWN_ELEMENTS
default value of SkipUnknownElements attribute
Definition balber_berdecoderoptions.h:155
static const char CLASS_NAME[]
the name of this class (i.e., "BerDecoderOptions")
Definition balber_berdecoderoptions.h:149
@ e_ATTRIBUTE_INDEX_DEFAULT_EMPTY_STRINGS
Definition balber_berdecoderoptions.h:105
@ e_ATTRIBUTE_INDEX_TRACE_LEVEL
Definition balber_berdecoderoptions.h:101
@ ATTRIBUTE_INDEX_MAX_DEPTH
Definition balber_berdecoderoptions.h:109
@ e_ATTRIBUTE_INDEX_MAX_DEPTH
index for "MaxDepth" attribute
Definition balber_berdecoderoptions.h:98
@ e_ATTRIBUTE_INDEX_MAX_SEQUENCE_SIZE
Definition balber_berdecoderoptions.h:103
@ ATTRIBUTE_INDEX_MAX_SEQUENCE_SIZE
Definition balber_berdecoderoptions.h:115
@ ATTRIBUTE_INDEX_DEFAULT_EMPTY_STRINGS
Definition balber_berdecoderoptions.h:117
@ ATTRIBUTE_INDEX_TRACE_LEVEL
Definition balber_berdecoderoptions.h:113
@ ATTRIBUTE_INDEX_SKIP_UNKNOWN_ELEMENTS
Definition balber_berdecoderoptions.h:111
@ e_ATTRIBUTE_INDEX_SKIP_UNKNOWN_ELEMENTS
Definition balber_berdecoderoptions.h:99
~BerDecoderOptions()=default
Destroy this object.
STREAM & bdexStreamOut(STREAM &stream, int version) const
Definition balber_berdecoderoptions.h:600
const bool & skipUnknownElements() const
Definition balber_berdecoderoptions.h:725
int manipulateAttributes(MANIPULATOR &manipulator)
Definition balber_berdecoderoptions.h:469
static const bool DEFAULT_DEFAULT_EMPTY_STRINGS
default value of DefaultEmptyStrings attribute
Definition balber_berdecoderoptions.h:164
const int & traceLevel() const
Definition balber_berdecoderoptions.h:731
STREAM & bdexStreamIn(STREAM &stream, int version)
Definition balber_berdecoderoptions.h:435
void setMaxDepth(int value)
Definition balber_berdecoderoptions.h:568
@ ATTRIBUTE_ID_MAX_SEQUENCE_SIZE
Definition balber_berdecoderoptions.h:139
@ ATTRIBUTE_ID_MAX_DEPTH
Definition balber_berdecoderoptions.h:135
@ ATTRIBUTE_ID_SKIP_UNKNOWN_ELEMENTS
Definition balber_berdecoderoptions.h:136
@ e_ATTRIBUTE_ID_DEFAULT_EMPTY_STRINGS
Definition balber_berdecoderoptions.h:131
@ e_ATTRIBUTE_ID_MAX_DEPTH
id for MaxDepth attribute
Definition balber_berdecoderoptions.h:124
@ e_ATTRIBUTE_ID_TRACE_LEVEL
Definition balber_berdecoderoptions.h:127
@ ATTRIBUTE_ID_DEFAULT_EMPTY_STRINGS
Definition balber_berdecoderoptions.h:140
@ e_ATTRIBUTE_ID_MAX_SEQUENCE_SIZE
Definition balber_berdecoderoptions.h:129
@ ATTRIBUTE_ID_TRACE_LEVEL
Definition balber_berdecoderoptions.h:138
@ e_ATTRIBUTE_ID_SKIP_UNKNOWN_ELEMENTS
Definition balber_berdecoderoptions.h:125
BerDecoderOptions(const BerDecoderOptions &original)=default
static int maxSupportedBdexVersion()
Definition balber_berdecoderoptions.h:414
@ k_NUM_ATTRIBUTES
Definition balber_berdecoderoptions.h:89
@ NUM_ATTRIBUTES
Definition balber_berdecoderoptions.h:92
static const int DEFAULT_TRACE_LEVEL
default value of TraceLevel attribute
Definition balber_berdecoderoptions.h:158
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
static const int DEFAULT_MAX_DEPTH
default value of MaxDepth attribute
Definition balber_berdecoderoptions.h:152
void setSkipUnknownElements(bool value)
Definition balber_berdecoderoptions.h:574
void reset()
Definition balber_berdecoderoptions.h:458
BerDecoderOptions & operator=(const BerDecoderOptions &rhs)=default
Assign to this object the value of the specified 'rhs' object.
int accessAttributes(ACCESSOR &accessor) const
Definition balber_berdecoderoptions.h:622
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
attribute information for each attribute
Definition balber_berdecoderoptions.h:167
const bool & defaultEmptyStrings() const
Definition balber_berdecoderoptions.h:743
void setMaxSequenceSize(int value)
Definition balber_berdecoderoptions.h:586
const int & maxSequenceSize() const
Definition balber_berdecoderoptions.h:737
static const int DEFAULT_MAX_SEQUENCE_SIZE
default value of MaxSequenceSize attribute
Definition balber_berdecoderoptions.h:161
int manipulateAttribute(MANIPULATOR &manipulator, int id)
Definition balber_berdecoderoptions.h:511
BerDecoderOptions()
Definition balber_berdecoderoptions.h:423
void setDefaultEmptyStrings(bool value)
Definition balber_berdecoderoptions.h:592
int accessAttribute(ACCESSOR &accessor, int id) const
Definition balber_berdecoderoptions.h:663
const int & maxDepth() const
Definition balber_berdecoderoptions.h:719
#define BDLAT_DECL_SEQUENCE_TRAITS(ClassName)
Definition bdlat_typetraits.h:260
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition balber_berconstants.h:82
bsl::ostream & operator<<(bsl::ostream &stream, BerConstants::TagClass tagClass)
bool operator!=(const BerDecoderOptions &lhs, const BerDecoderOptions &rhs)
bool operator==(const BerDecoderOptions &lhs, const BerDecoderOptions &rhs)
STREAM & bdexStreamIn(STREAM &stream, VALUE_TYPE &variable)
Definition bslx_instreamfunctions.h:1247
STREAM & bdexStreamOut(STREAM &stream, const TYPE &value)
Definition bslx_outstreamfunctions.h:992
Definition bdlat_attributeinfo.h:137
int d_id
Definition bdlat_attributeinfo.h:140