Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
T_Primitive_labels_loader< PartnerLabelsTraits, MediatorLabelsTraits, ExtraLabelsTraits > Class Template Reference

Loader for systems' labels specification. Loader for systems' labels specification. More...

#include "Primitive_labels_loader.hpp"

Static Public Member Functions

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

Other Types

typedef PartnerLabelsTraits::Primitive_label_classifier Primitive_partner_classifier
 Functor checking that a particle is in a partner, and returns the corresponding label if it is.
typedef MediatorLabelsTraits::Primitive_label_classifier Primitive_mediator_classifier
 Functor checking that a particle is in a mediator, and returns the corresponding label if it is.
typedef ExtraLabelsTraits::Primitive_label_classifier Primitive_extra_classifier
 Functor checking that a particle is in an extra, and returns the corresponding label if it is.

Accessors

const Primitive_partner_classifierget_partner_classifier (void) const
 Classifier for the partners (const).
Primitive_partner_classifierget_partner_classifier (void)
 Classifier for the partners.
const Primitive_mediator_classifierget_mediator_classifier (void) const
 Classifier for the mediators (const).
Primitive_mediator_classifierget_mediator_classifier (void)
 Classifier for the mediators.
const Primitive_extra_classifierget_extra_classifier (void) const
 Classifier for the extra (const).
Primitive_extra_classifierget_extra_classifier (void)
 Classifier for the extra.

Mandatory Requirements

bool load (unsigned verbose, std::ostream &out) override
 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.

Optional Requirements

boost::program_options::options_description add_options (void) override
 Virtual method for adding options to the module.

Detailed Description

template<class PartnerLabelsTraits, class MediatorLabelsTraits = SBL::Models::No_label_traits, class ExtraLabelsTraits = SBL::Models::Extra_label_traits>
class SBL::IO::T_Primitive_labels_loader< PartnerLabelsTraits, MediatorLabelsTraits, ExtraLabelsTraits >

Loader for systems' labels specification. Loader for systems' labels specification.

The molecular systems's labels are defined by the concept MolecularSystemLabelsTraits. That is, a model of MolecularSystemLabelsTraits defines the type System_label which enumerates all the different labels of one category (partners or mediators or extras). A model of MolecularSystemLabelsTraits describing the partners (resp. mediators or extras) is said to follows the PartnerLabelsTraits concept (resp. MediatorLabelsTraits or ExtraLabelsTraits concept).

This loader allows to load the specifications for each label's category.

Template Parameters
PartnerLabelsTraitsTraits class defining the partners' labels hierarchy.
MediatorLabelsTraitsTraits class defining the mediators' labels hierarchy (by default, it is SBL::Models::No_label_traits).
ExtraLabelsTraitsTraits class defining the extras' labels hierarchy (by default, it is SBL::Models::No_label_traits).

Member Typedef Documentation

◆ Primitive_extra_classifier

template<class PartnerLabelsTraits, class MediatorLabelsTraits = SBL::Models::No_label_traits, class ExtraLabelsTraits = SBL::Models::Extra_label_traits>
typedef ExtraLabelsTraits::Primitive_label_classifier Primitive_extra_classifier

Functor checking that a particle is in an extra, and returns the corresponding label if it is.

◆ Primitive_mediator_classifier

template<class PartnerLabelsTraits, class MediatorLabelsTraits = SBL::Models::No_label_traits, class ExtraLabelsTraits = SBL::Models::Extra_label_traits>
typedef MediatorLabelsTraits::Primitive_label_classifier Primitive_mediator_classifier

Functor checking that a particle is in a mediator, and returns the corresponding label if it is.

◆ Primitive_partner_classifier

template<class PartnerLabelsTraits, class MediatorLabelsTraits = SBL::Models::No_label_traits, class ExtraLabelsTraits = SBL::Models::Extra_label_traits>
typedef PartnerLabelsTraits::Primitive_label_classifier Primitive_partner_classifier

Functor checking that a particle is in a partner, and returns the corresponding label if it is.

Member Function Documentation

◆ add_options()

template<class PartnerLabelsTraits, class MediatorLabelsTraits, class ExtraLabelsTraits>
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 PartnerLabelsTraits, class MediatorLabelsTraits, class ExtraLabelsTraits>
bool check_options ( std::string & message) const
inlineoverridevirtual

Checks that the input options' values are coherent.

Reimplemented from T_Module_option_description< Dummy >.

◆ get_extra_classifier() [1/2]

template<class PartnerLabelsTraits, class MediatorLabelsTraits, class ExtraLabelsTraits>
T_Primitive_labels_loader< PartnerLabelsTraits, MediatorLabelsTraits, ExtraLabelsTraits >::Primitive_extra_classifier & get_extra_classifier ( void )
inline

Classifier for the extra.

◆ get_extra_classifier() [2/2]

template<class PartnerLabelsTraits, class MediatorLabelsTraits, class ExtraLabelsTraits>
const T_Primitive_labels_loader< PartnerLabelsTraits, MediatorLabelsTraits, ExtraLabelsTraits >::Primitive_extra_classifier & get_extra_classifier ( void ) const
inline

Classifier for the extra (const).

◆ get_mediator_classifier() [1/2]

template<class PartnerLabelsTraits, class MediatorLabelsTraits, class ExtraLabelsTraits>
T_Primitive_labels_loader< PartnerLabelsTraits, MediatorLabelsTraits, ExtraLabelsTraits >::Primitive_mediator_classifier & get_mediator_classifier ( void )
inline

Classifier for the mediators.

◆ get_mediator_classifier() [2/2]

template<class PartnerLabelsTraits, class MediatorLabelsTraits, class ExtraLabelsTraits>
const T_Primitive_labels_loader< PartnerLabelsTraits, MediatorLabelsTraits, ExtraLabelsTraits >::Primitive_mediator_classifier & get_mediator_classifier ( void ) const
inline

Classifier for the mediators (const).

◆ get_name()

template<class PartnerLabelsTraits, class MediatorLabelsTraits, class ExtraLabelsTraits>
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()

template<class PartnerLabelsTraits, class MediatorLabelsTraits, class ExtraLabelsTraits>
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_partner_classifier() [1/2]

template<class PartnerLabelsTraits, class MediatorLabelsTraits, class ExtraLabelsTraits>
T_Primitive_labels_loader< PartnerLabelsTraits, MediatorLabelsTraits, ExtraLabelsTraits >::Primitive_partner_classifier & get_partner_classifier ( void )
inline

Classifier for the partners.

◆ get_partner_classifier() [2/2]

template<class PartnerLabelsTraits, class MediatorLabelsTraits, class ExtraLabelsTraits>
const T_Primitive_labels_loader< PartnerLabelsTraits, MediatorLabelsTraits, ExtraLabelsTraits >::Primitive_partner_classifier & get_partner_classifier ( void ) const
inline

Classifier for the partners (const).

◆ load()

template<class PartnerLabelsTraits, class MediatorLabelsTraits, class ExtraLabelsTraits>
bool load ( unsigned verbose,
std::ostream & out )
inlineoverridevirtual

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.