/* * StreamFactory_EmpiricalPotential.hpp * * Created on: Feb 28, 2016 * Author: heber */ #ifndef STREAMFACTORY_EMPIRICALPOTENTIAL_HPP_ #define STREAMFACTORY_EMPIRICALPOTENTIAL_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "StreamFactory.hpp" #include "Potentials/EmpiricalPotential.hpp" /** This implements the StreamFactory (template) interface for EmpiricalPotentials. * * This has to be inherited by a higher class that may actually instantiate * default constructed potentials, i.e. who is friend with EmpiricalPotential. */ template <> struct StreamFactory { /** Destructor of class StreamFactory. * */ virtual ~StreamFactory(); /** Creates an instance of the requested potential. * * \param potentialtype key of potential to create * \param serialized stream to parser SerializablePotential from */ EmpiricalPotential *createInstance( const std::string &potentialtype, std::istream &serialized) const; private: /** Getter for a default constructed potential. * * This has to be implemented in inheriting factory class. */ virtual EmpiricalPotential* getDefaultPotential(const std::string &_name) const=0; }; #endif /* STREAMFACTORY_EMPIRICALPOTENTIAL_HPP_ */