SourceXtractorPlusPlus  0.10
Please provide a description of the project.
LeastSquareEngineManager.h
Go to the documentation of this file.
1 
23 #ifndef MODELFITTING_LEASTSQUAREENGINEMANAGER_H
24 #define MODELFITTING_LEASTSQUAREENGINEMANAGER_H
25 
27 
28 namespace ModelFitting {
29 
46 public:
47 
53 
61  static void registerEngine(const std::string& name, FactoryMethod factory_method);
62 
67 
78  static std::shared_ptr<LeastSquareEngine> create(const std::string &name, unsigned max_iterations = 1000);
79 
83  struct StaticEngine {
85  LeastSquareEngineManager::registerEngine(name, factory_method);
86  }
87  };
88 };
89 
90 } // end of namespace ModelFitting
91 
92 #endif /* MODELFITTING_LEASTSQUAREENGINEMANAGER_H */
STL class.
static std::vector< std::string > getImplementations()
static void registerEngine(const std::string &name, FactoryMethod factory_method)
STL class.
Keep a registry of supported engines, and bridge their factory methods.
StaticEngine(const std::string &name, LeastSquareEngineManager::FactoryMethod factory_method)
static std::shared_ptr< LeastSquareEngine > create(const std::string &name, unsigned max_iterations=1000)