8#ifndef INCLUDED_BALJSN_DECODEROPTIONS
9#define INCLUDED_BALJSN_DECODEROPTIONS
126#include <balscm_version.h>
138#include <bsl_iosfwd.h>
139#include <bsl_limits.h>
143namespace baljsn {
class DecoderOptions; }
161 bool d_skipUnknownElements;
164 bool d_validateInputIsUtf8;
168 bool d_allowConsecutiveSeparators;
173 bool d_allowFormFeedAsWhitespace;
178 bool d_allowUnescapedControlCharacters;
181 template <
typename t_HASH_ALGORITHM>
182 void hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm)
const;
250#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
251 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
266#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
267 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
284 template <
typename t_MANIPULATOR>
293 template <
typename t_MANIPULATOR>
302 template <
typename t_MANIPULATOR>
343 bsl::ostream&
print(bsl::ostream& stream,
345 int spacesPerLevel = 4)
const;
353 template <
typename t_ACCESSOR>
361 template <
typename t_ACCESSOR>
370 template <
typename t_ACCESSOR>
373 int nameLength)
const;
406 return lhs.isEqualTo(rhs);
413 return !(lhs == rhs);
421 return rhs.
print(stream, 0, -1);
427 template <
typename t_HASH_ALGORITHM>
431 object.hashAppendImpl(hashAlg);
452template <
typename t_HASH_ALGORITHM>
453void DecoderOptions::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm)
const
465bool DecoderOptions::isEqualTo(
const DecoderOptions& rhs)
const
467 return this->
maxDepth() == rhs.maxDepth() &&
477template <
typename t_MANIPULATOR>
515template <
typename t_MANIPULATOR>
518 enum { NOT_FOUND = -1 };
544template <
typename t_MANIPULATOR>
546 t_MANIPULATOR& manipulator,
550 enum { NOT_FOUND = -1 };
554 if (0 == attributeInfo) {
572 d_skipUnknownElements = value;
578 d_validateInputIsUtf8 = value;
584 d_allowConsecutiveSeparators = value;
590 d_allowFormFeedAsWhitespace = value;
596 d_allowUnescapedControlCharacters = value;
600template <
typename t_ACCESSOR>
638template <
typename t_ACCESSOR>
641 enum { NOT_FOUND = -1 };
667template <
typename t_ACCESSOR>
669 t_ACCESSOR& accessor,
671 int nameLength)
const
673 enum { NOT_FOUND = -1 };
677 if (0 == attributeInfo) {
693 return d_skipUnknownElements;
699 return d_validateInputIsUtf8;
705 return d_allowConsecutiveSeparators;
711 return d_allowFormFeedAsWhitespace;
717 return d_allowUnescapedControlCharacters;
Definition baljsn_decoderoptions.h:153
void setMaxDepth(int value)
Set the "MaxDepth" attribute of this object to the specified value.
Definition baljsn_decoderoptions.h:562
DecoderOptions(const DecoderOptions &original)
void setAllowUnescapedControlCharacters(bool value)
Definition baljsn_decoderoptions.h:594
static const bool DEFAULT_INITIALIZER_ALLOW_FORM_FEED_AS_WHITESPACE
Definition baljsn_decoderoptions.h:221
bool validateInputIsUtf8() const
Definition baljsn_decoderoptions.h:697
static const char CLASS_NAME[]
Definition baljsn_decoderoptions.h:211
friend void hashAppend(t_HASH_ALGORITHM &hashAlg, const DecoderOptions &object)
Definition baljsn_decoderoptions.h:428
bool allowUnescapedControlCharacters() const
Definition baljsn_decoderoptions.h:715
friend bool operator==(const DecoderOptions &lhs, const DecoderOptions &rhs)
Definition baljsn_decoderoptions.h:403
@ ATTRIBUTE_INDEX_ALLOW_CONSECUTIVE_SEPARATORS
Definition baljsn_decoderoptions.h:205
@ ATTRIBUTE_INDEX_MAX_DEPTH
Definition baljsn_decoderoptions.h:202
@ ATTRIBUTE_INDEX_VALIDATE_INPUT_IS_UTF8
Definition baljsn_decoderoptions.h:204
@ ATTRIBUTE_INDEX_ALLOW_FORM_FEED_AS_WHITESPACE
Definition baljsn_decoderoptions.h:206
@ ATTRIBUTE_INDEX_ALLOW_UNESCAPED_CONTROL_CHARACTERS
Definition baljsn_decoderoptions.h:207
@ ATTRIBUTE_INDEX_SKIP_UNKNOWN_ELEMENTS
Definition baljsn_decoderoptions.h:203
@ NUM_ATTRIBUTES
Definition baljsn_decoderoptions.h:198
void setValidateInputIsUtf8(bool value)
Definition baljsn_decoderoptions.h:576
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
void setAllowConsecutiveSeparators(bool value)
Definition baljsn_decoderoptions.h:582
int manipulateAttribute(t_MANIPULATOR &manipulator, int id)
Definition baljsn_decoderoptions.h:516
friend bsl::ostream & operator<<(bsl::ostream &stream, const DecoderOptions &rhs)
Definition baljsn_decoderoptions.h:418
@ ATTRIBUTE_ID_ALLOW_CONSECUTIVE_SEPARATORS
Definition baljsn_decoderoptions.h:192
@ ATTRIBUTE_ID_VALIDATE_INPUT_IS_UTF8
Definition baljsn_decoderoptions.h:191
@ ATTRIBUTE_ID_ALLOW_UNESCAPED_CONTROL_CHARACTERS
Definition baljsn_decoderoptions.h:194
@ ATTRIBUTE_ID_ALLOW_FORM_FEED_AS_WHITESPACE
Definition baljsn_decoderoptions.h:193
@ ATTRIBUTE_ID_MAX_DEPTH
Definition baljsn_decoderoptions.h:189
@ ATTRIBUTE_ID_SKIP_UNKNOWN_ELEMENTS
Definition baljsn_decoderoptions.h:190
~DecoderOptions()
Destroy this object.
void setAllowFormFeedAsWhitespace(bool value)
Definition baljsn_decoderoptions.h:588
static const bool DEFAULT_INITIALIZER_VALIDATE_INPUT_IS_UTF8
Definition baljsn_decoderoptions.h:217
static const bool DEFAULT_INITIALIZER_ALLOW_UNESCAPED_CONTROL_CHARACTERS
Definition baljsn_decoderoptions.h:223
int manipulateAttributes(t_MANIPULATOR &manipulator)
Definition baljsn_decoderoptions.h:478
bool skipUnknownElements() const
Definition baljsn_decoderoptions.h:691
static const int DEFAULT_INITIALIZER_MAX_DEPTH
Definition baljsn_decoderoptions.h:213
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
bool allowConsecutiveSeparators() const
Definition baljsn_decoderoptions.h:703
friend bool operator!=(const DecoderOptions &lhs, const DecoderOptions &rhs)
Returns !(lhs == rhs)
Definition baljsn_decoderoptions.h:410
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition baljsn_decoderoptions.h:225
static const bool DEFAULT_INITIALIZER_SKIP_UNKNOWN_ELEMENTS
Definition baljsn_decoderoptions.h:215
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
int accessAttribute(t_ACCESSOR &accessor, int id) const
Definition baljsn_decoderoptions.h:639
void setSkipUnknownElements(bool value)
Definition baljsn_decoderoptions.h:570
bool allowFormFeedAsWhitespace() const
Definition baljsn_decoderoptions.h:709
DecoderOptions()
Create an object of type DecoderOptions having the default value.
static const bool DEFAULT_INITIALIZER_ALLOW_CONSECUTIVE_SEPARATORS
Definition baljsn_decoderoptions.h:219
int maxDepth() const
Return the value of the "MaxDepth" attribute of this object.
Definition baljsn_decoderoptions.h:685
DecoderOptions & operator=(const DecoderOptions &rhs)
Assign to this object the value of the specified rhs object.
int accessAttributes(t_ACCESSOR &accessor) const
Definition baljsn_decoderoptions.h:601
#define BDLAT_DECL_SEQUENCE_WITH_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:275
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition baljsn_datumdecoderoptions.h:113
bsl::enable_if<(bsl::is_integral< TYPE >::value||bsl::is_pointer< TYPE >::value||bsl::is_enum< TYPE >::value)&&!bsl::is_same< TYPE, bool >::value >::type hashAppend(HASH_ALGORITHM &hashAlg, TYPE input)
Definition bslh_hash.h:638
Definition bdlat_attributeinfo.h:137
int d_id
Definition bdlat_attributeinfo.h:140