Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
T_Multiple_archives_serialization_xml_oarchive< DataType, OutputArchive, IsLessData > Class Template Reference

XML output archive decoupling the data to put in the archive and data to possibly put in a secondary file. More...

#include <Multiple_archives_serialization_xml_oarchive.hpp>

Constructors / Destructors

 T_Multiple_archives_serialization_xml_oarchive (std::ostream &out, const unsigned BOOST_PFTO int flags=0)
 Initializes with a file for the xml archive, but without any secondary archive. More...
 
 T_Multiple_archives_serialization_xml_oarchive (std::ostream &out, std::ostream &sec_out, const unsigned BOOST_PFTO int flags=0)
 Initializes with a file for the xml archive, and a file for the secondary archive. More...
 
 T_Multiple_archives_serialization_xml_oarchive (std::ostream &out, Self &other, const unsigned BOOST_PFTO int flags=0)
 Initializes with a file for the xml archive, and fill the data map with an existing one. More...
 
 ~T_Multiple_archives_serialization_xml_oarchive (void)
 Deletes the secondary archive, if any. More...
 

Storing Data

unsigned store_data (const DataType &t)
 Stores in the map (and in the secondary archive if any) the input data, and return its serialization index. More...
 
unsigned store_data (const DataType *t)
 Stores in the map (and in the secondary archive if any) the input data, and return its serialization index. More...
 

Overrloaded Methods

template<class T >
void save_override (const T &t, const unsigned BOOST_PFTO int flags)
 Saves any kind of data in the xml archive. More...
 
template<class T >
void save_override (const T &t)
 Saves any kind of data in the xml archive. More...
 
void save_override (boost::serialization::nvp< DataType > t, const unsigned BOOST_PFTO int flags)
 Saves the input data in the archive by printing its index saved in the map. More...
 
void save_override (boost::serialization::nvp< DataType > t)
 Saves the input data in the archive by printing its index saved in the map. More...
 
void save_override (boost::serialization::nvp< DataType *> t, const unsigned BOOST_PFTO int flags)
 Saves the input data in the archive by printing its index saved in the map. More...
 
void save_override (boost::serialization::nvp< DataType *> t)
 Saves the input data in the archive by printing its index saved in the map. More...
 
template<class T , class Allocator >
void save_override (boost::serialization::nvp< std::list< T, Allocator > > t, const unsigned BOOST_PFTO int flags)
 Override list serialization. More...
 
template<class T , class Allocator >
void save_override (boost::serialization::nvp< std::list< T, Allocator > > t)
 Override list serialization. More...
 
template<class T , class Allocator >
void save_override (boost::serialization::nvp< std::vector< T, Allocator > > t, const unsigned BOOST_PFTO int flags)
 Override vector serialization. More...
 
template<class T , class Allocator >
void save_override (boost::serialization::nvp< std::vector< T, Allocator > > t)
 Override vector serialization. More...
 
template<class T , class Compare , class Allocator >
void save_override (boost::serialization::nvp< std::set< T, Compare, Allocator > > t, const unsigned BOOST_PFTO int flags)
 Override set serialization. More...
 
template<class T , class Compare , class Allocator >
void save_override (boost::serialization::nvp< std::set< T, Compare, Allocator > > t)
 Override set serialization. More...
 
template<class T , class Compare , class Allocator >
void save_override (boost::serialization::nvp< std::multiset< T, Compare, Allocator > > t, const unsigned BOOST_PFTO int flags)
 Override multiset serialization. More...
 
template<class T , class Compare , class Allocator >
void save_override (boost::serialization::nvp< std::multiset< T, Compare, Allocator > > t)
 Override multiset serialization. More...
 
template<class Key , class T , class Compare , class Allocator >
void save_override (boost::serialization::nvp< std::map< Key, T, Compare, Allocator > > t, const unsigned BOOST_PFTO int flags)
 Override map serialization. More...
 
template<class Key , class T , class Compare , class Allocator >
void save_override (boost::serialization::nvp< std::map< Key, T, Compare, Allocator > > t)
 Override map serialization. More...
 
template<class Key , class T , class Compare , class Allocator >
void save_override (boost::serialization::nvp< std::multimap< Key, T, Compare, Allocator > > t, const unsigned BOOST_PFTO int flags)
 Override multimap serialization. More...
 
template<class Key , class T , class Compare , class Allocator >
void save_override (boost::serialization::nvp< std::multimap< Key, T, Compare, Allocator > > t)
 Override multimap serialization. More...
 

Detailed Description

template<class DataType, class OutputArchive = boost::archive::text_oarchive, class IsLessData = std::less<DataType>>
class SBL::IO::T_Multiple_archives_serialization_xml_oarchive< DataType, OutputArchive, IsLessData >

XML output archive decoupling the data to put in the archive and data to possibly put in a secondary file.

It attributes to each data an index that will be used for referencing in the xml archive the data possibly serialized in a secondary archive. The method store_data allows to store in a unique cpy of the data in the secondary archive. Then, the XML archive can be used as usual for serializing other data structures containing the partially serialized data structure.

