NDDEM
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
cereal::JSONOutputArchive::Options Class Reference

A class containing various advanced options for the JSON archive. More...

#include <json.hpp>

Public Types

enum class  IndentChar : char { space = ' ' , tab = '\t' , newline = '\n' , carriage_return = '\r' }
 The character to use for indenting. More...
 

Public Member Functions

 Options (int precision=JSONWriter::kDefaultMaxDecimalPlaces, IndentChar indentChar=IndentChar::space, unsigned int indentLength=4)
 Specify specific options for the JSONOutputArchive. More...
 

Static Public Member Functions

static Options Default ()
 Default options. More...
 
static Options NoIndent ()
 Default options with no indentation. More...
 

Private Attributes

int itsPrecision
 
char itsIndentChar
 
unsigned int itsIndentLength
 

Friends

class JSONOutputArchive
 

Detailed Description

A class containing various advanced options for the JSON archive.

Member Enumeration Documentation

◆ IndentChar

The character to use for indenting.

Enumerator
space 
tab 
newline 
carriage_return 

Constructor & Destructor Documentation

◆ Options()

cereal::JSONOutputArchive::Options::Options ( int  precision = JSONWriter::kDefaultMaxDecimalPlaces,
IndentChar  indentChar = IndentChar::space,
unsigned int  indentLength = 4 
)
inlineexplicit

Specify specific options for the JSONOutputArchive.

Parameters
precisionThe precision used for floating point numbers
indentCharThe type of character to indent with
indentLengthThe number of indentChar to use for indentation (0 corresponds to no indentation)

Member Function Documentation

◆ Default()

static Options cereal::JSONOutputArchive::Options::Default ( )
inlinestatic

Default options.

◆ NoIndent()

static Options cereal::JSONOutputArchive::Options::NoIndent ( )
inlinestatic

Default options with no indentation.

Friends And Related Function Documentation

◆ JSONOutputArchive

friend class JSONOutputArchive
friend

Member Data Documentation

◆ itsIndentChar

char cereal::JSONOutputArchive::Options::itsIndentChar
private

◆ itsIndentLength

unsigned int cereal::JSONOutputArchive::Options::itsIndentLength
private

◆ itsPrecision

int cereal::JSONOutputArchive::Options::itsPrecision
private

The documentation for this class was generated from the following file: