cereal_fwd
Fork of cereal library adding archive supporting forward compatibility
Classes | Functions
extendable_binary.hpp File Reference

Binary input and output archives with backward and forward compatibility. More...

#include <cereal/cereal.hpp>
#include <cereal/types/memory.hpp>
#include <array>
#include <cstring>
#include <limits>
#include <map>
#include <set>
#include <sstream>
#include <cereal/details/extendable_binary_details.hpp>

Go to the source code of this file.

Classes

class  cereal::ExtendableBinaryOutputArchive
 An output archive designed to save data in a portable binary representation with forward compatibility support. More...
 
class  cereal::ExtendableBinaryOutputArchive::Options
 A class containing various advanced options for the ExtendableBinaryOutput archive. More...
 
class  cereal::ExtendableBinaryInputArchive
 An input archive designed to load data saved using ExtendableBinaryOutputArchive. More...
 
class  cereal::ExtendableBinaryInputArchive::Options
 A class containing various advanced options for the ExtendableBinaryInput archive. More...
 
struct  cereal::specialize< ExtendableBinaryOutputArchive, detail::VersionIdTag< T >, specialization::non_member_load_save >
 
struct  cereal::specialize< ExtendableBinaryInputArchive, detail::VersionIdTag< T >, specialization::non_member_load_save >
 
struct  cereal::specialize< ExtendableBinaryOutputArchive, detail::PolymorphicIdTag< T >, specialization::non_member_load_save >
 
struct  cereal::specialize< ExtendableBinaryInputArchive, detail::PolymorphicIdTag< T >, specialization::non_member_load_save >
 
struct  cereal::specialize< ExtendableBinaryOutputArchive, detail::PolymorphicKeyTag< T >, specialization::non_member_load_save >
 
struct  cereal::specialize< ExtendableBinaryInputArchive, detail::PolymorphicKeyTag< T >, specialization::non_member_load_save >
 
struct  cereal::specialize< ExtendableBinaryOutputArchive, detail::ObjectIdTag< T >, specialization::non_member_load_save >
 
struct  cereal::specialize< ExtendableBinaryInputArchive, detail::ObjectIdTag< T >, specialization::non_member_load_save >
 
struct  cereal::specialize< ExtendableBinaryOutputArchive, detail::PointerValidityTag< T >, specialization::non_member_load_save >
 
struct  cereal::specialize< ExtendableBinaryInputArchive, detail::PointerValidityTag< T >, specialization::non_member_load_save >
 
struct  cereal::is_extendablebinary_empty_prologue_and_epilogue1< T >
 Types which has empty prologue and epilogoue (version with one template argument) More...
 
struct  cereal::is_extendablebinary_empty_prologue_and_epilogue1< SizeTag< T > >
 
struct  cereal::is_extendablebinary_empty_prologue_and_epilogue1< BinaryData< T > >
 
struct  cereal::is_extendablebinary_internal_prologue_and_epilogue1< T >
 Types which has empty internal prologue and epilogue (version with one template argument) More...
 
struct  cereal::is_extendablebinary_internal_prologue_and_epilogue1< NameValuePair< T > >
 
struct  cereal::is_extendablebinary_internal_prologue_and_epilogue1< std::weak_ptr< T > >
 
struct  cereal::is_extendablebinary_internal_prologue_and_epilogue1< memory_detail::PtrWrapper< T > >
 
struct  cereal::is_extendablebinary_internal_prologue_and_epilogue1< detail::VersionIdTag< T > >
 
struct  cereal::is_extendablebinary_internal_prologue_and_epilogue1< detail::ObjectIdTag< T > >
 
struct  cereal::is_extendablebinary_internal_prologue_and_epilogue1< detail::PointerValidityTag< T > >
 
struct  cereal::is_extendablebinary_internal_prologue_and_epilogue1< detail::PolymorphicIdTag< T > >
 
struct  cereal::is_extendablebinary_internal_prologue_and_epilogue1< detail::PolymorphicKeyTag< T > >
 
struct  cereal::is_extendablebinary_internal_prologue_and_epilogue1< std::array< T, V > >
 
struct  cereal::longdouble< ExtendableBinaryInputArchive >
 
struct  cereal::longdouble< ExtendableBinaryOutputArchive >
 
struct  cereal::traits::wrap_polymorphic_weak_ptr< cereal::ExtendableBinaryOutputArchive >
 
struct  cereal::traits::wrap_polymorphic_weak_ptr< cereal::ExtendableBinaryInputArchive >
 

Functions

template<class T >
std::enable_if< std::is_same< T, bool >::value, void >::type cereal::CEREAL_SAVE_FUNCTION_NAME (ExtendableBinaryOutputArchive &ar, T const &t)
 Saving for bool types to ExtendableBinary archive.
 
