Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
T_Generic_annotator< KeyType, AnnotationType, MakeKey, SetAnnotation, GetOptionName, GetOptionHelp, GetOptionDisplayName > Class Template Reference

Model of ParticleAnnotator for attributing any annotation to a particle. More...

#include <Generic_annotator.hpp>

Public Member Functions

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

Static Public Member Functions

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

Detailed Description

template<class KeyType, class AnnotationType, class MakeKey, class SetAnnotation, class GetOptionName = Get_annotator_option_name_default, class GetOptionHelp = Get_annotator_option_help_default, class GetOptionDisplayName = Get_annotator_option_display_name_default>
class SBL::Models::T_Generic_annotator< KeyType, AnnotationType, MakeKey, SetAnnotation, GetOptionName, GetOptionHelp, GetOptionDisplayName >

Model of ParticleAnnotator for attributing any annotation to a particle.

It loads the annotations from a file into a map: the format of the file should be, at each line, the key foloowing by the annotation. The key should be a loadable value that alows a given particle to recognize its annotation.

Template Parameters
KeyTypeType of the key of an annotation.
AnnotationTypeType of the annotation.
MakeKeyFunctor taking a particle as input and returning its key.
SetAnnotationFunctor taking a particle and its annotation as input and setting the annotation of the particle.

Member Function Documentation

◆ add_options()

template<class KeyType, class AnnotationType, class MakeKey, class SetAnnotation, class GetOptionName = Get_annotator_option_name_default, class GetOptionHelp = Get_annotator_option_help_default, class GetOptionDisplayName = Get_annotator_option_display_name_default>
boost::program_options::options_description add_options ( void )
inlinevirtual

Virtual method for adding options to the module.

Reimplemented from T_Module_option_description< Dummy >.

◆ check_options()

template<class KeyType, class AnnotationType, class MakeKey, class SetAnnotation, class GetOptionName = Get_annotator_option_name_default, class GetOptionHelp = Get_annotator_option_help_default, class GetOptionDisplayName = Get_annotator_option_display_name_default>
bool check_options ( std::string & message) const
inlinevirtual

Checks that the input options' values are coherent.

Reimplemented from T_Module_option_description< Dummy >.

◆ get_name()

template<class KeyType, class AnnotationType, class MakeKey, class SetAnnotation, class GetOptionName = Get_annotator_option_name_default, class GetOptionHelp = Get_annotator_option_help_default, class GetOptionDisplayName = Get_annotator_option_display_name_default>
std::string get_name ( void ) const
inlinevirtual

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 KeyType, class AnnotationType, class MakeKey, class SetAnnotation, class GetOptionName = Get_annotator_option_name_default, class GetOptionHelp = Get_annotator_option_help_default, class GetOptionDisplayName = Get_annotator_option_display_name_default>
std::string get_output_prefix ( void ) const
inlinevirtual

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

Reimplemented from T_Module_option_description< Dummy >.

◆ load()

template<class KeyType, class AnnotationType, class MakeKey, class SetAnnotation, class GetOptionName = Get_annotator_option_name_default, class GetOptionHelp = Get_annotator_option_help_default, class GetOptionDisplayName = Get_annotator_option_display_name_default>
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.