|
cereal
A C++11 library for serialization
|
An output archive designed to save data in a compact binary representation portable over different architectures. More...
#include </build/libcereal-YYPPni/libcereal-1.2.1/include/cereal/archives/portable_binary.hpp>
Classes | |
| class | Options |
| A class containing various advanced options for the PortableBinaryOutput archive. More... | |
Public Member Functions | |
| PortableBinaryOutputArchive (std::ostream &stream, Options const &options=Options::Default()) | |
| Construct, outputting to the provided stream. More... | |
| template<std::size_t DataSize> | |
| void | saveBinary (const void *data, std::size_t size) |
| Writes size bytes of data to the output stream. | |
Public Member Functions inherited from cereal::OutputArchive< PortableBinaryOutputArchive, AllowEmptyClassElision > | |
| OutputArchive (PortableBinaryOutputArchive *const derived) | |
| Construct the output archive. More... | |
| OutputArchive & | operator= (OutputArchive const &)=delete |
| PortableBinaryOutputArchive & | operator() (Types &&... args) |
| Serializes all passed in data. More... | |
| 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... | |
| PortableBinaryOutputArchive & | operator& (T &&arg) |
| Serializes passed in data. More... | |
| PortableBinaryOutputArchive & | operator<< (T &&arg) |
| Serializes passed in data. More... | |
Public Member Functions inherited from cereal::detail::OutputArchiveBase | |
| OutputArchiveBase (OutputArchiveBase &&) CEREAL_NOEXCEPT | |
| OutputArchiveBase & | operator= (OutputArchiveBase &&) CEREAL_NOEXCEPT |
An output archive designed to save data in a compact binary representation portable over different architectures.
This archive outputs data to a stream in an extremely compact binary representation with as little extra metadata as possible.
This archive will record the endianness of the data as well as the desired in/out endianness and assuming that the user takes care of ensuring serialized types are the same size across machines, is portable over different architectures.
When using a binary archive and a file stream, you must use the std::ios::binary format flag to avoid having your data altered inadvertently.
|
inline |
Construct, outputting to the provided stream.
| stream | The stream to output to. Should be opened with std::ios::binary flag. |
| options | The PortableBinary specific options to use. See the Options struct for the values of default parameters |
1.8.13