|
cereal_fwd
Fork of cereal library adding archive supporting forward compatibility
|
The base output archive class. More...
#include </home/breiker/code/git/cereal_fwd_github/include/cereal/cereal.hpp>
Public Types | |
| using | is_saving = std::true_type |
| indicates if archive is used for saving | |
| using | is_loading = std::false_type |
| indicates if archive is used for loading | |
Public Member Functions | |
| OutputArchive (ArchiveType *const derived) | |
| Construct the output archive. More... | |
| OutputArchive & | operator= (OutputArchive const &)=delete |
| template<class ... Types> | |
| ArchiveType & | 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... | |
| bool | wasSerialized () const |
| Indicates if last field was saved. More... | |
Boost Transition Layer | |
Functionality that mirrors the syntax for Boost. This is useful if you are transitioning a large project from Boost to cereal. The preferred interface for cereal is using operator(). | |
| template<class T > | |
| ArchiveType & | operator & (T &&arg) |
| Serializes passed in data. More... | |
| template<class T > | |
| ArchiveType & | 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 |
The base output archive class.
This is the base output archive for all output archives. If you create a custom archive class, it should derive from this, passing itself as a template parameter for the ArchiveType.
The base class provides all of the functionality necessary to properly forward data to the correct serialization functions.
Individual archives should use a combination of prologue and epilogue functions together with specializations of serialize, save, and load to alter the functionality of their serialization.
| ArchiveType | The archive type that derives from OutputArchive |
| Flags | Flags to control advanced functionality. See the Flags enum for more information. |
|
inline |
Construct the output archive.
| derived | A pointer to the derived ArchiveType (pass this from the derived archive) |
|
inline |
Serializes passed in data.
This is a boost compatability layer and is not the preferred way of using cereal. If you are transitioning from boost, use this until you can transition to the operator() overload
|
inline |
Serializes all passed in data.
This is the primary interface for serializing data with an archive
|
inline |
Serializes passed in data.
This is a boost compatability layer and is not the preferred way of using cereal. If you are transitioning from boost, use this until you can transition to the operator() overload
|
inline |
Registers a polymorphic type name with the archive.
This function is used to track polymorphic types to prevent unnecessary saves of identifying strings used by the polymorphic support functionality.
|
inline |
Registers a shared pointer with the archive.
This function is used to track shared pointer targets to prevent unnecessary saves from taking place if multiple shared pointers point to the same data.
|
inline |
Indicates if last field was saved.
Fields are always saved, in case of error exception is thrown. This method is kept for compatibility with input archive to be usable in serialize method (which can be called for both input and output archives).
1.8.13