52#ifndef HYDRODYNAMICS_HYDRODYNAMICSMODELFACTORY_HPP
53#define HYDRODYNAMICS_HYDRODYNAMICSMODELFACTORY_HPP
64 class HydrodynamicsModel;
65 class HydrodynamicsModelCreator;
74 using CreatorMapType = std::map<std::string, HydrodynamicsModelCreator*>;
75 using IdentVectorType = std::vector<std::string>;
76 using IdentVectorIterator = std::vector<std::string>::iterator;
124 static HydrodynamicsModelFactory* instance_;
125 CreatorMapType creatorMap_;
129 std::ostream& operator<<(std::ostream& o, HydrodynamicsModelFactory& factory);
Factory pattern and Singleton Pattern are used to define an interface for creating an HydrodynamicsMo...
bool registerHydrodynamicsModel(HydrodynamicsModelCreator *creator)
Registers a creator with a type identifier.
IdentVectorType getIdents()
Returns all of the registed type identifiers.
HydrodynamicsModel * createHydrodynamicsModel(const std::string &id)
Looks up the type identifier in the internal map.
static HydrodynamicsModelFactory * getInstance()
Returns an instance of HydrodynamicsModel factory.
bool unregisterHydrodynamicsModel(const std::string &id)
Unregisters the creator for the given type identifier.
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.