/* * PotentialRegistry.hpp * * Created on: Nov 23, 2012 * Author: heber */ #ifndef POTENTIALREGISTRY_HPP_ #define POTENTIALREGISTRY_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "CodePatterns/Observer/Observable.hpp" #include "CodePatterns/Registry.hpp" #include "CodePatterns/Singleton.hpp" #include "Potentials/EmpiricalPotential.hpp" /** Potential Registry. * * The Potential registry is a storage for any EmpiricalPotential instance to * be retrieved by name. It is a singleton and can be called from anywhere. * * This class is meant for convenience when loading and saving potential files. * By the keyword given in the potential file we may look up whether the * potential exists and modify it or create a new one accordingly. When saving * the present potentials to a file, we just have to iterate over all present * ones. */ class PotentialRegistry : public Singleton, public Registry, public Observable { friend class Singleton; //friend class Registry; public: void registerInstance(EmpiricalPotential*); void unregisterInstance(EmpiricalPotential*); private: PotentialRegistry(); virtual ~PotentialRegistry(); }; #endif /* POTENTIALREGISTRY_HPP_ */