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
184#ifndef BDE_OMIT_INTERNAL_DEPRECATED
234 template <
class STREAM>
247 template<
class MANIPULATOR>
256 template<
class MANIPULATOR>
265 template<
class MANIPULATOR>
304 bsl::ostream&
print(bsl::ostream& stream,
306 int spacesPerLevel = 4)
const;
317 template <
class STREAM>
326 template<
class ACCESSOR>
334 template<
class ACCESSOR>
343 template<
class ACCESSOR>
346 int nameLength)
const;
415#ifndef BDE_OMIT_INTERNAL_DEPRECATED
428: d_maxDepth(DEFAULT_MAX_DEPTH)
429, d_traceLevel(DEFAULT_TRACE_LEVEL)
430, d_maxSequenceSize(DEFAULT_MAX_SEQUENCE_SIZE)
431, d_skipUnknownElements(DEFAULT_SKIP_UNKNOWN_ELEMENTS)
432, d_defaultEmptyStrings(DEFAULT_DEFAULT_EMPTY_STRINGS)
437template <
class STREAM>
446 d_skipUnknownElements, 1);
449 d_maxSequenceSize, 1);
451 d_defaultEmptyStrings, 1);
471template <
class MANIPULATOR>
477 ret = manipulator(&d_maxDepth,
484 &d_skipUnknownElements,
490 ret = manipulator(&d_traceLevel,
504 &d_defaultEmptyStrings,
513template <
class MANIPULATOR>
517 enum { k_NOT_FOUND = -1 };
521 return manipulator(&d_maxDepth,
527 &d_skipUnknownElements,
545 &d_defaultEmptyStrings,
554template <
class MANIPULATOR>
560 enum { k_NOT_FOUND = -1 };
564 if (!attributeInfo) {
580 d_skipUnknownElements = value;
586 d_traceLevel = value;
592 d_maxSequenceSize = value;
598 d_defaultEmptyStrings = value;
602template <
class STREAM>
611 stream, d_skipUnknownElements, 1);
615 stream, d_defaultEmptyStrings, 1);
624template <
class ACCESSOR>
630 ret = accessor(d_maxDepth,
637 d_skipUnknownElements,
643 ret = accessor(d_traceLevel,
649 ret = accessor(d_maxSequenceSize,
656 d_defaultEmptyStrings,
665template <
class ACCESSOR>
669 enum { k_NOT_FOUND = -1 };
673 return accessor(d_maxDepth,
679 d_skipUnknownElements,
684 return accessor(d_traceLevel,
696 d_defaultEmptyStrings,
705template <
class ACCESSOR>
709 int nameLength)
const
711 enum { k_NOT_FOUND = -1 };
715 if (!attributeInfo) {
731 return d_skipUnknownElements;
743 return d_maxSequenceSize;
749 return d_defaultEmptyStrings;
757 const BerDecoderOptions& rhs)
759 return lhs.maxDepth() == rhs.maxDepth()
760 && lhs.skipUnknownElements() == rhs.skipUnknownElements()
761 && lhs.traceLevel() == rhs.traceLevel()
762 && lhs.maxSequenceSize() == rhs.maxSequenceSize()
763 && lhs.defaultEmptyStrings() == rhs.defaultEmptyStrings();
768 const BerDecoderOptions& rhs)
770 return lhs.maxDepth() !=
rhs.maxDepth()
771 ||
lhs.skipUnknownElements() !=
rhs.skipUnknownElements()
772 ||
lhs.traceLevel() !=
rhs.traceLevel()
773 ||
lhs.maxSequenceSize() !=
rhs.maxSequenceSize()
774 ||
lhs.defaultEmptyStrings() !=
rhs.defaultEmptyStrings();
779 const BerDecoderOptions& rhs)
781 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:584
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:604
const bool & skipUnknownElements() const
Definition balber_berdecoderoptions.h:729
int manipulateAttributes(MANIPULATOR &manipulator)
Definition balber_berdecoderoptions.h:473
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:735
STREAM & bdexStreamIn(STREAM &stream, int version)
Definition balber_berdecoderoptions.h:439
void setMaxDepth(int value)
Definition balber_berdecoderoptions.h:572
@ 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:418
@ 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:578
void reset()
Definition balber_berdecoderoptions.h:462
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:626
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:747
void setMaxSequenceSize(int value)
Definition balber_berdecoderoptions.h:590
const int & maxSequenceSize() const
Definition balber_berdecoderoptions.h:741
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:515
BerDecoderOptions()
Definition balber_berdecoderoptions.h:427
void setDefaultEmptyStrings(bool value)
Definition balber_berdecoderoptions.h:596
int accessAttribute(ACCESSOR &accessor, int id) const
Definition balber_berdecoderoptions.h:667
const int & maxDepth() const
Definition balber_berdecoderoptions.h:723
#define BDLAT_DECL_SEQUENCE_TRAITS(ClassName)
Definition bdlat_typetraits.h:279
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition balber_berconstants.h:84
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)
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
ALLOCATOR & lhs
Definition bslstl_string.h:3917
STREAM & bdexStreamIn(STREAM &stream, VALUE_TYPE &variable)
Definition bslx_instreamfunctions.h:1263
STREAM & bdexStreamOut(STREAM &stream, const TYPE &value)
Definition bslx_outstreamfunctions.h:1004
Definition bdlat_attributeinfo.h:139
int d_id
Definition bdlat_attributeinfo.h:142