Loading...
Searching...
No Matches
PLMD::MetricRegister Class Reference

#include <MetricRegister.h>

Public Member Functions

 ~MetricRegister ()
 The destructor.
void add (std::string type, creator_pointer)
 Add a new metric to the register of metrics.
bool check (const std::string &type)
 Verify if a particular metric type is present in the register.
template<class T>
std::unique_ptr< T > create (const std::string &type)
 Create a reference configuration and don't set a point of reference.
template<class T>
std::unique_ptr< T > create (const std::string &type, const PDB &pdb)
 Create a reference configuration and set the point of reference from the pdb.
void remove (creator_pointer f)
 Remove a metric from the register of metrics.

Private Types

typedef std::unique_ptr< ReferenceConfiguration >(* creator_pointer) (const ReferenceConfigurationOptions &)
 Pointer to a function which, given the type for a ReferenceConfiguration, creates it.

Private Attributes

std::map< std::string, creator_pointerm
 The set of possible distribution functions we can work with.

Member Typedef Documentation

◆ creator_pointer

typedef std::unique_ptr< ReferenceConfiguration >(* PLMD::MetricRegister::creator_pointer) (const ReferenceConfigurationOptions &)
private

Pointer to a function which, given the type for a ReferenceConfiguration, creates it.

Constructor & Destructor Documentation

◆ ~MetricRegister()

PLMD::MetricRegister::~MetricRegister ( )

The destructor.

Member Function Documentation

◆ add()

void PLMD::MetricRegister::add ( std::string type,
creator_pointer f )

Add a new metric to the register of metrics.

◆ check()

bool PLMD::MetricRegister::check ( const std::string & type)

Verify if a particular metric type is present in the register.

◆ create() [1/2]

template<class T>
std::unique_ptr< T > PLMD::MetricRegister::create ( const std::string & type)

Create a reference configuration and don't set a point of reference.

◆ create() [2/2]

template<class T>
std::unique_ptr< T > PLMD::MetricRegister::create ( const std::string & type,
const PDB & pdb )

Create a reference configuration and set the point of reference from the pdb.

◆ remove()

void PLMD::MetricRegister::remove ( creator_pointer f)

Remove a metric from the register of metrics.

Member Data Documentation

◆ m

std::map<std::string,creator_pointer> PLMD::MetricRegister::m
private

The set of possible distribution functions we can work with.


The documentation for this class was generated from the following files: