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 PLMD::ReferenceConfiguration * create(const PLMD::ReferenceConfigurationOptions&ro){return new classname(ro);} \
public: \
classname##RegisterMe(){PLMD::metricRegister().add(type,create);}; \
~classname##RegisterMe(){PLMD::metricRegister().remove(create);}; \
} classname##RegisterMeObject;
Abstract base class for calculating the distance from a reference configuration.
Definition: ReferenceConfiguration.h:61
static class PLMD::PlumedMainInitializer RegisterMe
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:41
MetricRegister & metricRegister()
Definition: MetricRegister.cpp:35