Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
T_Archive_file_loader< InputArchive, SerializedData > Class Template Reference


Loader for one or more boost archive files More...

#include "Archive_file_loader.hpp"

Public Types

typedef std::vector< SerializedData * > Data_vector
 List of serialized data.

Static Public Member Functions

static boost::program_options::options_description *& get_options (void)
 Access to the options' description of the module.

Constructors

 T_Archive_file_loader (const std::string &tag, const std::string &helper="Archive file name", const std::string &option_name="filename,f")
 Default constructor.

Options Descriptions

boost::program_options::options_description add_options (void) override
 Virtual method for adding options to the module.
bool check_options (std::string &message) const override
 Check that the parsed options are valid for this loader.

Output Prefix

std::string get_output_prefix (void) const override
 Access to the output prefix of this loader.

Data Management

const Data_vectorget_all_data (void) const
 Access to all the containers of spheres (const).
Data_vectorget_all_data (void)
 Access to all the containers of spheres.
unsigned get_number_of_data (void) const
 Number of containers of spheres.
const SerializedData & get_data (unsigned i) const
 ith container of spheres corresponding to the ith input file (const).
SerializedData & get_data (unsigned i)
 ith container of spheres corresponding to the ith input file.
const SerializedData & get_data (void) const
 Container of spheres (use only if one input file was provided) (const).
SerializedData & get_data (void)
 Container of spheres (use only if one input file was provided).
std::string get_name (void) const override
 Return the name of the class itself.
bool load (unsigned verbose=false, std::ostream &out=std::cout) override
 Once the command line options were parsed, build the containers of spheres from the input files.
void statistics (std::ostream &out)
 Print high level statistics on the loaded spheres.

Detailed Description

template<class InputArchive, class SerializedData>
class SBL::IO::T_Archive_file_loader< InputArchive, SerializedData >


Loader for one or more boost archive files

Loader for one or more boost archive files.

Template Parameters
InputArchiveType of the boost archive from which the data structure will be loaded.
SerializedDataType of the data serialized in the archive.

Member Typedef Documentation

◆ Data_vector

template<class InputArchive, class SerializedData>
typedef std::vector<SerializedData*> Data_vector

List of serialized data.

Constructor & Destructor Documentation

◆ T_Archive_file_loader()

template<class InputArchive, class SerializedData>
T_Archive_file_loader ( const std::string & tag,
const std::string & helper = "Archive file name",
const std::string & option_name = "filename,f" )
inline

Default constructor.

Member Function Documentation

◆ add_options()

template<class InputArchive, class SerializedData>
boost::program_options::options_description add_options ( void )
inlineoverridevirtual

Virtual method for adding options to the module.

Reimplemented from T_Module_option_description< Dummy >.

◆ check_options()

template<class InputArchive, class SerializedData>
bool check_options ( std::string & message) const
inlineoverridevirtual

Check that the parsed options are valid for this loader.

Reimplemented from T_Module_option_description< Dummy >.

◆ get_all_data() [1/2]

template<class InputArchive, class SerializedData>
T_Archive_file_loader< InputArchive, SerializedData >::Data_vector & get_all_data ( void )
inline

Access to all the containers of spheres.

◆ get_all_data() [2/2]

template<class InputArchive, class SerializedData>
const T_Archive_file_loader< InputArchive, SerializedData >::Data_vector & get_all_data ( void ) const
inline

Access to all the containers of spheres (const).

◆ get_data() [1/4]

template<class InputArchive, class SerializedData>
SerializedData & get_data ( unsigned i)
inline

ith container of spheres corresponding to the ith input file.

◆ get_data() [2/4]

template<class InputArchive, class SerializedData>
const SerializedData & get_data ( unsigned i) const
inline

ith container of spheres corresponding to the ith input file (const).

◆ get_data() [3/4]

template<class InputArchive, class SerializedData>
SerializedData & get_data ( void )
inline

Container of spheres (use only if one input file was provided).

◆ get_data() [4/4]

template<class InputArchive, class SerializedData>
const SerializedData & get_data ( void ) const
inline

Container of spheres (use only if one input file was provided) (const).

◆ get_name()

template<class InputArchive, class SerializedData>
std::string get_name ( void ) const
inlineoverridevirtual

Return the name of the class itself.

Reimplemented from Loader_base.

◆ get_number_of_data()

template<class InputArchive, class SerializedData>
unsigned get_number_of_data ( void ) const
inline

Number of containers of spheres.

◆ get_options()

template<class Dummy = void>
boost::program_options::options_description *& get_options ( void )
inlinestaticinherited

Access to the options' description of the module.

◆ get_output_prefix()

template<class InputArchive, class SerializedData>
std::string get_output_prefix ( void ) const
inlineoverridevirtual

Access to the output prefix of this loader.

Reimplemented from T_Module_option_description< Dummy >.

◆ load()

template<class InputArchive, class SerializedData>
bool load ( unsigned verbose = false,
std::ostream & out = std::cout )
inlineoverridevirtual

Once the command line options were parsed, build the containers of spheres from the input files.

Reimplemented from Loader_base.

◆ statistics()

template<class InputArchive, class SerializedData>
void statistics ( std::ostream & out)
inline

Print high level statistics on the loaded spheres.