ModelRegister.h
Go to the documentation of this file.
1 
9 #ifndef _atm_ModelRegister_h_
10 #define _atm_ModelRegister_h_
11 
12 #include <string>
13 #include <map>
14 
15 namespace atm {
16 
27  template<typename ModelType>
28  class ModelRegister {
29 
30  public:
32 
33  void RegisterModel(const std::string& modelName, ModelType* const model);
34 
35  ModelType& Get(const std::string& name);
36  const ModelType& Get(const std::string& name) const;
37 
38  private:
39  typedef typename std::map<std::string, ModelType*> InternalCollection;
41 
42  };
43 
44 } // atm
45 
46 
47 #endif // _atm_ModelRegister_h_
48 
49 // Configure (x)emacs for this file ...
50 // Local Variables:
51 // mode:c++
52 // compile-command: "make -C .. -k"
53 // End:
void RegisterModel(const std::string &modelName, ModelType *const model)
InternalCollection fMap
Definition: ModelRegister.h:40
Registry of atmosphere models.
Definition: ModelRegister.h:28
std::map< std::string, ModelType * > InternalCollection
Definition: ModelRegister.h:39
ModelType & Get(const std::string &name)

, generated on Tue Sep 26 2023.