- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# /home/coin/SVN-release/OS-2.3.5/ApplicationTemplates/osDip/OSDipFactoryInitializer.h

Go to the documentation of this file.

    00001 /* $Id: OSDipFactoryInitializer.cpp 3038 2009-11-07 11:43:44Z Gassmann $ */
    00017 #include<map>
    00018 #include "OSDipBlockSolverFactory.h"
    00019 #include "OSDipBlockCoinSolver.h"
    00020 #include "OSDipBlockSlpSolver.h"
    00021 #include "OSDipBlockBearcatSolver.h"
    00022 //#include "MyBlockSolver.h"
    00023
    00024
    00025 #include <string>
    00026
    00027
    00028 class OSDipFactoryInitializer{
    00029
    00030 public:
    00031         //the constructor
    00032         OSDipFactoryInitializer(){
    00033                 // user edit this, e.g
    00034                 //OSDipBlockSolverFactory::factories["MyBlockSolver"] = new MyBlockSolver::Factory;
    00035                 OSDipBlockSolverFactory::factories["OSDipBlockCoinSolver"] = new OSDipBlockCoinSolver::Factory;
    00036                 OSDipBlockSolverFactory::factories["OSDipBlockSlpSolver"] = new OSDipBlockSlpSolver::Factory;
    00037                 OSDipBlockSolverFactory::factories["OSDipBlockBearcatSolver"] = new OSDipBlockBearcatSolver::Factory;
    00038         }
    00039
    00040
    00041         //the destructor
    00042         ~OSDipFactoryInitializer(){
    00043
    00044                 std::map<std::string, OSDipBlockSolverFactory*>::iterator mit ;
    00045                 for(mit = OSDipBlockSolverFactory::factories.begin();
    00046                         mit != OSDipBlockSolverFactory::factories.end(); mit++){
    00047                         delete mit->second;
    00048                         //std::cout << "DELETED A FACTORY " << std::endl;
    00049                 }
    00050         }//end destructor
    00051 };
    00052