.TH "cereal::InputArchive< ArchiveType, Flags >" 3 "Sat Aug 29 2026 00:42:30" "cereal" \" -*- nroff -*- .ad l .nh .SH NAME cereal::InputArchive< ArchiveType, Flags > \- The base input archive class\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBcereal::detail::InputArchiveBase\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBInputArchive\fP (ArchiveType *const derived)" .br .RI "Construct the output archive\&. " .ti -1c .RI "\fBInputArchive\fP & \fBoperator=\fP (\fBInputArchive\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::shared_ptr< void > \fBgetSharedPointer\fP (std::uint32_t const id)" .br .RI "Retrieves a shared pointer given a unique key for it\&. " .ti -1c .RI "void \fBregisterSharedPointer\fP (std::uint32_t const id, std::shared_ptr< void > ptr)" .br .RI "Registers a shared pointer to its unique identifier\&. " .ti -1c .RI "std::string \fBgetPolymorphicName\fP (std::uint32_t const id)" .br .RI "Retrieves the string for a polymorphic type given a unique key for it\&. " .ti -1c .RI "void \fBregisterPolymorphicName\fP (std::uint32_t const id, std::string const &name)" .br .RI "Registers a polymorphic name string to its unique identifier\&. " .in -1c Public Member Functions inherited from \fBcereal::detail::InputArchiveBase\fP .in +1c .ti -1c .RI "\fBInputArchiveBase\fP (InputArchiveBase &&) \fBCEREAL_NOEXCEPT\fP" .br .ti -1c .RI "InputArchiveBase & \fBoperator=\fP (InputArchiveBase &&) \fBCEREAL_NOEXCEPT\fP" .br .in -1c .SS "Friends" .in +1c .ti -1c .RI "template struct \fBdetail::Construct\fP" .br .RI "Befriend for versioning in load_and_construct\&. " .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::true_type" .br .RI "Indicates this archive is intended for loading\&. " .ti -1c .RI "using \fBis_saving\fP = std::false_type" .br .RI "Indicates this archive is not 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::InputArchive< ArchiveType, Flags >"The base input archive class\&. This is the base input archive for all input 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 \fBInputArchive\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::InputArchive\fP< ArchiveType, \fBFlags\fP >::is_loading = std::true_type" .PP Indicates this archive is 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 enable behavior specific to loading, until you can transition to split save/load or save_minimal/load_minimal functions .SS "template using \fBcereal::InputArchive\fP< ArchiveType, \fBFlags\fP >::is_saving = std::false_type" .PP Indicates this archive is not 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 disable 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::InputArchive\fP< ArchiveType, \fBFlags\fP >::InputArchive (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 std::string \fBcereal::InputArchive\fP< ArchiveType, \fBFlags\fP >::getPolymorphicName (std::uint32_t const id)\fR [inline]\fP" .PP Retrieves the string for a polymorphic type given a unique key for it\&. This is used to retrieve a string previously registered during a polymorphic load\&. .SS "template std::shared_ptr< void > \fBcereal::InputArchive\fP< ArchiveType, \fBFlags\fP >::getSharedPointer (std::uint32_t const id)\fR [inline]\fP" .PP Retrieves a shared pointer given a unique key for it\&. This is used to retrieve a previously registered shared_ptr which has already been loaded\&. .SS "template template ArchiveType & \fBcereal::InputArchive\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::InputArchive\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::InputArchive\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 void \fBcereal::InputArchive\fP< ArchiveType, \fBFlags\fP >::registerPolymorphicName (std::uint32_t const id, std::string const & name)\fR [inline]\fP" .PP Registers a polymorphic name string to its unique identifier\&. After a polymorphic type has been loaded for the first time, it should be registered with its loaded id for future references to it\&. .SS "template void \fBcereal::InputArchive\fP< ArchiveType, \fBFlags\fP >::registerSharedPointer (std::uint32_t const id, std::shared_ptr< void > ptr)\fR [inline]\fP" .PP Registers a shared pointer to its unique identifier\&. After a shared pointer has been allocated for the first time, it should be registered with its loaded id for future references to it\&. .SS "template void \fBcereal::InputArchive\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\&.