Template Parameters
DataTypeData to partially serialize (it has to be comparable).
OutputArchiveSecondary archive type (default is text).
IsLessDataLess comparator for DataType used for storing the data in the map (default is natural less operator).

Constructor & Destructor Documentation

◆ T_Multiple_archives_serialization_xml_oarchive() [1/3]

T_Multiple_archives_serialization_xml_oarchive ( std::ostream &  out,
const unsigned BOOST_PFTO int  flags = 0 
)
inline

Initializes with a file for the xml archive, but without any secondary archive.

◆ T_Multiple_archives_serialization_xml_oarchive() [2/3]

T_Multiple_archives_serialization_xml_oarchive ( std::ostream &  out,
std::ostream &  sec_out,
const unsigned BOOST_PFTO int  flags = 0 
)
inline

Initializes with a file for the xml archive, and a file for the secondary archive.

◆ T_Multiple_archives_serialization_xml_oarchive() [3/3]

T_Multiple_archives_serialization_xml_oarchive ( std::ostream &  out,
Self other,
const unsigned BOOST_PFTO int  flags = 0 
)
inline

Initializes with a file for the xml archive, and fill the data map with an existing one.

◆ ~T_Multiple_archives_serialization_xml_oarchive()

Deletes the secondary archive, if any.

Member Function Documentation

◆ save_override() [1/18]

void save_override ( const T &  t,
const unsigned BOOST_PFTO int  flags 
)
inline

Saves any kind of data in the xml archive.

◆ save_override() [2/18]

void save_override ( const T &  t)
inline

Saves any kind of data in the xml archive.

◆ save_override() [3/18]

void save_override ( boost::serialization::nvp< DataType >  t,
const unsigned BOOST_PFTO int  flags 
)
inline

Saves the input data in the archive by printing its index saved in the map.

◆ save_override() [4/18]

void save_override ( boost::serialization::nvp< DataType >  t)
inline

Saves the input data in the archive by printing its index saved in the map.

◆ save_override() [5/18]

void save_override ( boost::serialization::nvp< DataType *>  t,
const unsigned BOOST_PFTO int  flags 
)
inline

Saves the input data in the archive by printing its index saved in the map.

◆ save_override() [6/18]

void save_override ( boost::serialization::nvp< DataType *>  t)
inline

Saves the input data in the archive by printing its index saved in the map.

◆ save_override() [7/18]

void save_override ( boost::serialization::nvp< std::list< T, Allocator > >  t,
const unsigned BOOST_PFTO int  flags 
)
inline

Override list serialization.

◆ save_override() [8/18]

void save_override ( boost::serialization::nvp< std::list< T, Allocator > >  t)
inline

Override list serialization.

◆ save_override() [9/18]

void save_override ( boost::serialization::nvp< std::vector< T, Allocator > >  t,
const unsigned BOOST_PFTO int  flags 
)
inline

Override vector serialization.

◆ save_override() [10/18]

void save_override ( boost::serialization::nvp< std::vector< T, Allocator > >  t)
inline

Override vector serialization.

◆ save_override() [11/18]

void save_override ( boost::serialization::nvp< std::set< T, Compare, Allocator > >  t,
const unsigned BOOST_PFTO int  flags 
)
inline

Override set serialization.

◆ save_override() [12/18]

void save_override ( boost::serialization::nvp< std::set< T, Compare, Allocator > >  t)
inline

Override set serialization.

◆ save_override() [13/18]

void save_override ( boost::serialization::nvp< std::multiset< T, Compare, Allocator > >  t,
const unsigned BOOST_PFTO int  flags 
)
inline

Override multiset serialization.

◆ save_override() [14/18]

void save_override ( boost::serialization::nvp< std::multiset< T, Compare, Allocator > >  t)
inline

Override multiset serialization.

◆ save_override() [15/18]

void save_override ( boost::serialization::nvp< std::map< Key, T, Compare, Allocator > >  t,
const unsigned BOOST_PFTO int  flags 
)
inline

Override map serialization.

◆ save_override() [16/18]

void save_override ( boost::serialization::nvp< std::map< Key, T, Compare, Allocator > >  t)
inline

Override map serialization.

◆ save_override() [17/18]

void save_override ( boost::serialization::nvp< std::multimap< Key, T, Compare, Allocator > >  t,
const unsigned BOOST_PFTO int  flags 
)
inline

Override multimap serialization.

◆ save_override() [18/18]

void save_override ( boost::serialization::nvp< std::multimap< Key, T, Compare, Allocator > >  t)
inline

Override multimap serialization.

◆ store_data() [1/2]

unsigned store_data ( const DataType &  t)
inline

Stores in the map (and in the secondary archive if any) the input data, and return its serialization index.

◆ store_data() [2/2]

unsigned store_data ( const DataType *  t)
inline

Stores in the map (and in the secondary archive if any) the input data, and return its serialization index.