- Timestamp:
- Dec 8, 2005, 1:09:44 AM (19 years ago)
- Location:
- trunk/src/util/loading
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/loading/factory.cc
r5982 r5984 63 63 } 64 64 65 /** 66 * deletes all the Factories. (cleanup) 67 */ 65 68 void Factory::deleteFactories() 66 69 { … … 77 80 } 78 81 82 /** 83 * @param classID match a classID with this classID 84 * @returns true on match, false otherwise 85 */ 86 bool Factory::operator==(ClassID classID) const 87 { 88 return (this->classID == classID); 89 } 79 90 80 91 /** … … 89 100 90 101 91 BaseObject* Factory::fabricate(const TiXmlElement* root) 102 /** 103 * Creates a new Object of type root->Value() (name) 104 * @param root the XML-Root to match for the newly created Object 105 * @returns a new Object of Type root->Value() on match, NULL otherwise 106 */ 107 BaseObject* Factory::fabricate(const TiXmlElement* root) 92 108 { 93 109 if (root == NULL || Factory::factoryList == NULL) … … 111 127 } 112 128 113 BaseObject* Factory::fabricate(const char* className) 129 130 /** 131 * Creates a new Object of type className 132 * @param className the ClassName to match for the newly created Object 133 * @returns a new Object of Type className on match, NULL otherwise 134 */ 135 BaseObject* Factory::fabricate(const char* className) 114 136 { 115 137 if (className == NULL || Factory::factoryList == NULL) … … 133 155 } 134 156 135 157 /** 158 * Creates a new Object of type classID 159 * @param classID the ClassID to match for the newly created Object 160 * @returns a new Object of Type classID on match, NULL otherwise 161 */ 136 162 BaseObject* Factory::fabricate(ClassID classID) 137 163 { -
trunk/src/util/loading/factory.h
r5982 r5984 50 50 static BaseObject* fabricate(const TiXmlElement* root = NULL); 51 51 52 bool operator==(ClassID classID) const { return (this->classID == classID); }; 52 53 bool operator==(ClassID classID) const; 53 54 bool operator==(const char* className) const; 54 55 … … 69 70 { 70 71 public: 72 /** 73 * creates a new type Factory to enable the loading of T 74 * @param factoryName the Name of the Factory to load. 75 * @param classID the ID of the Class to be created. 76 */ 71 77 tFactory (const char* factoryName, ClassID classID) 72 78 : Factory(factoryName, classID) 73 { 74 } 79 { } 75 80 76 81 private:
Note: See TracChangeset
for help on using the changeset viewer.