Changeset 9715 in orxonox.OLD for branches/new_class_id/src/lib/util
- Timestamp:
- Sep 1, 2006, 8:06:39 PM (18 years ago)
- Location:
- branches/new_class_id/src/lib/util
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/executor/executor.cc
r9684 r9715 19 19 20 20 21 NewObjectListDefinition(Executor);21 ObjectListDefinition(Executor); 22 22 23 23 /** -
branches/new_class_id/src/lib/util/executor/executor.h
r9684 r9715 38 38 class Executor : public BaseObject 39 39 { 40 NewObjectListDeclaration(Executor);40 ObjectListDeclaration(Executor); 41 41 public: 42 42 virtual ~Executor(); -
branches/new_class_id/src/lib/util/loading/dynamic_loader.cc
r9709 r9715 24 24 25 25 26 NewObjectListDefinition(DynamicLoader);26 ObjectListDefinition(DynamicLoader); 27 27 28 28 /** -
branches/new_class_id/src/lib/util/loading/dynamic_loader.h
r9684 r9715 19 19 class DynamicLoader : public Factory 20 20 { 21 NewObjectListDeclaration(DynamicLoader);21 ObjectListDeclaration(DynamicLoader); 22 22 23 23 public: -
branches/new_class_id/src/lib/util/loading/factory.cc
r9712 r9715 19 19 //#include "shell_command.h" 20 20 21 NewObjectListDefinition(Factory);21 ObjectListDefinition(Factory); 22 22 23 23 //SHELL_COMMAND(create, Factory, fabricate); … … 28 28 * set everything to zero and define factoryName 29 29 */ 30 Factory::Factory (const NewClassID& classID)30 Factory::Factory (const ClassID& classID) 31 31 : _classID(classID) 32 32 { … … 140 140 * @returns a new Object of Type classID on match, NULL otherwise 141 141 */ 142 BaseObject* Factory::fabricate(const NewClassID& classID)142 BaseObject* Factory::fabricate(const ClassID& classID) 143 143 { 144 144 if (Factory::_factoryList == NULL) -
branches/new_class_id/src/lib/util/loading/factory.h
r9709 r9715 39 39 class Factory : public BaseObject 40 40 { 41 NewObjectListDeclaration(Factory);41 ObjectListDeclaration(Factory); 42 42 public: 43 43 virtual ~Factory (); … … 46 46 47 47 static BaseObject* fabricate(const std::string& className); 48 static BaseObject* fabricate(const NewClassID& classID);48 static BaseObject* fabricate(const ClassID& classID); 49 49 static BaseObject* fabricate(const TiXmlElement* root); 50 50 … … 52 52 bool operator==(int classID) const; 53 53 bool operator==(const std::string& className) const; 54 bool operator==(const NewClassID& classID) const { return _classID == classID; };54 bool operator==(const ClassID& classID) const { return _classID == classID; }; 55 55 56 56 protected: 57 Factory (const NewClassID& id);57 Factory (const ClassID& id); 58 58 virtual BaseObject* fabricateObject(const TiXmlElement* root = NULL) const = 0; 59 59 … … 62 62 63 63 protected: 64 const NewClassID _classID; //!< The Class-Identifyer of the Factory.64 const ClassID _classID; //!< The Class-Identifyer of the Factory. 65 65 static std::list<Factory*>* _factoryList; //!< List of Registered Factories 66 66 }; … … 78 78 * @param classID the ID of the Class to be created. 79 79 */ 80 tFactory (const NewClassID& classID)80 tFactory (const ClassID& classID) 81 81 : Factory(classID) 82 82 { } -
branches/new_class_id/src/lib/util/loading/fast_factory.cc
r9709 r9715 22 22 23 23 24 NewObjectListDefinition(FastFactory);24 ObjectListDefinition(FastFactory); 25 25 26 26 /** … … 30 30 * @return a new FastFactory 31 31 */ 32 FastFactory::FastFactory (const NewClassID& classID, const std::string& fastFactoryName)32 FastFactory::FastFactory (const ClassID& classID, const std::string& fastFactoryName) 33 33 { 34 34 this->registerObject(this, FastFactory::_objectList); … … 98 98 * @returns true if found, false otherwise. 99 99 */ 100 FastFactory* FastFactory::searchFastFactory(const NewClassID& classID)100 FastFactory* FastFactory::searchFastFactory(const ClassID& classID) 101 101 { 102 102 if (FastFactory::first == NULL) … … 229 229 * @return the Object to resurrect, NULL if classID is not found. 230 230 */ 231 BaseObject* FastFactory::resurrect(const NewClassID& classID)231 BaseObject* FastFactory::resurrect(const ClassID& classID) 232 232 { 233 233 FastFactory* tmpFac = FastFactory::getFirst(); -
branches/new_class_id/src/lib/util/loading/fast_factory.h
r9709 r9715 60 60 class FastFactory : public BaseObject 61 61 { 62 NewObjectListDeclaration(FastFactory);62 ObjectListDeclaration(FastFactory); 63 63 64 64 public: … … 68 68 // functions to push and pop elements of this class 69 69 BaseObject* resurrect(); 70 static BaseObject* resurrect(const NewClassID& classID);70 static BaseObject* resurrect(const ClassID& classID); 71 71 void kill(BaseObject* object); 72 72 static void kill(BaseObject* object, bool searchForFastFactory); … … 80 80 inline static FastFactory* getFirst() { return FastFactory::first; }; 81 81 82 static FastFactory* searchFastFactory(const NewClassID& classID);82 static FastFactory* searchFastFactory(const ClassID& classID); 83 83 static FastFactory* searchFastFactory(const std::string& fastFactoryName); 84 84 85 const NewClassID& getStoredID() const { return this->storedClassID; };85 const ClassID& getStoredID() const { return this->storedClassID; }; 86 86 87 87 protected: 88 FastFactory (const NewClassID& classID, const std::string& fastFactoryName = "");88 FastFactory (const ClassID& classID, const std::string& fastFactoryName = ""); 89 89 90 90 /** sets the Next factory in the list @param nextFactory the next factory */ … … 100 100 101 101 protected: 102 NewClassID storedClassID; //!< The classID of the specified class.102 ClassID storedClassID; //!< The classID of the specified class. 103 103 unsigned int storedDeadObjects; //!< How many dead objects are stored in this class 104 104 … … 122 122 { 123 123 public: 124 static tFastFactory<T>* getFastFactory(const NewClassID& classID, const std::string& fastFactoryName);124 static tFastFactory<T>* getFastFactory(const ClassID& classID, const std::string& fastFactoryName); 125 125 126 126 private: 127 tFastFactory(const NewClassID& classID, const std::string& fastFactoryName);127 tFastFactory(const ClassID& classID, const std::string& fastFactoryName); 128 128 129 129 virtual void fabricate(); … … 137 137 */ 138 138 template<class T> 139 tFastFactory<T>::tFastFactory(const NewClassID& classID, const std::string& fastFactoryName)139 tFastFactory<T>::tFastFactory(const ClassID& classID, const std::string& fastFactoryName) 140 140 : FastFactory(classID, fastFactoryName) 141 141 {} … … 148 148 */ 149 149 template<class T> 150 tFastFactory<T>* tFastFactory<T>::getFastFactory(const NewClassID& classID, const std::string& fastFactoryName)150 tFastFactory<T>* tFastFactory<T>::getFastFactory(const ClassID& classID, const std::string& fastFactoryName) 151 151 { 152 152 tFastFactory<T>* tmpFac = NULL; -
branches/new_class_id/src/lib/util/loading/game_loader.cc
r9684 r9715 28 28 #include "key_mapper.h" 29 29 30 NewObjectListDefinition(GameLoader);30 ObjectListDefinition(GameLoader); 31 31 32 32 -
branches/new_class_id/src/lib/util/loading/game_loader.h
r9684 r9715 38 38 class GameLoader : public EventListener 39 39 { 40 NewObjectListDeclaration(GameLoader);40 ObjectListDeclaration(GameLoader); 41 41 public: 42 42 virtual ~GameLoader (); -
branches/new_class_id/src/lib/util/loading/resource.h
r9714 r9715 37 37 { 38 38 public: 39 Type(const NewClassID& classID) : _classID(classID) { };39 Type(const ClassID& classID) : _classID(classID) { }; 40 40 41 41 void addExtension(const std::string& extension); 42 42 43 43 private: 44 const NewClassID& _classID;44 const ClassID& _classID; 45 45 std::vector<std::string> _resourcePaths; 46 46 std::vector<std::string> _resourceSubPaths; … … 73 73 unsigned int referenceCount; //!< How many times this Resource has been loaded. 74 74 /// TODO REMOVE THIS: ResourceType type; //!< ResourceType of this Resource. 75 Resource Priority prio; //!< The Priority of this resource. (can only be increased, so noone else will delete this)75 Resource::Priority prio; //!< The Priority of this resource. (can only be increased, so noone else will delete this) 76 76 77 77 MultiType param[3]; //!< The Parameters given to this Resource. -
branches/new_class_id/src/lib/util/loading/resource_manager.cc
r9684 r9715 50 50 #include <unistd.h> 51 51 52 NewObjectListDefinition(ResourceManager);52 ObjectListDefinition(ResourceManager); 53 53 54 54 /** -
branches/new_class_id/src/lib/util/loading/resource_manager.h
r9684 r9715 94 94 class ResourceManager : public BaseObject 95 95 { 96 NewObjectListDeclaration(ResourceManager);96 ObjectListDeclaration(ResourceManager); 97 97 public: 98 98 virtual ~ResourceManager(); -
branches/new_class_id/src/lib/util/preferences.cc
r9684 r9715 20 20 #include "debug.h" 21 21 22 NewObjectListDefinition(Preferences);22 ObjectListDefinition(Preferences); 23 23 24 24 /** -
branches/new_class_id/src/lib/util/preferences.h
r9684 r9715 29 29 //! A default singleton class. 30 30 class Preferences : public BaseObject { 31 NewObjectListDeclaration(Preferences);31 ObjectListDeclaration(Preferences); 32 32 public: 33 33 virtual ~Preferences(void);
Note: See TracChangeset
for help on using the changeset viewer.