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