ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/applications/simpleBuilder/LatticeCreator.hpp
Revision: 1891
Committed: Wed Dec 15 22:34:41 2004 UTC (19 years, 7 months ago) by tim
File size: 653 byte(s)
Log Message:
fix a bug in basic_ifstrstream

File Contents

# Content
1 #ifndef _LATTICECREATOR_H_
2 #define _LATTICECREATOR_H_
3 #include <string>
4 #include "applications/simpleBuilder/BaseLattice.hpp"
5
6
7 namespace oopse {
8
9 class BaseLatticeCreator{
10 public:
11 virtual BaseLattice* createLattice() = 0;
12 const std::string& getType() {return latticeType;}
13
14 protected:
15 BaseLatticeCreator(const std::string& latType);
16 private:
17 std::string latticeType;
18 };
19
20 template<class LatticeClass>
21 class LatticeCreator : public BaseLatticeCreator
22 {
23 public:
24 LatticeCreator(const std::string& latticeType): BaseLatticeCreator(latticeType) {}
25 virtual BaseLattice* createLattice() { return new LatticeClass();}
26 };
27
28 }
29 #endif