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

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

#include <xml.hpp>

Public Member Functions

 Options (int precision_=std::numeric_limits< double >::max_digits10, bool indent_=true, bool outputType_=false, bool sizeAttributes_=true)
 Specify specific options for the XMLOutputArchive. More...
 
Option Modifiers

An interface for setting option settings analogous to named parameters.

.indent(true)
.sizeAttributes(false) );
A class containing various advanced options for the XML archive.
Definition: xml.hpp:107
Options & sizeAttributes(bool enable)
Whether dynamically sized containers (e.g. vector) output the size=dynamic attribute.
Definition: xml.hpp:146
Options & indent(bool enable)
Whether to indent each line of XML.
Definition: xml.hpp:142
An output archive designed to save data to XML.
Definition: xml.hpp:97
Optionsprecision (int value)
 Sets the precision used for floating point numbers. More...
 
Optionsindent (bool enable)
 Whether to indent each line of XML. More...
 
OptionsoutputType (bool enable)
 Whether to output the type of each serialized object as an attribute. More...
 
OptionssizeAttributes (bool enable)
 Whether dynamically sized containers (e.g. vector) output the size=dynamic attribute. More...
 

Static Public Member Functions

static Options Default ()
 Default options. More...
 

Private Attributes

int itsPrecision
 
bool itsIndent
 
bool itsOutputType
 
bool itsSizeAttributes
 

Friends

class XMLOutputArchive
 

Detailed Description

A class containing various advanced options for the XML archive.

Options can either be directly passed to the constructor, or chained using the modifier functions for an interface analogous to named parameters

Constructor & Destructor Documentation

◆ Options()

cereal::XMLOutputArchive::Options::Options ( int  precision_ = std::numeric_limits<double>::max_digits10,
bool  indent_ = true,
bool  outputType_ = false,
bool  sizeAttributes_ = true 
)
inlineexplicit

Specify specific options for the XMLOutputArchive.

Parameters
precision_The precision used for floating point numbers
indent_Whether to indent each line of XML
outputType_Whether to output the type of each serialized object as an attribute
sizeAttributes_Whether dynamically sized containers output the size=dynamic attribute

Member Function Documentation

◆ Default()

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

Default options.

◆ indent()

Options& cereal::XMLOutputArchive::Options::indent ( bool  enable)
inline

Whether to indent each line of XML.

◆ outputType()

Options& cereal::XMLOutputArchive::Options::outputType ( bool  enable)
inline

Whether to output the type of each serialized object as an attribute.

◆ precision()

Options& cereal::XMLOutputArchive::Options::precision ( int  value)
inline

Sets the precision used for floating point numbers.

◆ sizeAttributes()

Options& cereal::XMLOutputArchive::Options::sizeAttributes ( bool  enable)
inline

Whether dynamically sized containers (e.g. vector) output the size=dynamic attribute.

Friends And Related Function Documentation

◆ XMLOutputArchive

friend class XMLOutputArchive
friend

Member Data Documentation

◆ itsIndent

bool cereal::XMLOutputArchive::Options::itsIndent
private

◆ itsOutputType

bool cereal::XMLOutputArchive::Options::itsOutputType
private

◆ itsPrecision

int cereal::XMLOutputArchive::Options::itsPrecision
private

◆ itsSizeAttributes

bool cereal::XMLOutputArchive::Options::itsSizeAttributes
private

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