8#ifndef INCLUDED_BALJSN_ENCODEROPTIONS
9#define INCLUDED_BALJSN_ENCODEROPTIONS
212#include <balscm_version.h>
226#include <bsl_limits.h>
227#include <bsl_iosfwd.h>
231namespace baljsn {
class EncoderOptions; }
267 int d_initialIndentLevel;
270 int d_spacesPerLevel;
274 int d_datetimeFractionalSecondPrecision;
278 int d_maxFloatPrecision;
282 int d_maxDoublePrecision;
289 bool d_encodeEmptyArrays;
292 bool d_encodeNullElements;
302 bool d_encodeInfAndNaNAsStrings;
307 bool d_encodeQuotedDecimal64;
317#ifndef BDE_OMIT_INTERNAL_DEPRECATED
419 template<
class MANIPULATOR>
428 template<
class MANIPULATOR>
437 template<
class MANIPULATOR>
496 bsl::ostream&
print(bsl::ostream& stream,
506 template<
class ACCESSOR>
514 template<
class ACCESSOR>
523 template<
class ACCESSOR>
526 int nameLength)
const;
609template <
class MANIPULATOR>
667template <
class MANIPULATOR>
670 enum { NOT_FOUND = -1 };
708template <
class MANIPULATOR>
710 MANIPULATOR& manipulator,
714 enum { NOT_FOUND = -1 };
718 if (0 == attributeInfo) {
730 d_initialIndentLevel = value;
738 d_spacesPerLevel = value;
744 d_encodingStyle = value;
757 d_encodeEmptyArrays = value;
763 d_encodeNullElements = value;
769 d_encodeInfAndNaNAsStrings = value;
778 d_datetimeFractionalSecondPrecision = value;
784 d_maxFloatPrecision = value;
790 d_maxDoublePrecision = value;
796 d_encodeQuotedDecimal64 = value;
800template <
class ACCESSOR>
858template <
class ACCESSOR>
861 enum { NOT_FOUND = -1 };
899template <
class ACCESSOR>
903 int nameLength)
const
905 enum { NOT_FOUND = -1 };
909 if (0 == attributeInfo) {
919 return d_initialIndentLevel;
925 return d_spacesPerLevel;
937 return d_encodeEmptyArrays;
943 return d_encodeNullElements;
949 return d_encodeInfAndNaNAsStrings;
955 return d_datetimeFractionalSecondPrecision;
961 return d_maxFloatPrecision;
967 return d_maxDoublePrecision;
973 return d_encodeQuotedDecimal64;
1016 bsl::ostream& stream,
1019 return rhs.
print(stream, 0, -1);
Definition baljsn_encoderoptions.h:262
static const int DEFAULT_INITIALIZER_DATETIME_FRACTIONAL_SECOND_PRECISION
Definition baljsn_encoderoptions.h:368
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
static const int DEFAULT_INITIALIZER_INITIAL_INDENT_LEVEL
Definition baljsn_encoderoptions.h:356
void setEncodingStyle(baljsn::EncodingStyle::Value value)
Definition baljsn_encoderoptions.h:742
static const int DEFAULT_INITIALIZER_MAX_DOUBLE_PRECISION
Definition baljsn_encoderoptions.h:372
static const baljsn::EncodingStyle::Value DEFAULT_INITIALIZER_ENCODING_STYLE
Definition baljsn_encoderoptions.h:360
void setMaxFloatPrecision(int value)
Definition baljsn_encoderoptions.h:782
int manipulateAttribute(MANIPULATOR &manipulator, int id)
Definition baljsn_encoderoptions.h:668
static const char CLASS_NAME[]
Definition baljsn_encoderoptions.h:354
static const bool DEFAULT_INITIALIZER_ENCODE_QUOTED_DECIMAL64
Definition baljsn_encoderoptions.h:374
static const bool DEFAULT_INITIALIZER_ENCODE_NULL_ELEMENTS
Definition baljsn_encoderoptions.h:364
~EncoderOptions()
Destroy this object.
static const bool DEFAULT_INITIALIZER_ENCODE_EMPTY_ARRAYS
Definition baljsn_encoderoptions.h:362
EncodingStyle
Definition baljsn_encoderoptions.h:314
@ BAEJSN_PRETTY
Definition baljsn_encoderoptions.h:319
@ e_COMPACT
Definition baljsn_encoderoptions.h:315
@ e_PRETTY
Definition baljsn_encoderoptions.h:316
@ BAEJSN_COMPACT
Definition baljsn_encoderoptions.h:318
bool encodeInfAndNaNAsStrings() const
Definition baljsn_encoderoptions.h:947
void setEncodeQuotedDecimal64(bool value)
Definition baljsn_encoderoptions.h:794
int maxFloatPrecision() const
Definition baljsn_encoderoptions.h:959
bool encodeNullElements() const
Definition baljsn_encoderoptions.h:941
static const bool DEFAULT_INITIALIZER_ENCODE_INF_AND_NA_N_AS_STRINGS
Definition baljsn_encoderoptions.h:366
void setInitialIndentLevel(int value)
Definition baljsn_encoderoptions.h:726
void setDatetimeFractionalSecondPrecision(int value)
Definition baljsn_encoderoptions.h:773
void setEncodeEmptyArrays(bool value)
Definition baljsn_encoderoptions.h:755
int maxDoublePrecision() const
Definition baljsn_encoderoptions.h:965
EncoderOptions()
Create an object of type EncoderOptions having the default value.
void setSpacesPerLevel(int value)
Definition baljsn_encoderoptions.h:734
EncoderOptions & operator=(const EncoderOptions &rhs)
Assign to this object the value of the specified rhs object.
static const int DEFAULT_INITIALIZER_SPACES_PER_LEVEL
Definition baljsn_encoderoptions.h:358
int datetimeFractionalSecondPrecision() const
Definition baljsn_encoderoptions.h:953
@ ATTRIBUTE_ID_ENCODE_EMPTY_ARRAYS
Definition baljsn_encoderoptions.h:327
@ ATTRIBUTE_ID_INITIAL_INDENT_LEVEL
Definition baljsn_encoderoptions.h:324
@ ATTRIBUTE_ID_DATETIME_FRACTIONAL_SECOND_PRECISION
Definition baljsn_encoderoptions.h:330
@ ATTRIBUTE_ID_MAX_DOUBLE_PRECISION
Definition baljsn_encoderoptions.h:332
@ ATTRIBUTE_ID_ENCODE_INF_AND_NA_N_AS_STRINGS
Definition baljsn_encoderoptions.h:329
@ ATTRIBUTE_ID_ENCODE_NULL_ELEMENTS
Definition baljsn_encoderoptions.h:328
@ ATTRIBUTE_ID_ENCODE_QUOTED_DECIMAL64
Definition baljsn_encoderoptions.h:333
@ ATTRIBUTE_ID_SPACES_PER_LEVEL
Definition baljsn_encoderoptions.h:325
@ ATTRIBUTE_ID_MAX_FLOAT_PRECISION
Definition baljsn_encoderoptions.h:331
@ ATTRIBUTE_ID_ENCODING_STYLE
Definition baljsn_encoderoptions.h:326
void setEncodeNullElements(bool value)
Definition baljsn_encoderoptions.h:761
baljsn::EncoderOptions::EncodingStyle encodingStyle() const
Definition baljsn_encoderoptions.h:929
@ ATTRIBUTE_INDEX_ENCODE_INF_AND_NA_N_AS_STRINGS
Definition baljsn_encoderoptions.h:346
@ ATTRIBUTE_INDEX_ENCODE_QUOTED_DECIMAL64
Definition baljsn_encoderoptions.h:350
@ ATTRIBUTE_INDEX_MAX_FLOAT_PRECISION
Definition baljsn_encoderoptions.h:348
@ ATTRIBUTE_INDEX_ENCODE_EMPTY_ARRAYS
Definition baljsn_encoderoptions.h:344
@ ATTRIBUTE_INDEX_ENCODING_STYLE
Definition baljsn_encoderoptions.h:343
@ ATTRIBUTE_INDEX_SPACES_PER_LEVEL
Definition baljsn_encoderoptions.h:342
@ ATTRIBUTE_INDEX_INITIAL_INDENT_LEVEL
Definition baljsn_encoderoptions.h:341
@ ATTRIBUTE_INDEX_ENCODE_NULL_ELEMENTS
Definition baljsn_encoderoptions.h:345
@ ATTRIBUTE_INDEX_MAX_DOUBLE_PRECISION
Definition baljsn_encoderoptions.h:349
@ ATTRIBUTE_INDEX_DATETIME_FRACTIONAL_SECOND_PRECISION
Definition baljsn_encoderoptions.h:347
@ NUM_ATTRIBUTES
Definition baljsn_encoderoptions.h:337
EncoderOptions(const EncoderOptions &original)
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition baljsn_encoderoptions.h:376
int accessAttributes(ACCESSOR &accessor) const
Definition baljsn_encoderoptions.h:801
bool encodeQuotedDecimal64() const
Definition baljsn_encoderoptions.h:971
int initialIndentLevel() const
Definition baljsn_encoderoptions.h:917
static const int DEFAULT_INITIALIZER_MAX_FLOAT_PRECISION
Definition baljsn_encoderoptions.h:370
int accessAttribute(ACCESSOR &accessor, int id) const
Definition baljsn_encoderoptions.h:859
int spacesPerLevel() const
Definition baljsn_encoderoptions.h:923
bool encodeEmptyArrays() const
Definition baljsn_encoderoptions.h:935
int manipulateAttributes(MANIPULATOR &manipulator)
Definition baljsn_encoderoptions.h:610
void setEncodeInfAndNaNAsStrings(bool value)
Definition baljsn_encoderoptions.h:767
void setMaxDoublePrecision(int value)
Definition baljsn_encoderoptions.h:788
#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
bool operator==(const DatumDecoderOptions &lhs, const DatumDecoderOptions &rhs)
bsl::ostream & operator<<(bsl::ostream &stream, const DatumDecoderOptions &rhs)
bool operator!=(const DatumDecoderOptions &lhs, const DatumDecoderOptions &rhs)
Value
Definition baljsn_encodingstyle.h:78
@ e_COMPACT
Definition baljsn_encodingstyle.h:79
@ e_PRETTY
Definition baljsn_encodingstyle.h:80
Definition bdlat_attributeinfo.h:137
int d_id
Definition bdlat_attributeinfo.h:140