OSDipBlockSolverFactory.cpp
Go to the documentation of this file.
1 /* $Id: OSBlockSolverFactory.cpp 3038 2009-11-07 11:43:44Z Gassmann $ */
17 // --------------------------------------------------------------------- //
18 #include "OSInstance.h"
19 #include "OSResult.h"
20 #include "OSDataStructures.h"
21 #include "OSErrorClass.h"
22 #include <vector>
23 #include <string>
24 #include <map>
25 
27 
28 
29 
30 std::map<std::string, OSDipBlockSolverFactory*> OSDipBlockSolverFactory::factories;
31 
33 
34 
35  if( factories.find(solverName) != factories.end() ){
36 
37  return factories[ solverName]->create();
38 
39  }else{
40  throw ErrorClass( solverName + " is not a valid OSDipBlockSolver");
41  }
42 
43 }//end
44 
45 
51 
52 }
53 
55  }
56 
57 
static OSDipBlockSolver * createOSDipBlockSolver(const std::string &solverName)
static std::map< std::string, OSDipBlockSolverFactory * > factories
virtual ~OSDipBlockSolverFactory()=0
Default destructor.
OSDipBlockSolverFactory()
Default Constructor.
used for throwing exceptions.
Definition: OSErrorClass.h:31