Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
T_Graph_loader< Graph > Class Template Reference

Loader for one or more txt files listing weights. More...

#include <Graph_loader.hpp>

Static Public Member Functions

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

Constructors

 T_Graph_loader (void)
 Default constructor.

Options Descriptions

bool check_options (std::string &message) const override
 Check that the parsed options are valid for this loader.

Output Prefix

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

Data Management

boost::program_options::options_description add_options (void) override
 Virtual method for adding options to the module.
const GraphType & get_graph (void) const
 Container of weights (use only if one input file was provided) (const).
GraphType & get_graph (void)
 Container of weights (use only if one input file was provided).
bool load (unsigned verbose=false, std::ostream &out=std::cout)
 Once the command line options were parsed, build the containers of weights from the input files.
void statistics (std::ostream &out) const
 Print high level statistics on the loaded weights.

Mandatory Requirements

boost::program_options::options_description add_options (void) override
 Virtual method for adding options to the module.
bool load (unsigned verbose, std::ostream &out)
 Load function.
bool check_options (std::string &message) const override
 Checks that the input options' values are coherent.
std::string get_output_prefix (void) const override
 Returns a prefix that concatains the input line options used when running the module.
std::string get_name (void) const override
 Return the name of the class itself.
void statistics (std::ostream &out) override
 Print high level statistics on the loaded files.

Detailed Description

template<class Graph>
class SBL::IO::T_Graph_loader< Graph >

Loader for one or more txt files listing weights.

Template Parameters
FTRepresentation of a weight.

Constructor & Destructor Documentation

◆ T_Graph_loader()

template<class Graph>
T_Graph_loader ( void )
inline

Default constructor.

Member Function Documentation

◆ add_options() [1/2]

template<class Graph>
boost::program_options::options_description add_options ( void )
inlineoverridevirtual

Virtual method for adding options to the module.

Reimplemented from T_Module_option_description< Dummy >.

◆ add_options() [2/2]

template<class Graph>
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() [1/2]

template<class Graph>
bool check_options ( std::string & message) const
inlineoverridevirtual

Checks that the input options' values are coherent.

Reimplemented from T_Module_option_description< Dummy >.

◆ check_options() [2/2]

template<class Graph>
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_graph() [1/2]

template<class GraphType, class FT>
GraphType & get_graph ( void )
inline

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

◆ get_graph() [2/2]

template<class GraphType, class FT>
const GraphType & get_graph ( void ) const
inline

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

◆ get_name() [1/2]

template<class Graph>
std::string get_name ( void ) const
inlinevirtual

Access to the output prefix of this loader.

Reimplemented from Loader_base.

◆ get_name() [2/2]

template<class Graph>
std::string get_name ( void ) const
inlineoverridevirtual

Return the name of the class itself.

Reimplemented from Loader_base.

◆ 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() [1/2]

template<class Graph>
std::string get_output_prefix ( void ) const
inlineoverridevirtual

Returns a prefix that concatains the input line options used when running the module.

Reimplemented from T_Module_option_description< Dummy >.

◆ get_output_prefix() [2/2]

template<class Graph>
std::string get_output_prefix ( void ) const
inlineoverridevirtual

Access to the output prefix of this loader.

Reimplemented from T_Module_option_description< Dummy >.

◆ load() [1/2]

template<class Graph>
bool load ( unsigned verbose,
std::ostream & out )
inlinevirtual

Load function.

Parameters
verboseVerbosity level.
[out]outOutput stream.
Returns
True if loading is successful, false otherwise. Function to call to execute the main function of a Loader

Reimplemented from Loader_base.

◆ load() [2/2]

template<class Graph>
bool load ( unsigned verbose = false,
std::ostream & out = std::cout )
inlinevirtual

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

Reimplemented from Loader_base.

◆ statistics() [1/2]

template<class GraphType, class FT>
void statistics ( std::ostream & out) const
inline

Print high level statistics on the loaded weights.

◆ statistics() [2/2]

template<class Graph>
void statistics ( std::ostream & out)
inlineoverride

Print high level statistics on the loaded files.