cereal::XMLOutputArchive::Options Class Reference

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

`#include </home/shane/workspace/cereal/include/cereal/archives/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. cereal::XMLOutputArchive ar( myStream, cereal::XMLOutputArchive::Options() .indent(true) .sizeAttributes(false) );
Options & | precision (int value)
| Sets the precision used for floaing point numbers.
Options & | indent (bool enable)
| Whether to indent each line of XML.
Options & | outputType (bool enable)
| Whether to output the type of each serialized object as an attribute.
Options & | sizeAttributes (bool enable)
| Whether dynamically sized containers (e.g. vector) output the size=dynamic attribute.

## Static Public Member Functions

static Options | Default ()
| Default options.

## 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

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

- /home/shane/workspace/cereal/include/cereal/archives/xml.hpp

cereal::XMLOutputArchive::Options
A class containing various advanced options for the XML archive.
Definition: xml.hpp:106
cereal::XMLOutputArchive::Options::sizeAttributes
Options & sizeAttributes(bool enable)
Whether dynamically sized containers (e.g. vector) output the size=dynamic attribute.
Definition: xml.hpp:146
cereal::XMLOutputArchive::Options::indent
Options & indent(bool enable)
Whether to indent each line of XML.
Definition: xml.hpp:142
cereal::XMLOutputArchive
An output archive designed to save data to XML.
Definition: xml.hpp:96