/home/coin/SVN-release/OS-2.4.2/examples/osDip/OSDipBlockSolverFactory.cpp

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

Generated on Wed Nov 30 03:04:10 2011 by  doxygen 1.4.7