8#ifndef INCLUDED_BDLJSN_WRITEOPTIONS
9#define INCLUDED_BDLJSN_WRITEOPTIONS
115#include <bdlscm_version.h>
119#include <bsl_iosfwd.h>
143 int d_initialIndentLevel;
149 bool d_escapeForwardSlash;
152 int d_spacesPerLevel;
257 bsl::ostream&
print(bsl::ostream& stream,
292: d_initialIndentLevel(original.d_initialIndentLevel)
293, d_sortMembers (original.d_sortMembers)
294, d_escapeForwardSlash(original.d_escapeForwardSlash)
295, d_spacesPerLevel (original.d_spacesPerLevel)
296, d_style (original.d_style)
311 d_initialIndentLevel = rhs.d_initialIndentLevel;
312 d_sortMembers = rhs.d_sortMembers;
313 d_escapeForwardSlash = rhs.d_escapeForwardSlash;
314 d_spacesPerLevel = rhs.d_spacesPerLevel;
315 d_style = rhs.d_style;
323 d_escapeForwardSlash = value;
332 d_initialIndentLevel = value;
339 d_sortMembers = value;
348 d_spacesPerLevel = value;
363 return d_escapeForwardSlash;
369 return d_initialIndentLevel;
375 return d_sortMembers;
381 return d_spacesPerLevel;
397 return lhs.initialIndentLevel() == rhs.initialIndentLevel()
398 && lhs.sortMembers() == rhs.sortMembers()
399 && lhs.escapeForwardSlash() == rhs.escapeForwardSlash()
400 && lhs.spacesPerLevel() == rhs.spacesPerLevel()
401 && lhs.style() == rhs.style();
408 return lhs.initialIndentLevel() !=
rhs.initialIndentLevel()
409 ||
lhs.sortMembers() !=
rhs.sortMembers()
410 ||
lhs.escapeForwardSlash() !=
rhs.escapeForwardSlash()
411 ||
lhs.spacesPerLevel() !=
rhs.spacesPerLevel()
412 ||
lhs.style() !=
rhs.style();
419 return rhs.print(stream, 0, -1);
Definition bdljsn_writeoptions.h:138
WriteOptions & setSortMembers(bool value)
Definition bdljsn_writeoptions.h:337
WriteOptions & setSpacesPerLevel(int value)
Definition bdljsn_writeoptions.h:344
int initialIndentLevel() const
Return the initialIndentLevel attribute of this object.
Definition bdljsn_writeoptions.h:367
bool escapeForwardSlash() const
Return the escapeForwardSlash attribute of this object.
Definition bdljsn_writeoptions.h:361
static const int s_DEFAULT_INITIALIZER_INITIAL_INDENT_LEVEL
Definition bdljsn_writeoptions.h:159
static const int s_DEFAULT_INITIALIZER_SPACES_PER_LEVEL
Definition bdljsn_writeoptions.h:165
static const bool s_DEFAULT_INITIALIZER_ESCAPE_FORWARD_SLASH
Definition bdljsn_writeoptions.h:163
WriteOptions & setInitialIndentLevel(int value)
Definition bdljsn_writeoptions.h:328
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
bool sortMembers() const
Return the sortMembers attribute of this object.
Definition bdljsn_writeoptions.h:373
~WriteOptions()
Destroy this object.
Definition bdljsn_writeoptions.h:301
int spacesPerLevel() const
Return the spacesPerLevel attribute of this object.
Definition bdljsn_writeoptions.h:379
WriteOptions & setStyle(bdljsn::WriteStyle::Enum value)
Definition bdljsn_writeoptions.h:353
WriteOptions & setEscapeForwardSlash(bool value)
Definition bdljsn_writeoptions.h:321
bdljsn::WriteStyle::Enum style() const
Return the style attribute of this object.
Definition bdljsn_writeoptions.h:385
static const bool s_DEFAULT_INITIALIZER_SORT_MEMBERS
Definition bdljsn_writeoptions.h:161
WriteOptions & operator=(const WriteOptions &rhs)
Definition bdljsn_writeoptions.h:309
static const bdljsn::WriteStyle::Enum s_DEFAULT_INITIALIZER_STYLE
Definition bdljsn_writeoptions.h:168
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdljsn_error.h:142
bool operator!=(const Error &lhs, const Error &rhs)
bool operator==(const Error &lhs, const Error &rhs)
bsl::ostream & operator<<(bsl::ostream &stream, const Error &object)
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
ALLOCATOR & lhs
Definition bslstl_string.h:3917
Enum
Definition bdljsn_writestyle.h:129