| cereal::access(3) | Library Functions Manual | cereal::access(3) |
NAME
cereal::access - A class that can be made a friend to give cereal access to non public functions.
SYNOPSIS
#include </home/build/include/cereal/access.hpp>
Static Public Member Functions
template<class Archive, class T> static auto
member_serialize (Archive &ar, T &t) ->
decltype(t.CEREAL_SERIALIZE_FUNCTION_NAME(ar))
template<class Archive, class T> static auto member_save (Archive
&ar, T const &t) -> decltype(t.CEREAL_SAVE_FUNCTION_NAME(ar))
template<class Archive, class T> static auto
member_save_non_const (Archive &ar, T &t) ->
decltype(t.CEREAL_SAVE_FUNCTION_NAME(ar))
template<class Archive, class T> static auto member_load (Archive
&ar, T &t) -> decltype(t.CEREAL_LOAD_FUNCTION_NAME(ar))
template<class Archive, class T> static auto member_save_minimal
(Archive const &ar, T const &t) ->
decltype(t.CEREAL_SAVE_MINIMAL_FUNCTION_NAME(ar))
template<class Archive, class T> static auto
member_save_minimal_non_const (Archive const &ar, T &t) ->
decltype(t.CEREAL_SAVE_MINIMAL_FUNCTION_NAME(ar))
template<class Archive, class T, class U> static auto
member_load_minimal (Archive const &ar, T &t, U &&u)
-> decltype(t.CEREAL_LOAD_MINIMAL_FUNCTION_NAME(ar, std::forward< U
>(u)))
template<class Archive, class T> static auto member_serialize
(Archive &ar, T &t, const std::uint32_t version) ->
decltype(t.CEREAL_SERIALIZE_FUNCTION_NAME(ar, version))
template<class Archive, class T> static auto member_save (Archive
&ar, T const &t, const std::uint32_t version) ->
decltype(t.CEREAL_SAVE_FUNCTION_NAME(ar, version))
template<class Archive, class T> static auto
member_save_non_const (Archive &ar, T &t, const std::uint32_t
version) -> decltype(t.CEREAL_SAVE_FUNCTION_NAME(ar, version))
template<class Archive, class T> static auto member_load (Archive
&ar, T &t, const std::uint32_t version) ->
decltype(t.CEREAL_LOAD_FUNCTION_NAME(ar, version))
template<class Archive, class T> static auto member_save_minimal
(Archive const &ar, T const &t, const std::uint32_t version) ->
decltype(t.CEREAL_SAVE_MINIMAL_FUNCTION_NAME(ar, version))
template<class Archive, class T> static auto
member_save_minimal_non_const (Archive const &ar, T &t, const
std::uint32_t version) ->
decltype(t.CEREAL_SAVE_MINIMAL_FUNCTION_NAME(ar, version))
template<class Archive, class T, class U> static auto
member_load_minimal (Archive const &ar, T &t, U &&u,
const std::uint32_t version) ->
decltype(t.CEREAL_LOAD_MINIMAL_FUNCTION_NAME(ar, std::forward< U >(u),
version))
template<class T> static auto shared_from_this (T &t) ->
decltype(t.shared_from_this())
template<class T, class ... Args> static void construct (T
*&ptr, Args &&... args)
template<class T> static T * construct ()
template<class T> static std::false_type load_and_construct (...)
template<class T, class Archive> static auto load_and_construct
(Archive &ar, ::cereal::construct< T > &construct)
-> decltype(T::load_and_construct(ar, construct))
template<class T, class Archive> static auto load_and_construct
(Archive &ar, ::cereal::construct< T > &construct,
const std::uint32_t version) -> decltype(T::load_and_construct(ar,
construct, version))
Detailed Description
A class that can be made a friend to give cereal access to non public functions.
If you desire non-public serialization functions within a class, cereal can only access these if you declare cereal::access a friend.
class MyClass
{
private:
friend class cereal::access; // gives access to the private serialize
template <class Archive>
void serialize( Archive & ar )
{
// some code
}
};
Author
Generated automatically by Doxygen for cereal from the source code.
| Mon Oct 26 2026 02:55:37 | cereal |