template<class T >
std::enable_if< std::is_same< T, bool >::value, void >::type cereal::CEREAL_LOAD_FUNCTION_NAME (ExtendableBinaryInputArchive &ar, T &t)
 Loading for bool types from ExtendableBinary archive.
 
template<class T >
std::enable_if< std::is_integral< T >::value &&!std::is_same< T, bool >::value, void >::type cereal::CEREAL_SAVE_FUNCTION_NAME (ExtendableBinaryOutputArchive &ar, T const &t)
 Saving for integer types to ExtendableBinary archive.
 
template<class T >
std::enable_if< std::is_integral< T >::value &&!std::is_same< T, bool >::value, void >::type cereal::CEREAL_LOAD_FUNCTION_NAME (ExtendableBinaryInputArchive &ar, T &t)
 Loading for integer types from ExtendableBinary archive.
 
template<class T >
std::enable_if< std::is_floating_point< T >::value, void >::type cereal::CEREAL_SAVE_FUNCTION_NAME (ExtendableBinaryOutputArchive &ar, T const &t)
 Saving for floating point to ExtendableBinary archive.
 
template<class T >
std::enable_if< std::is_floating_point< T >::value, void >::type cereal::CEREAL_LOAD_FUNCTION_NAME (ExtendableBinaryInputArchive &ar, T &t)
 Loading for floating point types from ExtendableBinary archive.
 
template<class Archive , class T >
 cereal::CEREAL_SERIALIZE_FUNCTION_NAME (Archive &ar, NameValuePair< T > &t)
 Serializing NVP types to binary. More...
 
template<class T >
void cereal::CEREAL_SAVE_FUNCTION_NAME (ExtendableBinaryOutputArchive &ar, SizeTag< T > const &t)
 Saving SizeTag to ExtendableBinary archive.
 
template<class T >
void cereal::CEREAL_LOAD_FUNCTION_NAME (ExtendableBinaryInputArchive &ar, SizeTag< T > &t)
 Loading SizeTag from ExtendableBinary archive.
 
void cereal::CEREAL_SAVE_FUNCTION_NAME (ExtendableBinaryOutputArchive &ar, OmittedFieldTag const &)
 Saving OmittedFieldTag to ExtendableBinary archive.
 
void cereal::CEREAL_LOAD_FUNCTION_NAME (ExtendableBinaryInputArchive &ar, OmittedFieldTag &)
 Loading OmittedFieldTag from ExtendableBinary archive.
 
template<class T >
void cereal::CEREAL_SAVE_FUNCTION_NAME (ExtendableBinaryOutputArchive &ar, BinaryData< T > const &bd)
 Saving binary data to ExtendableBinary archive.
 
template<class T >
void cereal::CEREAL_LOAD_FUNCTION_NAME (ExtendableBinaryInputArchive &ar, BinaryData< T > &bd)
 Loading binary data from extendable binary. More...
 
template<class T >
void cereal::CEREAL_SAVE_FUNCTION_NAME (ExtendableBinaryOutputArchive &ar, detail::VersionIdTag< T > const &version)
 Saving VersionIdTag to ExtendableBinary archive.
 
template<class T >
void cereal::CEREAL_LOAD_FUNCTION_NAME (ExtendableBinaryInputArchive &ar, detail::VersionIdTag< T > &version)
 Loading VersionIdTag from ExtendableBinary archive.
 
template<class T >
void cereal::CEREAL_SAVE_FUNCTION_NAME (ExtendableBinaryOutputArchive &ar, detail::PolymorphicIdTag< T > const &polymorphicIdTag)
 Saving PolymorphicIdTag to ExtendableBinary archive.
 
template<class T >
void cereal::CEREAL_LOAD_FUNCTION_NAME (ExtendableBinaryInputArchive &ar, detail::PolymorphicIdTag< T > &polymorphicIdTag)
 Loading PolymorphicIdTag from ExtendableBinary archive.
 
template<class T >
void cereal::CEREAL_SAVE_FUNCTION_NAME (ExtendableBinaryOutputArchive &ar, detail::PolymorphicKeyTag< T > const &polymorphicKeyTag)
 Saving PolymorphicKeyTag to ExtendableBinary archive.
 
template<class T >
void cereal::CEREAL_LOAD_FUNCTION_NAME (ExtendableBinaryInputArchive &ar, detail::PolymorphicKeyTag< T > &polymorphicKeyTag)
 Loading PolymorphicKeyTag from ExtendableBinary archive.
 
template<class T >
void cereal::CEREAL_SAVE_FUNCTION_NAME (ExtendableBinaryOutputArchive &ar, detail::ObjectIdTag< T > const &objectIdTag)
 Saving ObjectIdTag to ExtendableBinary archive.
 
