Classes | Namespaces | Macros | Functions
MetricRegister.h File Reference
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include "tools/Exception.h"
#include "tools/Tools.h"
#include "tools/PDB.h"
#include "ReferenceConfiguration.h"

Classes

class  PLMD::MetricRegister
 

Namespaces

 PLMD
 

Macros

#define PLUMED_REGISTER_METRIC(classname, type)
 

Functions

MetricRegister & PLMD::metricRegister ()
 

Macro Definition Documentation

◆ PLUMED_REGISTER_METRIC

#define PLUMED_REGISTER_METRIC (   classname,
  type 
)
Value:
namespace { class classname##RegisterMe{ \
static std::unique_ptr<ReferenceConfiguration> create(const PLMD::ReferenceConfigurationOptions&ro){return PLMD::Tools::make_unique<classname>(ro);} \
public: \
classname##RegisterMe(){PLMD::metricRegister().add(type,create);}; \
~classname##RegisterMe(){PLMD::metricRegister().remove(create);}; \
} classname##RegisterMeObject; }
PLMD::metricRegister
MetricRegister & metricRegister()
Definition: MetricRegister.cpp:35
PLMD::ReferenceConfigurationOptions
Definition: ReferenceConfiguration.h:52
PLMD::MetricRegister::add
void add(std::string type, creator_pointer)
Add a new metric to the register of metrics.
Definition: MetricRegister.cpp:48
PLMD::MetricRegister::remove
void remove(creator_pointer f)
Remove a metric from the register of metrics.
Definition: MetricRegister.cpp:40