.TH "cereal::OutputArchive< ArchiveType, Flags >" 3 "Sat Aug 29 2026 00:42:30" "cereal" \" -*- nroff -*- .ad l .nh .SH NAME cereal::OutputArchive< ArchiveType, Flags > \- The base output archive class\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBcereal::detail::OutputArchiveBase\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBOutputArchive\fP (ArchiveType *const derived)" .br .RI "Construct the output archive\&. " .ti -1c .RI "\fBOutputArchive\fP & \fBoperator=\fP (\fBOutputArchive\fP const &)=delete" .br .ti -1c .RI "template ArchiveType & \fBoperator()\fP (Types &&\&.\&.\&. args)" .br .RI "Serializes all passed in data\&. " .ti -1c .RI "void \fBserializeDeferments\fP ()" .br .RI "Serializes any data marked for deferment using defer\&. " .ti -1c .RI "std::uint32_t \fBregisterSharedPointer\fP (const std::shared_ptr< const void > &sharedPointer)" .br .RI "Registers a shared pointer with the archive\&. " .ti -1c .RI "std::uint32_t \fBregisterPolymorphicType\fP (char const *name)" .br .RI "Registers a polymorphic type name with the archive\&. " .in -1c Public Member Functions inherited from \fBcereal::detail::OutputArchiveBase\fP .in +1c .ti -1c .RI "\fBOutputArchiveBase\fP (OutputArchiveBase &&) \fBCEREAL_NOEXCEPT\fP" .br .ti -1c .RI "OutputArchiveBase & \fBoperator=\fP (OutputArchiveBase &&) \fBCEREAL_NOEXCEPT\fP" .br .in -1c .SS "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()\&. .in +1c .ti -1c .RI "using \fBis_loading\fP = std::false_type" .br .RI "Indicates this archive is not intended for loading\&. " .ti -1c .RI "using \fBis_saving\fP = std::true_type" .br .RI "Indicates this archive is intended for saving\&. " .ti -1c .RI "template ArchiveType & \fBoperator&\fP (T &&arg)" .br .RI "Serializes passed in data\&. " .ti -1c .RI "template ArchiveType & \fBoperator<<\fP (T &&arg)" .br .RI "Serializes passed in data\&. " .in -1c .SH "Detailed Description" .PP .SS "template .br class cereal::OutputArchive< ArchiveType, Flags >"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\&. .PP The base class provides all of the functionality necessary to properly forward data to the correct serialization functions\&. .PP 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\&. .PP \fBTemplate Parameters\fP .RS 4 \fIArchiveType\fP The archive type that derives from \fBOutputArchive\fP .br \fI\fBFlags\fP\fP \fBFlags\fP to control advanced functionality\&. See the \fBFlags\fP enum for more information\&. .RE .PP .SH "Member Typedef Documentation" .PP .SS "template using \fBcereal::OutputArchive\fP< ArchiveType, \fBFlags\fP >::is_loading = std::false_type" .PP Indicates this archive is not intended for loading\&. This ensures compatibility with boost archive types\&. If you are transitioning from boost, you can check this value within a member or external serialize function (i\&.e\&., Archive::is_loading::value) to disable behavior specific to loading, until you can transition to split save/load or save_minimal/load_minimal functions .SS "template using \fBcereal::OutputArchive\fP< ArchiveType, \fBFlags\fP >::is_saving = std::true_type" .PP Indicates this archive is intended for saving\&. This ensures compatibility with boost archive types\&. If you are transitioning from boost, you can check this value within a member or external serialize function (i\&.e\&., Archive::is_saving::value) to enable behavior specific to loading, until you can transition to split save/load or save_minimal/load_minimal functions .SH "Constructor & Destructor Documentation" .PP .SS "template \fBcereal::OutputArchive\fP< ArchiveType, \fBFlags\fP >::OutputArchive (ArchiveType *const derived)\fR [inline]\fP" .PP Construct the output archive\&. .PP \fBParameters\fP .RS 4 \fIderived\fP A pointer to the derived ArchiveType (pass this from the derived archive) .RE .PP .SH "Member Function Documentation" .PP .SS "template template ArchiveType & \fBcereal::OutputArchive\fP< ArchiveType, \fBFlags\fP >::operator& (T && arg)\fR [inline]\fP" .PP 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 .SS "template template ArchiveType & \fBcereal::OutputArchive\fP< ArchiveType, \fBFlags\fP >::operator() (Types &&\&.\&.\&. args)\fR [inline]\fP" .PP Serializes all passed in data\&. This is the primary interface for serializing data with an archive .SS "template template ArchiveType & \fBcereal::OutputArchive\fP< ArchiveType, \fBFlags\fP >::operator<< (T && arg)\fR [inline]\fP" .PP 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 .SS "template std::uint32_t \fBcereal::OutputArchive\fP< ArchiveType, \fBFlags\fP >::registerPolymorphicType (char const * name)\fR [inline]\fP" .PP 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\&. .SS "template std::uint32_t \fBcereal::OutputArchive\fP< ArchiveType, \fBFlags\fP >::registerSharedPointer (const std::shared_ptr< const void > & sharedPointer)\fR [inline]\fP" .PP 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\&. .SS "template void \fBcereal::OutputArchive\fP< ArchiveType, \fBFlags\fP >::serializeDeferments ()\fR [inline]\fP" .PP Serializes any data marked for deferment using defer\&. This will cause any data wrapped in \fBDeferredData\fP to be immediately serialized .SH "Author" .PP Generated automatically by Doxygen for cereal from the source code\&.