template<class T >
void cereal::CEREAL_LOAD_FUNCTION_NAME (ExtendableBinaryInputArchive &ar, detail::ObjectIdTag< T > &objectIdTag)
 Loading ObjectIdTag from ExtendableBinary archive.
 
template<class T >
void cereal::CEREAL_SAVE_FUNCTION_NAME (ExtendableBinaryOutputArchive &ar, detail::PointerValidityTag< T > const &pointerValidityTag)
 Saving PointerValidityTag to ExtendableBinary archive.
 
template<class T >
void cereal::CEREAL_LOAD_FUNCTION_NAME (ExtendableBinaryInputArchive &ar, detail::PointerValidityTag< T > &pointerValidityTag)
 Loading PointerValidityTag from ExtendableBinary archive.
 
template<class T , traits::EnableIf< is_extendablebinary_empty_prologue_and_epilogue1< T >::value > = traits::sfinae>
void cereal::prologue (ExtendableBinaryOutputArchive &ar, T const &)
 Prologue for arithmetic types for ExtendableBinary archives. More...
 
template<class T , traits::EnableIf< is_extendablebinary_empty_prologue_and_epilogue1< T >::value > = traits::sfinae>
FieldSerialized cereal::prologueLoad (ExtendableBinaryInputArchive &ar, T const &)
 Prologue for arithmetic types for ExtendableBinary archives. More...
 
template<class T , traits::EnableIf< is_extendablebinary_empty_prologue_and_epilogue1< T >::value > = traits::sfinae>
void cereal::epilogue (ExtendableBinaryOutputArchive &, T const &)
 Epilogue for arithmetic types for ExtendableBinary archives. More...
 
template<class T , traits::EnableIf< is_extendablebinary_empty_prologue_and_epilogue1< T >::value > = traits::sfinae>
void cereal::epilogue (ExtendableBinaryInputArchive &, T const &)
 Epilogue for arithmetic types for ExtendableBinary archives. More...
 

Detailed Description

Binary input and output archives with backward and forward compatibility.

Function Documentation

◆ CEREAL_LOAD_FUNCTION_NAME()

template<class T >
void cereal::CEREAL_LOAD_FUNCTION_NAME ( ExtendableBinaryInputArchive &  ar,
BinaryData< T > &  bd 
)
inline

Loading binary data from extendable binary.

Size of array is saved as varint. Apart from tag, size of element is saved.

◆ CEREAL_SERIALIZE_FUNCTION_NAME()

template<class Archive , class T >
cereal::CEREAL_SERIALIZE_FUNCTION_NAME ( Archive &  ar,
NameValuePair< T > &  t 
)
inline

Serializing NVP types to binary.

Serializing NVP types to portable binary.

Serializing NVP types to ExtendableBinary archive.

◆ epilogue() [1/2]

template<class T , traits::EnableIf< is_extendablebinary_empty_prologue_and_epilogue1< T >::value > = traits::sfinae>
void cereal::epilogue ( ExtendableBinaryOutputArchive &  ar,
T const &   
)
inline

Epilogue for arithmetic types for ExtendableBinary archives.

Epilogue for all non specified types for ExtendableBinary archives.

Epilogue for internal types for ExtendableBinary archives.

Finishes the node created in the prologue

◆ epilogue() [2/2]

template<class T , traits::EnableIf< is_extendablebinary_empty_prologue_and_epilogue1< T >::value > = traits::sfinae>
void cereal::epilogue ( ExtendableBinaryInputArchive &  ar,
T const &   
)
inline

Epilogue for arithmetic types for ExtendableBinary archives.

Epilogue for all non specified types for ExtendableBinary archives.

Epilogue for internal types for ExtendableBinary archives.

◆ prologue()

template<class T , traits::EnableIf< is_extendablebinary_empty_prologue_and_epilogue1< T >::value > = traits::sfinae>
void cereal::prologue ( ExtendableBinaryOutputArchive &  ar,
T const &   
)
inline

Prologue for arithmetic types for ExtendableBinary archives.

Prologue for all non specified types for ExtendableBinary archives.

Prologue for internal types for ExtendableBinary archives.

Marks beginning of new object in stream

◆ prologueLoad()

template<class T , traits::EnableIf< is_extendablebinary_empty_prologue_and_epilogue1< T >::value > = traits::sfinae>
FieldSerialized cereal::prologueLoad ( ExtendableBinaryInputArchive &  ar,
T const &   
)
inline

Prologue for arithmetic types for ExtendableBinary archives.

Prologue for all non specified types for ExtendableBinary archives.

Prologue for internal types for ExtendableBinary archives.