Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
serialize.hpp File Reference
Include dependency graph for serialize.hpp:
This graph shows which files directly or indirectly include this file:

Classes

class  boost::python::pickle
 INTERNAL ONLY. More...
 
struct  boost::python::has_direct_serialization< IArchiver, OArchiver >
 Whether the input/output archiver pair has "direct" serialization for C++ objects exposed in Python. More...
 
struct  boost::python::output_archiver< IArchiver >
 A metafunction that determines the output archiver for the given input archiver. More...
 
struct  boost::python::input_archiver< OArchiver >
 A metafunction that determines the input archiver for the given output archiver. More...
 
class  boost::python::detail::direct_serialization_table< IArchiver, OArchiver >
 INTERNAL ONLY. More...
 
struct  boost::python::detail::direct_serialization_table< IArchiver, OArchiver >::default_saver< T >
 
struct  boost::python::detail::direct_serialization_table< IArchiver, OArchiver >::default_loader< T >
 
struct  boost::python::api::enable_binary< ::boost::mpi::packed_iarchive, R, T >
 
struct  boost::python::api::enable_binary< ::boost::mpi::packed_oarchive, R, T >
 
struct  boost::python::has_direct_serialization< ::boost::mpi::packed_iarchive,::boost::mpi::packed_oarchive >
 
struct  boost::python::output_archiver< ::boost::mpi::packed_iarchive >
 
struct  boost::python::input_archiver< ::boost::mpi::packed_oarchive >
 

Namespaces

 boost
 Duration formatting facet for input.
 
 boost::python
 
 boost::python::detail
 
 boost::mpi
 
 boost::python::api
 
 boost::mpi::python
 

Macros

#define BOOST_MPI_PYTHON_FORWARD_ONLY
 
#define BOOST_PYTHON_SERIALIZATION_ARCHIVE(IArchiver, OArchiver)
 Declare IArchive and OArchive as a Boost.Serialization archives that can be used for Python objects. More...
 
#define BOOST_PYTHON_DIRECT_SERIALIZATION_ARCHIVE(IArchiver, OArchiver)
 Declare IArchiver and OArchiver as a Boost.Serialization archives that can be used for Python objects and C++ objects wrapped in Python. More...
 
#define BOOST_PYTHON_DIRECT_SERIALIZATION_ARCHIVE_IMPL(IArchiver, OArchiver)
 Define the implementation for Boost.Serialization archivers that can be used for Python objects and C++ objects wrapped in Python. More...
 

Functions

template<typename IArchiver , typename OArchiver >
direct_serialization_table
< IArchiver, OArchiver > & 
boost::python::detail::get_direct_serialization_table ()
 Retrieve the direct-serialization table for an IArchiver/OArchiver pair. More...
 
template<typename IArchiver , typename OArchiver , typename T >
void boost::python::register_serialized (const T &value=T(), PyTypeObject *type=0)
 Register the type T for direct serialization. More...
 
template<typename Archiver >
void boost::python::detail::save_impl (Archiver &ar, const boost::python::object &obj, const unsigned int, mpl::false_)
 Save a Python object by pickling it. More...
 
template<typename Archiver >
void boost::python::detail::save_impl (Archiver &ar, const boost::python::object &obj, const unsigned int version, mpl::true_)
 Try to save a Python object by directly serializing it; fall back on pickling if required. More...
 
template<typename Archiver >
void boost::python::detail::load_impl (Archiver &ar, boost::python::object &obj, const unsigned int, mpl::false_)
 Load a Python object by unpickling it. More...
 
template<typename Archiver >
void boost::python::detail::load_impl (Archiver &ar, boost::python::object &obj, const unsigned int version, mpl::true_)
 Try to load a Python object by directly deserializing it; fall back on unpickling if required. More...
 
template<typename Archiver >
void boost::python::save (Archiver &ar, const boost::python::object &obj, const unsigned int version)
 
template<typename Archiver >
void boost::python::load (Archiver &ar, boost::python::object &obj, const unsigned int version)
 
template<typename Archive >
void boost::python::serialize (Archive &ar, boost::python::object &obj, const unsigned int version)
 
