Changeset 244 for code/branches/objecthierarchie/src/Factory.h
- Timestamp:
- Nov 25, 2007, 5:21:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchie/src/Factory.h
r219 r244 7 7 namespace orxonox 8 8 { 9 class BaseObject; 9 10 class Identifier; 10 class BaseObject;11 11 12 class ClassFactory 12 // ############################### 13 // ### Factory ### 14 // ############################### 15 class Factory 13 16 { 14 17 public: 15 static BaseObject* fabricate(const std::string& name);18 static Identifier* getIdentifier(const std::string& name); 16 19 static void add(const std::string& name, Identifier* identifier); 17 20 18 21 private: 19 ClassFactory() {}20 ClassFactory(const ClassFactory& factory) {}21 ~ ClassFactory() {}22 Factory() {} 23 Factory(const Factory& factory) {} 24 ~Factory() {} 22 25 23 static ClassFactory* pointer_s;26 static Factory* pointer_s; 24 27 std::map<std::string, Identifier*> identifierMap_; 28 }; 29 30 // ############################### 31 // ### BaseFactory ### 32 // ############################### 33 class BaseFactory 34 { 35 public: 36 virtual BaseObject* fabricate() = 0; 25 37 }; 26 38 }
Note: See TracChangeset
for help on using the changeset viewer.