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