template<>
BOOST_MPI_PYTHON_DECL
direct_serialization_table
< ::boost::mpi::packed_iarchive,::boost::mpi::packed_oarchive > & 
boost::python::detail::get_direct_serialization_table< ::boost::mpi::packed_iarchive,::boost::mpi::packed_oarchive > ()
 
template<typename T >
void boost::mpi::python::register_serialized (const T &value=T(), PyTypeObject *type=0)
 Register the type T for direct serialization within Boost.MPI. More...
 

Macro Definition Documentation

#define BOOST_MPI_PYTHON_FORWARD_ONLY
#define BOOST_PYTHON_DIRECT_SERIALIZATION_ARCHIVE (   IArchiver,
  OArchiver 
)
Value:
BOOST_PYTHON_SERIALIZATION_ARCHIVE(IArchiver, OArchiver) \
namespace boost { namespace python { namespace detail { \
template<> \
BOOST_MPI_PYTHON_DECL direct_serialization_table< IArchiver , OArchiver >& \
get_direct_serialization_table< IArchiver , OArchiver >(); \
} \
\
template<> \
struct has_direct_serialization< IArchiver , OArchiver> : mpl::true_ { }; \
\
template<> \
struct output_archiver< IArchiver > { typedef OArchiver type; }; \
\
template<> \
struct input_archiver< OArchiver > { typedef IArchiver type; }; \
} }
bool_< true > true_
Definition: bool_fwd.hpp:21
Duration formatting facet for input.
Definition: accumulators_fwd.hpp:55
#define BOOST_MPI_PYTHON_DECL
Definition: config.hpp:33
#define BOOST_PYTHON_SERIALIZATION_ARCHIVE(IArchiver, OArchiver)
Declare IArchive and OArchive as a Boost.Serialization archives that can be used for Python objects...
Definition: serialize.hpp:62
adjacency_iterator typedef T::adjacency_iterator type
Definition: graph_traits.hpp:42

Declare IArchiver and OArchiver as a Boost.Serialization archives that can be used for Python objects and C++ objects wrapped in Python.

This macro can only be expanded from the global namespace. It only requires that IArchiver and OArchiver be forward-declared. However, note that you will also need to write BOOST_PYTHON_DIRECT_SERIALIZATION_ARCHIVE_IMPL(IArchiver, OArchiver) in one of your translation units.

DPG PICK UP HERE

#define BOOST_PYTHON_DIRECT_SERIALIZATION_ARCHIVE_IMPL (   IArchiver,
  OArchiver 
)
Value:
namespace boost { namespace python { namespace detail { \
template \
class BOOST_MPI_PYTHON_DECL direct_serialization_table< IArchiver , OArchiver >; \
\
template<> \
BOOST_MPI_PYTHON_DECL \
direct_serialization_table< IArchiver , OArchiver >& \
get_direct_serialization_table< IArchiver , OArchiver >( ) \
{ \
static direct_serialization_table< IArchiver, OArchiver > table; \
return table; \
} \
} } }
Duration formatting facet for input.
Definition: accumulators_fwd.hpp:55
#define BOOST_MPI_PYTHON_DECL
Definition: config.hpp:33

Define the implementation for Boost.Serialization archivers that can be used for Python objects and C++ objects wrapped in Python.

This macro can only be expanded from the global namespace. It only requires that IArchiver and OArchiver be forward-declared. Before using this macro, you will need to declare IArchiver and OArchiver as direct serialization archives with BOOST_PYTHON_DIRECT_SERIALIZATION_ARCHIVE(IArchiver, OArchiver).

#define BOOST_PYTHON_SERIALIZATION_ARCHIVE (   IArchiver,
  OArchiver 
)
Value:
namespace boost { namespace python { namespace api { \
template<typename R, typename T> \
struct enable_binary< IArchiver , R, T> {}; \
\
template<typename R, typename T> \
struct enable_binary< OArchiver , R, T> {}; \
} } }
Duration formatting facet for input.
Definition: accumulators_fwd.hpp:55

Declare IArchive and OArchive as a Boost.Serialization archives that can be used for Python objects.

This macro can only be expanded from the global namespace. It only requires that Archiver be forward-declared. IArchiver and OArchiver will only support Serialization of Python objects by pickling them. If the Archiver type should also support "direct" serialization (for C++ types), use BOOST_PYTHON_DIRECT_SERIALIZATION_ARCHIVE instead.