|
cereal
A C++11 library for serialization
|
An output archive designed to save data to XML. More...
#include <cereal/archives/xml.hpp>
Classes | |
| struct | NodeInfo |
| A struct that contains metadata about a node. More... | |
Public Member Functions | |
| XMLOutputArchive (std::ostream &stream, size_t precision=10, bool outputType=false) | |
| Construct, outputting to the provided stream. More... | |
| ~XMLOutputArchive () | |
| Destructor, flushes the XML. | |
| void | startNode () |
| Creates a new node that is a child of the node at the top of the stack. More... | |
| void | finishNode () |
| Designates the most recently added node as finished. | |
| void | setNextName (const char *name) |
| Sets the name for the next node created with startNode. | |
| template<class T > | |
| void | saveValue (T const &value) |
| Saves some data, encoded as a string. More... | |
| void | saveValue (uint8_t const &value) |
| Overload for uint8_t prevents them from being serialized as characters. | |
| void | saveBinaryValue (const void *data, size_t size, const char *name=nullptr) |
| Saves some binary data, encoded as a base64 string, with an optional name. More... | |
| template<class T > | |
| void | insertType () |
| Causes the type to be appended to the most recently made node if output type is set to true. | |
Public Member Functions inherited from cereal::OutputArchive< XMLOutputArchive > | |
| OutputArchive (XMLOutputArchive *const self) | |
| Construct the output archive. More... | |
| XMLOutputArchive & | operator() (Types &&...args) |
| Serializes all passed in data. | |
| std::uint32_t | registerSharedPointer (void const *addr) |
| Registers a shared pointer with the archive. More... | |
| std::uint32_t | registerPolymorphicType (char const *name) |
| Registers a polymorphic type name with the archive. More... | |
An output archive designed to save data to XML.
|
inline |
Construct, outputting to the provided stream.
| stream | The stream to output to. Can be a stringstream, a file stream, or even cout! |
| precision | The precision for floating point output |
| outputType | Controls whether type information will be printed in attributes |
|
inline |
Saves some binary data, encoded as a base64 string, with an optional name.
This will create a new node, optionally named, and insert a value that consists of the data encoded as a base64 string
|
inline |
Saves some data, encoded as a string.
The data will be be named with the most recent name if one exists, otherwise it will be given some default delimited value that depends upon the parent node
|
inline |
Creates a new node that is a child of the node at the top of the stack.
Nodes will be given a name that has either been pre-set by a name value pair, or generated based upon a counter unique to the parent node.
The node will then be pushed onto the node stack.
1.8.3.1