BDE 4.14.0 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`
174 /// method. Note that it is highly recommended that `versionSelector`
175 /// be formatted as "YYYYMMDD", a date representation. Also note that
176 /// `versionSelector` should be a *compile*-time-chosen value that
177 /// selects a format version supported by both externalizer and
178 /// unexternalizer. See the `bslx` package-level documentation for more
179 /// information on BDEX streaming of value-semantic types and
180 /// containers.
181 static int maxSupportedBdexVersion(int versionSelector);
182
183#ifndef BDE_OMIT_INTERNAL_DEPRECATED
184
185 /// Return the most current BDEX streaming version number supported by
186 /// this class. See the `bslx` package-level documentation for more
187 /// information on BDEX streaming of value-semantic types and
188 /// containers.
189 static int maxSupportedBdexVersion();
190
191#endif // BDE_OMIT_INTERNAL_DEPRECATED
192
193 /// Return attribute information for the attribute indicated by the
194 /// specified `id` if the attribute exists, and 0 otherwise.
196
197 /// Return attribute information for the attribute indicated by the
198 /// specified `name` of the specified `nameLength` if the attribute
199 /// exists, and 0 otherwise.
201 const char *name,
202 int nameLength);
203
204 // CREATORS
205
206 /// Create an object of type `BerDecoderOptions` having the default
207 /// value.
209
210 /// Create a 'BderDecoderOptons' object having the same value as the
211 /// specified 'original'.
212 BerDecoderOptions(const BerDecoderOptions& original) = default;
213
214 /// Destroy this object.
216
217 // MANIPULATORS
218
219 /// Assign to this object the value of the specified 'rhs' object.
221
222 /// Assign to this object the value read from the specified input
223 /// `stream` using the specified `version` format, and return a
224 /// reference to `stream`. If `stream` is initially invalid, this
225 /// operation has no effect. If `version` is not supported, this object
226 /// is unaltered and `stream` is invalidated, but otherwise unmodified.
227 /// If `version` is supported but `stream` becomes invalid during this
228 /// operation, this object has an undefined, but valid, state. Note
229 /// that no version is read from `stream`. See the `bslx` package-level
230 /// documentation for more information on BDEX streaming of
231 /// value-semantic types and containers.
232 template <class STREAM>
233 STREAM& bdexStreamIn(STREAM& stream, int version);
234
235 /// Reset this object to the default value (i.e., its value upon default
236 /// construction).
237 void reset();
238
239 /// Invoke the specified `manipulator` sequentially on the address of
240 /// each (modifiable) attribute of this object, supplying `manipulator`
241 /// with the corresponding attribute information structure until such
242 /// invocation returns a non-zero value. Return the value from the last
243 /// invocation of `manipulator` (i.e., the invocation that terminated
244 /// the sequence).
245 template<class MANIPULATOR>
246 int manipulateAttributes(MANIPULATOR& manipulator);
247
248 /// Invoke the specified `manipulator` on the address of the
249 /// (modifiable) attribute indicated by the specified `id`, supplying
250 /// `manipulator` with the corresponding attribute information
251 /// structure. Return the value returned from the invocation of
252 /// `manipulator` if `id` identifies an attribute of this class, and -1
253 /// otherwise.
254 template<class MANIPULATOR>
255 int manipulateAttribute(MANIPULATOR& manipulator, int id);
256
257 /// Invoke the specified `manipulator` on the address of the
258 /// (modifiable) attribute indicated by the specified `name` of the
259 /// specified `nameLength`, supplying `manipulator` with the
260 /// corresponding attribute information structure. Return the value
261 /// returned from the invocation of `manipulator` if `name` identifies
262 /// an attribute of this class, and -1 otherwise.
263 template<class MANIPULATOR>
264 int manipulateAttribute(MANIPULATOR& manipulator,
265 const char *name,
266 int nameLength);
267
268 /// Set the `MaxDepth` attribute of this object to the specified
269 /// `value`.
270 void setMaxDepth(int value);
271
272 /// Set the `SkipUnknownElements` attribute of this object to the
273 /// specified `value`.
274 void setSkipUnknownElements(bool value);
275
276 /// Set the `TraceLevel` attribute of this object to the specified
277 /// `value`.
278 void setTraceLevel(int value);
279
280 /// Set the `MaxSequenceSize` attribute of this object to the specified
281 /// `value`.
282 void setMaxSequenceSize(int value);
283
284 /// Set the `DefaultEmptyStrings` attribute of this object to the
285 /// specified `value`.
286 void setDefaultEmptyStrings(bool value);
287
288 // ACCESSORS
289
290 /// Format this object to the specified output `stream` at the
291 /// optionally specified indentation `level` and return a reference to
292 /// the modifiable `stream`. If `level` is specified, optionally
293 /// specify `spacesPerLevel`, the number of spaces per indentation level
294 /// for this and all of its nested objects. Each line is indented by
295 /// the absolute value of `level * spacesPerLevel`. If `level` is
296 /// negative, suppress indentation of the first line. If
297 /// `spacesPerLevel` is negative, suppress line breaks and format the
298 /// entire output on one line. If `stream` is initially invalid, this
299 /// operation has no effect. Note that a trailing newline is provided
300 /// in multiline mode only.
301 bsl::ostream& print(bsl::ostream& stream,
302 int level = 0,
303 int spacesPerLevel = 4) const;
304
305 /// Write the value of this object, using the specified `version`
306 /// format, to the specified output `stream`, and return a reference to
307 /// `stream`. If `stream` is initially invalid, this operation has no
308 /// effect. If `version` is not supported, `stream` is invalidated, but
309 /// otherwise unmodified. Note that `version` is not written to
310 /// `stream`. See the `bslx` package-level documentation for more
311 /// information on BDEX streaming of value-semantic types and
312 /// containers.
313 template <class STREAM>
314 STREAM& bdexStreamOut(STREAM& stream, int version) const;
315
316 /// Invoke the specified `accessor` sequentially on each
317 /// (non-modifiable) attribute of this object, supplying `accessor` with
318 /// the corresponding attribute information structure until such
319 /// invocation returns a non-zero value. Return the value from the last
320 /// invocation of `accessor` (i.e., the invocation that terminated the
321 /// sequence).
322 template<class ACCESSOR>
323 int accessAttributes(ACCESSOR& accessor) const;
324
325 /// Invoke the specified `accessor` on the (non-modifiable) attribute of
326 /// this object indicated by the specified `id`, supplying `accessor`
327 /// with the corresponding attribute information structure. Return the
328 /// value returned from the invocation of `accessor` if `id` identifies
329 /// an attribute of this class, and -1 otherwise.
330 template<class ACCESSOR>
331 int accessAttribute(ACCESSOR& accessor, int id) const;
332
333 /// Invoke the specified `accessor` on the (non-modifiable) attribute of
334 /// this object indicated by the specified `name` of the specified
335 /// `nameLength`, supplying `accessor` with the corresponding attribute
336 /// information structure. Return the value returned from the
337 /// invocation of `accessor` if `name` identifies an attribute of this
338 /// class, and -1 otherwise.
339 template<class ACCESSOR>
340 int accessAttribute(ACCESSOR& accessor,
341 const char *name,
342 int nameLength) const;
343
344 /// Return a reference to the non-modifiable "MaxDepth" attribute of
345 /// this object.
346 const int& maxDepth() const;
347
348 /// Return a reference to the non-modifiable "SkipUnknownElements"
349 /// attribute of this object.
350 const bool& skipUnknownElements() const;
351
352 /// Return a reference to the non-modifiable "TraceLevel" attribute of
353 /// this object.
354 const int& traceLevel() const;
355
356 /// Return a reference to the non-modifiable "MaxSequenceSize" attribute
357 /// of this object.
358 const int& maxSequenceSize() const;
359
360 /// Return a reference to the non-modifiable "DefaultEmptyStrings"
361 /// attribute of this object.
362 const bool& defaultEmptyStrings() const;
363};
364
365// FREE OPERATORS
366
367/// Return `true` if the specified `lhs` and `rhs` attribute objects have
368/// the same value, and `false` otherwise. Two attribute objects have the
369/// same value if each respective attribute has the same value.
370inline
371bool operator==(const BerDecoderOptions& lhs,
372 const BerDecoderOptions& rhs);
373
374/// Return `true` if the specified `lhs` and `rhs` attribute objects do not
375/// have the same value, and `false` otherwise. Two attribute objects do
376/// not have the same value if one or more respective attributes differ in
377/// values.
378inline
379bool operator!=(const BerDecoderOptions& lhs,
380 const BerDecoderOptions& rhs);
381
382/// Format the specified `rhs` to the specified output `stream` and return a
383/// reference providing modifiable access to `stream`.
384inline
385bsl::ostream& operator<<(bsl::ostream& stream,
386 const BerDecoderOptions& rhs);
387
388} // close package namespace
389
390
391// TRAITS
393
394namespace balber {
395
396// ============================================================================
397// INLINE FUNCTION DEFINITIONS
398// ============================================================================
399
400 // -----------------------
401 // class BerDecoderOptions
402 // -----------------------
403
404// CLASS METHODS
405inline
406int BerDecoderOptions::maxSupportedBdexVersion(int /* versionSelector */)
407{
408 return 1; // versions start at 1
409}
410
411#ifndef BDE_OMIT_INTERNAL_DEPRECATED
412
413inline
418
419#endif // BDE_OMIT_INTERNAL_DEPRECATED
420
421// CREATORS
422inline
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)
429{
430}
431
432// MANIPULATORS
433template <class STREAM>
434inline
435STREAM& BerDecoderOptions::bdexStreamIn(STREAM& stream, int version)
436{
437 if (stream) {
438 switch (version) { // Switch on the schema version (starting with 1).
439 case 1: {
440 bslx::InStreamFunctions::bdexStreamIn(stream, d_maxDepth, 1);
442 d_skipUnknownElements, 1);
443 bslx::InStreamFunctions::bdexStreamIn(stream, d_traceLevel, 1);
445 d_maxSequenceSize, 1);
447 d_defaultEmptyStrings, 1);
448 } break;
449 default: {
450 stream.invalidate();
451 }
452 }
453 }
454 return stream;
455}
456
457inline
459{
460 d_maxDepth = DEFAULT_MAX_DEPTH;
461 d_traceLevel = DEFAULT_TRACE_LEVEL;
462 d_maxSequenceSize = DEFAULT_MAX_SEQUENCE_SIZE;
463 d_skipUnknownElements = DEFAULT_SKIP_UNKNOWN_ELEMENTS;
464 d_defaultEmptyStrings = DEFAULT_DEFAULT_EMPTY_STRINGS;
465}
466
467template <class MANIPULATOR>
468inline
469int BerDecoderOptions::manipulateAttributes(MANIPULATOR& manipulator)
470{
471 int ret;
472
473 ret = manipulator(&d_maxDepth,
475 if (ret) {
476 return ret; // RETURN
477 }
478
479 ret = manipulator(
480 &d_skipUnknownElements,
482 if (ret) {
483 return ret; // RETURN
484 }
485
486 ret = manipulator(&d_traceLevel,
488 if (ret) {
489 return ret; // RETURN
490 }
491
492 ret = manipulator(
493 &d_maxSequenceSize,
495 if (ret) {
496 return ret; // RETURN
497 }
498
499 ret = manipulator(
500 &d_defaultEmptyStrings,
502 if (ret) {
503 return ret; // RETURN
504 }
505
506 return ret;
507}
508
509template <class MANIPULATOR>
510inline
511int BerDecoderOptions::manipulateAttribute(MANIPULATOR& manipulator, int id)
512{
513 enum { k_NOT_FOUND = -1 };
514
515 switch (id) {
517 return manipulator(&d_maxDepth,
519 // RETURN
520 } break;
522 return manipulator(
523 &d_skipUnknownElements,
525 // RETURN
526 } break;
528 return manipulator(
529 &d_traceLevel,
531 // RETURN
532 } break;
534 return manipulator(
535 &d_maxSequenceSize,
537 // RETURN
538 } break;
540 return manipulator(
541 &d_defaultEmptyStrings,
543 // RETURN
544 } break;
545 default:
546 return k_NOT_FOUND;
547 }
548}
549
550template <class MANIPULATOR>
551inline
552int BerDecoderOptions::manipulateAttribute(MANIPULATOR& manipulator,
553 const char *name,
554 int nameLength)
555{
556 enum { k_NOT_FOUND = -1 };
557
558 const bdlat_AttributeInfo *attributeInfo = lookupAttributeInfo(name,
559 nameLength);
560 if (!attributeInfo) {
561 return k_NOT_FOUND; // RETURN
562 }
563
564 return manipulateAttribute(manipulator, attributeInfo->d_id);
565}
566
567inline
569{
570 d_maxDepth = value;
571}
572
573inline
575{
576 d_skipUnknownElements = value;
577}
578
579inline
581{
582 d_traceLevel = value;
583}
584
585inline
587{
588 d_maxSequenceSize = value;
589}
590
591inline
593{
594 d_defaultEmptyStrings = value;
595}
596
597// ACCESSORS
598template <class STREAM>
599inline
600STREAM& BerDecoderOptions::bdexStreamOut(STREAM& stream,
601 int version) const
602{
603 switch (version) {
604 case 1: {
605 bslx::OutStreamFunctions::bdexStreamOut(stream, d_maxDepth, 1);
607 stream, d_skipUnknownElements, 1);
608 bslx::OutStreamFunctions::bdexStreamOut(stream, d_traceLevel, 1);
609 bslx::OutStreamFunctions::bdexStreamOut(stream, d_maxSequenceSize, 1);
611 stream, d_defaultEmptyStrings, 1);
612 } break;
613 default: {
614 stream.invalidate();
615 } break;
616 }
617 return stream;
618}
619
620template <class ACCESSOR>
621inline
622int BerDecoderOptions::accessAttributes(ACCESSOR& accessor) const
623{
624 int ret;
625
626 ret = accessor(d_maxDepth,
628 if (ret) {
629 return ret; // RETURN
630 }
631
632 ret = accessor(
633 d_skipUnknownElements,
635 if (ret) {
636 return ret; // RETURN
637 }
638
639 ret = accessor(d_traceLevel,
641 if (ret) {
642 return ret; // RETURN
643 }
644
645 ret = accessor(d_maxSequenceSize,
647 if (ret) {
648 return ret; // RETURN
649 }
650
651 ret = accessor(
652 d_defaultEmptyStrings,
654 if (ret) {
655 return ret; // RETURN
656 }
657
658 return ret;
659}
660
661template <class ACCESSOR>
662inline
663int BerDecoderOptions::accessAttribute(ACCESSOR& accessor, int id) const
664{
665 enum { k_NOT_FOUND = -1 };
666
667 switch (id) {
669 return accessor(d_maxDepth,
671 // RETURN
672 } break;
674 return accessor(
675 d_skipUnknownElements,
677 // RETURN
678 } break;
680 return accessor(d_traceLevel,
682 // RETURN
683 } break;
685 return accessor(
686 d_maxSequenceSize,
688 // RETURN
689 } break;
691 return accessor(
692 d_defaultEmptyStrings,
694 // RETURN
695 } break;
696 default:
697 return k_NOT_FOUND;
698 }
699}
700
701template <class ACCESSOR>
702inline
704 const char *name,
705 int nameLength) const
706{
707 enum { k_NOT_FOUND = -1 };
708
709 const bdlat_AttributeInfo *attributeInfo = lookupAttributeInfo(name,
710 nameLength);
711 if (!attributeInfo) {
712 return k_NOT_FOUND; // RETURN
713 }
714
715 return accessAttribute(accessor, attributeInfo->d_id);
716}
717
718inline
720{
721 return d_maxDepth;
722}
723
724inline
726{
727 return d_skipUnknownElements;
728}
729
730inline
732{
733 return d_traceLevel;
734}
735
736inline
738{
739 return d_maxSequenceSize;
740}
741
742inline
744{
745 return d_defaultEmptyStrings;
746}
747
748} // close package namespace
749
750// FREE FUNCTIONS
751inline
752bool balber::operator==(const BerDecoderOptions& lhs,
753 const BerDecoderOptions& rhs)
754{
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();
760}
761
762inline
763bool balber::operator!=(const BerDecoderOptions& lhs,
764 const BerDecoderOptions& rhs)
765{
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();
771}
772
773inline
774bsl::ostream& balber::operator<<(bsl::ostream& stream,
775 const BerDecoderOptions& rhs)
776{
777 return rhs.print(stream, 0, -1);
778}
779
780
781#endif
782
783// ----------------------------------------------------------------------------
784// Copyright 2015 Bloomberg Finance L.P.
785//
786// Licensed under the Apache License, Version 2.0 (the "License");
787// you may not use this file except in compliance with the License.
788// You may obtain a copy of the License at
789//
790// http://www.apache.org/licenses/LICENSE-2.0
791//
792// Unless required by applicable law or agreed to in writing, software
793// distributed under the License is distributed on an "AS IS" BASIS,
794// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
795// See the License for the specific language governing permissions and
796// limitations under the License.
797// ----------------------------- END-OF-FILE ----------------------------------
798
799/** @} */
800/** @} */
801/** @} */
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