BDE 4.39.x Production Release
Loading...
Searching...
No Matches
balber_berdecoderoptions.h
Go to the documentation of this file.
1/// @file balber_berdecoderoptions.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// balber_berdecoderoptions.h -*-C++-*-
8#ifndef INCLUDED_BALBER_BERDECODEROPTIONS
9#define INCLUDED_BALBER_BERDECODEROPTIONS
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup balber_berdecoderoptions balber_berdecoderoptions
15/// @brief Provide an attribute class for specifying BER decoding options.
16/// @addtogroup bal
17/// @{
18/// @addtogroup balber
19/// @{
20/// @addtogroup balber_berdecoderoptions
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#balber_berdecoderoptions-purpose"> Purpose</a>
25/// * <a href="#balber_berdecoderoptions-classes"> Classes </a>
26/// * <a href="#balber_berdecoderoptions-description"> Description </a>
27///
28/// # Purpose {#balber_berdecoderoptions-purpose}
29/// Provide an attribute class for specifying BER decoding options.
30///
31/// # Classes {#balber_berdecoderoptions-classes}
32///
33/// - balber::BerDecoderOptions: options for decoding objects in BDE format
34///
35/// # Description {#balber_berdecoderoptions-description}
36/// Schema of options records for `balber` codecs
37/// @}
38/** @} */
39/** @} */
40
41/** @addtogroup bal
42 * @{
43 */
44/** @addtogroup balber
45 * @{
46 */
47/** @addtogroup balber_berdecoderoptions
48 * @{
49 */
50
51#include <balscm_version.h>
52
53#include <bdlat_attributeinfo.h>
54#include <bdlat_typetraits.h>
56
57#include <bdlb_printmethods.h>
58
59#include <bsls_assert.h>
60
63
64#include <bsl_iosfwd.h>
65
66
67namespace balber {
68
69 // =======================
70 // class BerDecoderOptions
71 // =======================
72
73/// BER decoding options
74///
75/// See @ref balber_berdecoderoptions
77
78 private:
79 int d_maxDepth; // maximum recursion depth
80 int d_traceLevel; // trace (verbosity) level
81 int d_maxSequenceSize; // maximum sequence size
82 bool d_skipUnknownElements; // if 'true', skip unknown elements
83 bool d_defaultEmptyStrings; // if 'true', decode empty strings as their
84 // default values, if any
85
86 public:
87 // TYPES
88 enum {
89 k_NUM_ATTRIBUTES = 5 // the number of attributes in this class
90
91#ifndef BDE_OMIT_INTERNAL_DEPRECATED
93#endif // BDE_OMIT_INTERNAL_DEPRECATED
94 };
95
96 enum {
97 /// index for "MaxDepth" attribute
100 // index for "SkipUnknownElements" attribute
102 // index for "TraceLevel" attribute
104 // index for "MaxSequenceSize" attribute
106 // index for "DefaultEmptyStrings" attribute
107
108#ifndef BDE_OMIT_INTERNAL_DEPRECATED
119#endif // BDE_OMIT_INTERNAL_DEPRECATED
120 };
121
122 enum {
123 /// id for `MaxDepth` attribute
126 // id for 'SkipUnknownElements' attribute
128 // id for 'TraceLevel' attribute
130 // id for 'MaxSequenceSize' attribute
132 // id for 'DefaultEmptyStrnigs" attribute
133
134#ifndef BDE_OMIT_INTERNAL_DEPRECATED
142#endif // BDE_OMIT_INTERNAL_DEPRECATED
143 };
144
145 public:
146 // CONSTANTS
147
148 /// the name of this class (i.e., "BerDecoderOptions")
149 static const char CLASS_NAME[];
150
151 /// default value of `MaxDepth` attribute
152 static const int DEFAULT_MAX_DEPTH;
153
154 /// default value of `SkipUnknownElements` attribute
156
157 /// default value of `TraceLevel` attribute
158 static const int DEFAULT_TRACE_LEVEL;
159
160 /// default value of `MaxSequenceSize` attribute
162
163 /// default value of `DefaultEmptyStrings` attribute
165
166 /// attribute information for each attribute
168
169 public:
170 // CLASS METHODS
171
172 /// Return the maximum valid BDEX format version, as indicated by the
173 /// specified `versionSelector`, to be passed to the `bdexStreamOut` method.
174 ///
175 /// \note Note that it is highly recommended that `versionSelector`
176 /// be formatted as "YYYYMMDD", a date representation. Also note that
177 /// `versionSelector` should be a *compile*-time-chosen value that
178 /// selects a format version supported by both externalizer and
179 /// unexternalizer. See the `bslx` package-level documentation for more
180 /// information on BDEX streaming of value-semantic types and
181 /// containers.
182 static int maxSupportedBdexVersion(int versionSelector);
183
184#ifndef BDE_OMIT_INTERNAL_DEPRECATED
185
186 /// Return the most current BDEX streaming version number supported by
187 /// this class. See the `bslx` package-level documentation for more
188 /// information on BDEX streaming of value-semantic types and
189 /// containers.
190 static int maxSupportedBdexVersion();
191
192#endif // BDE_OMIT_INTERNAL_DEPRECATED
193
194 /// Return attribute information for the attribute indicated by the
195 /// specified `id` if the attribute exists, and 0 otherwise.
197
198 /// Return attribute information for the attribute indicated by the
199 /// specified `name` of the specified `nameLength` if the attribute
200 /// exists, and 0 otherwise.
202 const char *name,
203 int nameLength);
204
205 // CREATORS
206
207 /// Create an object of type `BerDecoderOptions` having the default
208 /// value.
210
211 /// Create a 'BderDecoderOptons' object having the same value as the
212 /// specified 'original'.
213 BerDecoderOptions(const BerDecoderOptions& original) = default;
214
215 /// Destroy this object.
217
218 // MANIPULATORS
219
220 /// Assign to this object the value of the specified 'rhs' object.
222
223 /// Assign to this object the value read from the specified input
224 /// `stream` using the specified `version` format, and return a
225 /// reference to `stream`. If `stream` is initially invalid, this
226 /// operation has no effect. If `version` is not supported, this object
227 /// is unaltered and `stream` is invalidated, but otherwise unmodified.
228 /// If `version` is supported but `stream` becomes invalid during this
229 /// operation, this object has an undefined, but valid, state.
230 ///
231 /// \note Note that no version is read from `stream`. See the `bslx` package-level
232 /// documentation for more information on BDEX streaming of
233 /// value-semantic types and containers.
234 template <class STREAM>
235 STREAM& bdexStreamIn(STREAM& stream, int version);
236
237 /// Reset this object to the default value (i.e., its value upon default
238 /// construction).
239 void reset();
240
241 /// Invoke the specified `manipulator` sequentially on the address of
242 /// each (modifiable) attribute of this object, supplying `manipulator`
243 /// with the corresponding attribute information structure until such
244 /// invocation returns a non-zero value. Return the value from the last
245 /// invocation of `manipulator` (i.e., the invocation that terminated
246 /// the sequence).
247 template<class MANIPULATOR>
248 int manipulateAttributes(MANIPULATOR& manipulator);
249
250 /// Invoke the specified `manipulator` on the address of the
251 /// (modifiable) attribute indicated by the specified `id`, supplying
252 /// `manipulator` with the corresponding attribute information
253 /// structure. Return the value returned from the invocation of
254 /// `manipulator` if `id` identifies an attribute of this class, and -1
255 /// otherwise.
256 template<class MANIPULATOR>
257 int manipulateAttribute(MANIPULATOR& manipulator, int id);
258
259 /// Invoke the specified `manipulator` on the address of the
260 /// (modifiable) attribute indicated by the specified `name` of the
261 /// specified `nameLength`, supplying `manipulator` with the
262 /// corresponding attribute information structure. Return the value
263 /// returned from the invocation of `manipulator` if `name` identifies
264 /// an attribute of this class, and -1 otherwise.
265 template<class MANIPULATOR>
266 int manipulateAttribute(MANIPULATOR& manipulator,
267 const char *name,
268 int nameLength);
269
270 /// Set the `MaxDepth` attribute of this object to the specified
271 /// `value`.
272 void setMaxDepth(int value);
273
274 /// Set the `SkipUnknownElements` attribute of this object to the
275 /// specified `value`.
276 void setSkipUnknownElements(bool value);
277
278 /// Set the `TraceLevel` attribute of this object to the specified
279 /// `value`.
280 void setTraceLevel(int value);
281
282 /// Set the `MaxSequenceSize` attribute of this object to the specified
283 /// `value`.
284 void setMaxSequenceSize(int value);
285
286 /// Set the `DefaultEmptyStrings` attribute of this object to the
287 /// specified `value`.
288 void setDefaultEmptyStrings(bool value);
289
290 // ACCESSORS
291
292 /// Format this object to the specified output `stream` at the
293 /// optionally specified indentation `level` and return a reference to
294 /// the modifiable `stream`. If `level` is specified, optionally
295 /// specify `spacesPerLevel`, the number of spaces per indentation level
296 /// for this and all of its nested objects. Each line is indented by
297 /// the absolute value of `level * spacesPerLevel`. If `level` is
298 /// negative, suppress indentation of the first line. If
299 /// `spacesPerLevel` is negative, suppress line breaks and format the
300 /// entire output on one line. If `stream` is initially invalid, this operation has no effect.
301 ///
302 /// \note Note that a trailing newline is provided
303 /// in multiline mode only.
304 bsl::ostream& print(bsl::ostream& stream,
305 int level = 0,
306 int spacesPerLevel = 4) const;
307
308 /// Write the value of this object, using the specified `version`
309 /// format, to the specified output `stream`, and return a reference to
310 /// `stream`. If `stream` is initially invalid, this operation has no
311 /// effect. If `version` is not supported, `stream` is invalidated, but otherwise unmodified.
312 ///
313 /// \note Note that `version` is not written to
314 /// `stream`. See the `bslx` package-level documentation for more
315 /// information on BDEX streaming of value-semantic types and
316 /// containers.
317 template <class STREAM>
318 STREAM& bdexStreamOut(STREAM& stream, int version) const;
319
320 /// Invoke the specified `accessor` sequentially on each
321 /// (non-modifiable) attribute of this object, supplying `accessor` with
322 /// the corresponding attribute information structure until such
323 /// invocation returns a non-zero value. Return the value from the last
324 /// invocation of `accessor` (i.e., the invocation that terminated the
325 /// sequence).
326 template<class ACCESSOR>
327 int accessAttributes(ACCESSOR& accessor) const;
328
329 /// Invoke the specified `accessor` on the (non-modifiable) attribute of
330 /// this object indicated by the specified `id`, supplying `accessor`
331 /// with the corresponding attribute information structure. Return the
332 /// value returned from the invocation of `accessor` if `id` identifies
333 /// an attribute of this class, and -1 otherwise.
334 template<class ACCESSOR>
335 int accessAttribute(ACCESSOR& accessor, int id) const;
336
337 /// Invoke the specified `accessor` on the (non-modifiable) attribute of
338 /// this object indicated by the specified `name` of the specified
339 /// `nameLength`, supplying `accessor` with the corresponding attribute
340 /// information structure. Return the value returned from the
341 /// invocation of `accessor` if `name` identifies an attribute of this
342 /// class, and -1 otherwise.
343 template<class ACCESSOR>
344 int accessAttribute(ACCESSOR& accessor,
345 const char *name,
346 int nameLength) const;
347
348 /// Return a reference to the non-modifiable "MaxDepth" attribute of
349 /// this object.
350 const int& maxDepth() const;
351
352 /// Return a reference to the non-modifiable "SkipUnknownElements"
353 /// attribute of this object.
354 const bool& skipUnknownElements() const;
355
356 /// Return a reference to the non-modifiable "TraceLevel" attribute of
357 /// this object.
358 const int& traceLevel() const;
359
360 /// Return a reference to the non-modifiable "MaxSequenceSize" attribute
361 /// of this object.
362 const int& maxSequenceSize() const;
363
364 /// Return a reference to the non-modifiable "DefaultEmptyStrings"
365 /// attribute of this object.
366 const bool& defaultEmptyStrings() const;
367};
368
369// FREE OPERATORS
370
371/// Return `true` if the specified `lhs` and `rhs` attribute objects have
372/// the same value, and `false` otherwise. Two attribute objects have the
373/// same value if each respective attribute has the same value.
374inline
375bool operator==(const BerDecoderOptions& lhs,
376 const BerDecoderOptions& rhs);
377
378/// Return `true` if the specified `lhs` and `rhs` attribute objects do not
379/// have the same value, and `false` otherwise. Two attribute objects do
380/// not have the same value if one or more respective attributes differ in
381/// values.
382inline
383bool operator!=(const BerDecoderOptions& lhs,
384 const BerDecoderOptions& rhs);
385
386/// Format the specified `rhs` to the specified output `stream` and return a
387/// reference providing modifiable access to `stream`.
388inline
389bsl::ostream& operator<<(bsl::ostream& stream,
390 const BerDecoderOptions& rhs);
391
392} // close package namespace
393
394
395// TRAITS
397
398namespace balber {
399
400// ============================================================================
401// INLINE FUNCTION DEFINITIONS
402// ============================================================================
403
404 // -----------------------
405 // class BerDecoderOptions
406 // -----------------------
407
408// CLASS METHODS
409inline
410int BerDecoderOptions::maxSupportedBdexVersion(int /* versionSelector */)
411{
412 return 1; // versions start at 1
413}
414
415#ifndef BDE_OMIT_INTERNAL_DEPRECATED
416
417inline
422
423#endif // BDE_OMIT_INTERNAL_DEPRECATED
424
425// CREATORS
426inline
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)
433{
434}
435
436// MANIPULATORS
437template <class STREAM>
438inline
439STREAM& BerDecoderOptions::bdexStreamIn(STREAM& stream, int version)
440{
441 if (stream) {
442 switch (version) { // Switch on the schema version (starting with 1).
443 case 1: {
444 bslx::InStreamFunctions::bdexStreamIn(stream, d_maxDepth, 1);
446 d_skipUnknownElements, 1);
447 bslx::InStreamFunctions::bdexStreamIn(stream, d_traceLevel, 1);
449 d_maxSequenceSize, 1);
451 d_defaultEmptyStrings, 1);
452 } break;
453 default: {
454 stream.invalidate();
455 }
456 }
457 }
458 return stream;
459}
460
461inline
463{
464 d_maxDepth = DEFAULT_MAX_DEPTH;
465 d_traceLevel = DEFAULT_TRACE_LEVEL;
466 d_maxSequenceSize = DEFAULT_MAX_SEQUENCE_SIZE;
467 d_skipUnknownElements = DEFAULT_SKIP_UNKNOWN_ELEMENTS;
468 d_defaultEmptyStrings = DEFAULT_DEFAULT_EMPTY_STRINGS;
469}
470
471template <class MANIPULATOR>
472inline
473int BerDecoderOptions::manipulateAttributes(MANIPULATOR& manipulator)
474{
475 int ret;
476
477 ret = manipulator(&d_maxDepth,
479 if (ret) {
480 return ret; // RETURN
481 }
482
483 ret = manipulator(
484 &d_skipUnknownElements,
486 if (ret) {
487 return ret; // RETURN
488 }
489
490 ret = manipulator(&d_traceLevel,
492 if (ret) {
493 return ret; // RETURN
494 }
495
496 ret = manipulator(
497 &d_maxSequenceSize,
499 if (ret) {
500 return ret; // RETURN
501 }
502
503 ret = manipulator(
504 &d_defaultEmptyStrings,
506 if (ret) {
507 return ret; // RETURN
508 }
509
510 return ret;
511}
512
513template <class MANIPULATOR>
514inline
515int BerDecoderOptions::manipulateAttribute(MANIPULATOR& manipulator, int id)
516{
517 enum { k_NOT_FOUND = -1 };
518
519 switch (id) {
521 return manipulator(&d_maxDepth,
523 // RETURN
524 } break;
526 return manipulator(
527 &d_skipUnknownElements,
529 // RETURN
530 } break;
532 return manipulator(
533 &d_traceLevel,
535 // RETURN
536 } break;
538 return manipulator(
539 &d_maxSequenceSize,
541 // RETURN
542 } break;
544 return manipulator(
545 &d_defaultEmptyStrings,
547 // RETURN
548 } break;
549 default:
550 return k_NOT_FOUND;
551 }
552}
553
554template <class MANIPULATOR>
555inline
556int BerDecoderOptions::manipulateAttribute(MANIPULATOR& manipulator,
557 const char *name,
558 int nameLength)
559{
560 enum { k_NOT_FOUND = -1 };
561
562 const bdlat_AttributeInfo *attributeInfo = lookupAttributeInfo(name,
563 nameLength);
564 if (!attributeInfo) {
565 return k_NOT_FOUND; // RETURN
566 }
567
568 return manipulateAttribute(manipulator, attributeInfo->d_id);
569}
570
571inline
573{
574 d_maxDepth = value;
575}
576
577inline
579{
580 d_skipUnknownElements = value;
581}
582
583inline
585{
586 d_traceLevel = value;
587}
588
589inline
591{
592 d_maxSequenceSize = value;
593}
594
595inline
597{
598 d_defaultEmptyStrings = value;
599}
600
601// ACCESSORS
602template <class STREAM>
603inline
604STREAM& BerDecoderOptions::bdexStreamOut(STREAM& stream,
605 int version) const
606{
607 switch (version) {
608 case 1: {
609 bslx::OutStreamFunctions::bdexStreamOut(stream, d_maxDepth, 1);
611 stream, d_skipUnknownElements, 1);
612 bslx::OutStreamFunctions::bdexStreamOut(stream, d_traceLevel, 1);
613 bslx::OutStreamFunctions::bdexStreamOut(stream, d_maxSequenceSize, 1);
615 stream, d_defaultEmptyStrings, 1);
616 } break;
617 default: {
618 stream.invalidate();
619 } break;
620 }
621 return stream;
622}
623
624template <class ACCESSOR>
625inline
626int BerDecoderOptions::accessAttributes(ACCESSOR& accessor) const
627{
628 int ret;
629
630 ret = accessor(d_maxDepth,
632 if (ret) {
633 return ret; // RETURN
634 }
635
636 ret = accessor(
637 d_skipUnknownElements,
639 if (ret) {
640 return ret; // RETURN
641 }
642
643 ret = accessor(d_traceLevel,
645 if (ret) {
646 return ret; // RETURN
647 }
648
649 ret = accessor(d_maxSequenceSize,
651 if (ret) {
652 return ret; // RETURN
653 }
654
655 ret = accessor(
656 d_defaultEmptyStrings,
658 if (ret) {
659 return ret; // RETURN
660 }
661
662 return ret;
663}
664
665template <class ACCESSOR>
666inline
667int BerDecoderOptions::accessAttribute(ACCESSOR& accessor, int id) const
668{
669 enum { k_NOT_FOUND = -1 };
670
671 switch (id) {
673 return accessor(d_maxDepth,
675 // RETURN
676 } break;
678 return accessor(
679 d_skipUnknownElements,
681 // RETURN
682 } break;
684 return accessor(d_traceLevel,
686 // RETURN
687 } break;
689 return accessor(
690 d_maxSequenceSize,
692 // RETURN
693 } break;
695 return accessor(
696 d_defaultEmptyStrings,
698 // RETURN
699 } break;
700 default:
701 return k_NOT_FOUND;
702 }
703}
704
705template <class ACCESSOR>
706inline
708 const char *name,
709 int nameLength) const
710{
711 enum { k_NOT_FOUND = -1 };
712
713 const bdlat_AttributeInfo *attributeInfo = lookupAttributeInfo(name,
714 nameLength);
715 if (!attributeInfo) {
716 return k_NOT_FOUND; // RETURN
717 }
718
719 return accessAttribute(accessor, attributeInfo->d_id);
720}
721
722inline
724{
725 return d_maxDepth;
726}
727
728inline
730{
731 return d_skipUnknownElements;
732}
733
734inline
736{
737 return d_traceLevel;
738}
739
740inline
742{
743 return d_maxSequenceSize;
744}
745
746inline
748{
749 return d_defaultEmptyStrings;
750}
751
752} // close package namespace
753
754// FREE FUNCTIONS
755inline
756bool balber::operator==(const BerDecoderOptions& lhs,
757 const BerDecoderOptions& rhs)
758{
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();
764}
765
766inline
767bool balber::operator!=(const BerDecoderOptions& lhs,
768 const BerDecoderOptions& rhs)
769{
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();
775}
776
777inline
778bsl::ostream& balber::operator<<(bsl::ostream& stream,
779 const BerDecoderOptions& rhs)
780{
781 return rhs.print(stream, 0, -1);
782}
783
784
785#endif
786
787// ----------------------------------------------------------------------------
788// Copyright 2015 Bloomberg Finance L.P.
789//
790// Licensed under the Apache License, Version 2.0 (the "License");
791// you may not use this file except in compliance with the License.
792// You may obtain a copy of the License at
793//
794// http://www.apache.org/licenses/LICENSE-2.0
795//
796// Unless required by applicable law or agreed to in writing, software
797// distributed under the License is distributed on an "AS IS" BASIS,
798// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
799// See the License for the specific language governing permissions and
800// limitations under the License.
801// ----------------------------- END-OF-FILE ----------------------------------
802
803/** @} */
804/** @} */
805/** @} */
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