Creates a binding (map entry) between an output archive type and a polymorphic type.
More...
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
template<class Archive , class T >
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
-
ar | The archive to serialize to |
dptr | Pointer to the actual data held by the shared_ptr |
template<class Archive , class T >
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
-
ar | The archive to serialize to |
dptr | Pointer to the actual data held by the shared_ptr |