/home/coin/SVN-release/OS-2.4.1/OS/applications/columnGen/code/OSDecompSolverFactory.cpp

Go to the documentation of this file.
00001 /* $Id: OSDecompSolverFactory.cpp 3038 2009-11-07 11:43:44Z kmartin $ */
00015 // --------------------------------------------------------------------- //
00016 #include "OSInstance.h"
00017 #include "OSResult.h"
00018 #include "OSDataStructures.h"
00019 #include "OSErrorClass.h"
00020 #include <vector>
00021 #include <string>
00022 #include <map>
00023 
00024 #include "OSDecompSolverFactory.h"
00025 
00026 
00027 
00028 std::map<std::string, OSDecompSolverFactory*> OSDecompSolverFactory::factories;
00029 
00030 OSDecompSolver* OSDecompSolverFactory::createOSDecompSolver(const std::string &solverName) throw(ErrorClass){
00031         
00032         
00033         if( factories.find(solverName) != factories.end() ){
00034                 
00035                 return factories[ solverName]->create();
00036                 
00037         }else{
00038                 throw ErrorClass( solverName + " is not a valid OSDecompSolver");
00039         }
00040         
00041 }//end 
00042 
00043 
00048 OSDecompSolverFactory::OSDecompSolverFactory(){
00049         
00050 }
00051  
00052  OSDecompSolverFactory::~OSDecompSolverFactory(){
00053  }
00054  
00055  

Generated on Thu Nov 10 03:05:47 2011 by  doxygen 1.4.7