OS Manuals

cereal_detail_PolymorphicCaster(3)

cereal::detail::PolymorphicCaster - Base type for polymorphic void casting.

cereal::detail::PolymorphicCaster(3) Library Functions Manual cereal::detail::PolymorphicCaster(3)

cereal::detail::PolymorphicCaster - Base type for polymorphic void casting.

#include </home/build/include/cereal/details/polymorphic_impl.hpp>

Inherited by cereal::detail::PolymorphicVirtualCaster< Base, Derived >.


PolymorphicCaster (const PolymorphicCaster &)=default
PolymorphicCaster & operator= (const PolymorphicCaster &)=default
PolymorphicCaster (PolymorphicCaster &&) CEREAL_NOEXCEPT
PolymorphicCaster & operator= (PolymorphicCaster &&) CEREAL_NOEXCEPT
virtual void const * downcast (void const *const ptr) const =0
Downcasts to the proper derived type. virtual void * upcast (void *const ptr) const =0
Upcast to proper base type. virtual std::shared_ptr< void > upcast (std::shared_ptr< void > const &ptr) const =0
Upcast to proper base type, shared_ptr version.

Base type for polymorphic void casting.

Contains functions for casting between registered base and derived types.

This is necessary so that cereal can properly cast between polymorphic types even though void pointers are used, which normally have no type information. Runtime type information is used instead to index a compile-time made mapping that can perform the proper cast. In the case of multiple levels of inheritance, cereal will attempt to find the shortest path by using registered relationships to perform the cast.

This class will be allocated as a StaticObject and only referenced by pointer, allowing a templated derived version of it to define strongly typed functions that cast between registered base and derived types.

Downcasts to the proper derived type.

Implemented in cereal::detail::PolymorphicVirtualCaster< Base, Derived >.

Upcast to proper base type, shared_ptr version.

Implemented in cereal::detail::PolymorphicVirtualCaster< Base, Derived >.

Upcast to proper base type.

Implemented in cereal::detail::PolymorphicVirtualCaster< Base, Derived >.

Generated automatically by Doxygen for cereal from the source code.

Sat Oct 10 2026 08:08:15 cereal

cereal 1.3.2-r6 · enterprise-packages · ingested 2026-10-10