MADNESS  0.10.1
Static Public Member Functions | List of all members
madness::archive::ArchiveImpl< Archive, T, Enabler > Struct Template Reference

Default implementations of wrap_store and wrap_load. More...

#include <archive.h>

Static Public Member Functions

template<typename A = Archive, typename = std::enable_if_t<is_input_archive_v<A> && has_nonmember_load_v<T,Archive>>>
static const Archive & wrap_load (const Archive &ar, const T &t)
 Load an object sandwiched between its preamble and postamble. More...
 
template<typename A = Archive, typename = std::enable_if_t<is_output_archive_v<A> && has_nonmember_store_v<T,Archive>>>
static const Archive & wrap_store (const Archive &ar, const T &t)
 Store an object sandwiched between its preamble and postamble. More...
 

Detailed Description

template<class Archive, class T, typename Enabler>
struct madness::archive::ArchiveImpl< Archive, T, Enabler >

Default implementations of wrap_store and wrap_load.

"Wrapping" refers to the addition of the type's preamble and postamble around the data to provide runtime type-checking.

Template Parameters
ArchiveThe archive type.
TThe data type.

Member Function Documentation

◆ wrap_load()

template<class Archive , class T , typename Enabler >
template<typename A = Archive, typename = std::enable_if_t<is_input_archive_v<A> && has_nonmember_load_v<T,Archive>>>
static const Archive& madness::archive::ArchiveImpl< Archive, T, Enabler >::wrap_load ( const Archive &  ar,
const T t 
)
inlinestatic

◆ wrap_store()

template<class Archive , class T , typename Enabler >
template<typename A = Archive, typename = std::enable_if_t<is_output_archive_v<A> && has_nonmember_store_v<T,Archive>>>
static const Archive& madness::archive::ArchiveImpl< Archive, T, Enabler >::wrap_store ( const Archive &  ar,
const T t 
)
inlinestatic

Store an object sandwiched between its preamble and postamble.

Parameters
[in]arThe archive.
[in]tThe data.
Returns
The archive.

References MAD_ARCHIVE_DEBUG, madness::archive::ArchivePrePostImpl< Archive, T >::postamble_store(), madness::archive::ArchivePrePostImpl< Archive, T >::preamble_store(), and madness::archive::ArchiveStoreImpl< Archive, T, Enabler >::store().

Referenced by madness::archive::operator&().


The documentation for this struct was generated from the following file: