| cereal::detail::OutputBindingCreator< Archive, T >(3) | Library Functions Manual | cereal::detail::OutputBindingCreator< Archive, T >(3) |
NAME
cereal::detail::OutputBindingCreator< Archive, T > - Creates a binding (map entry) between an output archive type and a polymorphic type.
SYNOPSIS
#include </home/build/include/cereal/details/polymorphic_impl.hpp>
Classes
class PolymorphicSharedPointerWrapper
Holds a properly typed shared_ptr to the polymorphic type.
Public Member Functions
OutputBindingCreator ()
Initialize the binding.
Static Public Member Functions
static void writeMetadata (Archive &ar)
Writes appropriate metadata to the archive for this polymorphic type. static
void savePolymorphicSharedPtr (Archive &ar, T const *dptr,
std::true_type)
Does the actual work of saving a polymorphic shared_ptr. static void
savePolymorphicSharedPtr (Archive &ar, T const *dptr,
std::false_type)
Does the actual work of saving a polymorphic shared_ptr.
Detailed Description
template<class Archive, class T>
struct cereal::detail::OutputBindingCreator< Archive, T >"Creates a binding (map entry) between an output archive type and a polymorphic type.
Bindings are made when types are registered, assuming that at least one archive has already been registered. When this struct is created, it will insert (at run time) an entry into a map that properly handles casting for serializing polymorphic objects
Member Function Documentation
template<class Archive, class T> void cereal::detail::OutputBindingCreator< Archive, T >::savePolymorphicSharedPtr (Archive & ar, T const * dptr, std::false_type ) [inline], [static]
Does the actual work of saving a polymorphic shared_ptr. This function will properly create a shared_ptr from the void * that is passed in before passing it to the archive for serialization.
This version is for types that do not inherit from std::enable_shared_from_this.
Parameters
dptr Pointer to the actual data held by the shared_ptr
template<class Archive, class T> void cereal::detail::OutputBindingCreator< Archive, T >::savePolymorphicSharedPtr (Archive & ar, T const * dptr, std::true_type ) [inline], [static]
Does the actual work of saving a polymorphic shared_ptr. This function will properly create a shared_ptr from the void * that is passed in before passing it to the archive for serialization.
In addition, this will also preserve the state of any internal enable_shared_from_this mechanisms
Parameters
dptr Pointer to the actual data held by the shared_ptr
Author
Generated automatically by Doxygen for cereal from the source code.
| Sat Oct 10 2026 08:08:15 | cereal |