OS Manuals

cereal_XMLOutputArchive_Options(3)

cereal::XMLOutputArchive::Options - A class containing various advanced options for the XML archive.

cereal::XMLOutputArchive::Options(3) Library Functions Manual cereal::XMLOutputArchive::Options(3)

cereal::XMLOutputArchive::Options - A class containing various advanced options for the XML archive.

#include </home/build/include/cereal/archives/xml.hpp>


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

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 Options Default ()
Default options.


class XMLOutputArchive

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

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

Generated automatically by Doxygen for cereal from the source code.

Mon Oct 26 2026 02:55:37 cereal

cereal 1.3.2-r7 · enterprise-packages · ingested 2026-10-26