.TH "cereal::detail::OutputBindingCreator< Archive, T >" 3 "Mon Oct 26 2026 20:39:03" "cereal" \" -*- nroff -*- .ad l .nh .SH NAME cereal::detail::OutputBindingCreator< Archive, T > \- Creates a binding (map entry) between an output archive type and a polymorphic type\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .SS "Classes" .in +1c .ti -1c .RI "class \fBPolymorphicSharedPointerWrapper\fP" .br .RI "Holds a properly typed shared_ptr to the polymorphic type\&. " .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBOutputBindingCreator\fP ()" .br .RI "Initialize the binding\&. " .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static void \fBwriteMetadata\fP (Archive &ar)" .br .RI "Writes appropriate metadata to the archive for this polymorphic type\&. " .ti -1c .RI "static void \fBsavePolymorphicSharedPtr\fP (Archive &ar, T const *dptr, std::true_type)" .br .RI "Does the actual work of saving a polymorphic shared_ptr\&. " .ti -1c .RI "static void \fBsavePolymorphicSharedPtr\fP (Archive &ar, T const *dptr, std::false_type)" .br .RI "Does the actual work of saving a polymorphic shared_ptr\&. " .in -1c .SH "Detailed Description" .PP .SS "template .br 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 .SH "Member Function Documentation" .PP .SS "template void \fBcereal::detail::OutputBindingCreator\fP< Archive, T >::savePolymorphicSharedPtr (Archive & ar, T const * dptr, std::false_type )\fR [inline]\fP, \fR [static]\fP" .PP 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\&. .PP This version is for types that do not inherit from std::enable_shared_from_this\&. .PP \fBParameters\fP .RS 4 \fIar\fP The archive to serialize to .br \fIdptr\fP Pointer to the actual data held by the shared_ptr .RE .PP .SS "template void \fBcereal::detail::OutputBindingCreator\fP< Archive, T >::savePolymorphicSharedPtr (Archive & ar, T const * dptr, std::true_type )\fR [inline]\fP, \fR [static]\fP" .PP 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\&. .PP In addition, this will also preserve the state of any internal enable_shared_from_this mechanisms .PP \fBParameters\fP .RS 4 \fIar\fP The archive to serialize to .br \fIdptr\fP Pointer to the actual data held by the shared_ptr .RE .PP .SH "Author" .PP Generated automatically by Doxygen for cereal from the source code\&.