.. _program_listing_file_include_coal_serialization_fwd.h: Program Listing for File fwd.h ============================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/coal/serialization/fwd.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp // // Copyright (c) 2021-2024 INRIA // #ifndef COAL_SERIALIZATION_FWD_H #define COAL_SERIALIZATION_FWD_H #include #include #include #include #include #include #include #include #include #include #include "coal/fwd.hh" #include "coal/serialization/eigen.h" #define COAL_SERIALIZATION_SPLIT(Type) \ template \ void serialize(Archive& ar, Type& value, const unsigned int version) { \ split_free(ar, value, version); \ } #define COAL_SERIALIZATION_DECLARE_EXPORT(T) \ BOOST_CLASS_EXPORT_KEY(T) \ namespace boost { \ namespace archive { \ namespace detail { \ namespace extra_detail { \ template <> \ struct init_guid { \ static guid_initializer const& g; \ }; \ } \ } \ } \ } \ #define COAL_SERIALIZATION_DEFINE_EXPORT(T) \ namespace boost { \ namespace archive { \ namespace detail { \ namespace extra_detail { \ guid_initializer const& init_guid::g = \ ::boost::serialization::singleton< \ guid_initializer >::get_mutable_instance() \ .export_guid(); \ } \ } \ } \ } \ namespace coal { namespace serialization { namespace detail { template struct init_cast_register {}; template struct cast_register_initializer { void init(std::true_type) const { boost::serialization::void_cast_register(); } void init(std::false_type) const {} cast_register_initializer const& init() const { COAL_COMPILER_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic ignored \"-Wconversion\"") BOOST_STATIC_WARNING((std::is_base_of::value)); COAL_COMPILER_DIAGNOSTIC_POP init(std::is_base_of()); return *this; } }; } // namespace detail template struct register_type { template static void on(Archive& /*ar*/) {} }; } // namespace serialization } // namespace coal #define COAL_SERIALIZATION_CAST_REGISTER(Derived, Base) \ namespace coal { \ namespace serialization { \ namespace detail { \ template <> \ struct init_cast_register { \ static cast_register_initializer const& g; \ }; \ cast_register_initializer const& init_cast_register< \ Derived, Base>::g = \ ::boost::serialization::singleton< \ cast_register_initializer >::get_mutable_instance() \ .init(); \ } \ } \ } #endif // ifndef COAL_SERIALIZATION_FWD_H