ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/applications/LatticeFactory.hpp
Revision: 1490
Committed: Fri Sep 24 04:16:43 2004 UTC (19 years, 11 months ago) by gezelter
File size: 588 byte(s)
Log Message:
Import of OOPSE v. 2.0

File Contents

# User Rev Content
1 gezelter 1490 #ifndef _LATTICEFACTORY_H_
2     #define _LATTICEFACTORY_H_
3     #include <map>
4     #include <string>
5    
6     using namespace std;
7    
8     class BaseLatticeCreator;
9     class BaseLattice;
10    
11     class LatticeFactory{
12     public:
13     ~LatticeFactory();
14    
15     static LatticeFactory* getInstance();
16    
17     bool registerCreator( BaseLatticeCreator* latCreator );
18    
19    
20     bool hasLatticeCreator( const string& latticeType );
21    
22     const string toString();
23    
24     BaseLattice* createLattice( const string& latticeType );
25    
26     private:
27     LatticeFactory(){}
28     static LatticeFactory* instance;
29     map<string, BaseLatticeCreator*> creatorMap;
30     };
31     #endif