Changeset 737 for code/branches/FICN/src/orxonox/core
- Timestamp:
- Dec 31, 2007, 12:05:30 AM (17 years ago)
- Location:
- code/branches/FICN/src/orxonox/core
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/core/CorePrereqs.h
r728 r737 81 81 class Language; 82 82 class LanguageEntry; 83 class Loader; 83 84 class MetaObjectList; 84 85 template <class T> -
code/branches/FICN/src/orxonox/core/DebugLevel.h
r729 r737 48 48 class _CoreExport DebugLevel : public OrxonoxClass 49 49 { 50 template <class T> 51 friend class ClassIdentifier; // forward declaration because of the private destructor 52 50 53 public: 51 54 static int getSoftDebugLevel(OutputHandler::OutputDevice device = OutputHandler::LD_All); -
code/branches/FICN/src/orxonox/core/Identifier.cc
r715 r737 32 32 33 33 #include "Identifier.h" 34 #include "Factory.h" 34 35 35 36 namespace orxonox -
code/branches/FICN/src/orxonox/core/Identifier.h
r732 r737 60 60 #include "ObjectList.h" 61 61 #include "IdentifierList.h" 62 #include "Factory.h"63 62 #include "Debug.h" 64 // These two files would actually be need, but they would produce 65 // circular dependencies. Anyway, it does compile without them 66 // #include "OrxonoxClass.h" 67 // #include "MetaObjectList.h" 63 #include "Iterator.h" 68 64 69 65 namespace orxonox 70 66 { 71 class BaseObject; // Forward declaration 67 class BaseFactory; // Forward declaration 68 class BaseObject; // Forward declaration 72 69 73 70 // ############################### … … 100 97 101 98 public: 102 /** @brief Sets the Factory. 103 * @param factory The factory to assign 104 */ 99 /** @brief Sets the Factory. @param factory The factory to assign */ 105 100 inline void addFactory(BaseFactory* factory) { this->factory_ = factory; } 106 101 107 102 BaseObject* fabricate(); 108 109 103 bool isA(const Identifier* identifier) const; 110 104 bool isDirectlyA(const Identifier* identifier) const; … … 112 106 bool isParentOf(const Identifier* identifier) const; 113 107 108 static std::map<std::string, Identifier*>& getIdentifierMap(); 109 110 /** @brief Removes all objects of the corresponding class. */ 111 virtual void removeObjects() const = 0; 112 114 113 /** @returns the name of the class the Identifier belongs to. */ 115 114 inline const std::string& getName() const { return this->name_; } … … 137 136 inline void setConfigValueContainer(const std::string& varname, ConfigValueContainer* container) 138 137 { this->configValues_[varname] = container; } 139 140 static std::map<std::string, Identifier*>& getIdentifierMap();141 138 142 139 private: … … 193 190 static void addObject(T* object); 194 191 static ClassIdentifier<T>* getIdentifier(); 192 void removeObjects() const; 195 193 void setName(const std::string& name); 196 194 … … 288 286 } 289 287 288 /** 289 @brief Removes all objects of the corresponding class. 290 */ 291 template <class T> 292 void ClassIdentifier<T>::removeObjects() const 293 { 294 for (Iterator<T> it = ObjectList<T>::start(); it;) 295 delete *(it++); 296 } 290 297 291 298 // ############################### -
code/branches/FICN/src/orxonox/core/Language.h
r729 r737 88 88 class _CoreExport Language : public OrxonoxClass 89 89 { 90 template <class T> 91 friend class ClassIdentifier; // forward declaration because of the private destructor 92 90 93 public: 91 94 static Language& getLanguage(); -
code/branches/FICN/src/orxonox/core/ObjectList.h
r729 r737 90 90 /** @returns the first element in the list */ 91 91 inline static Iterator<T> start() 92 { return Iterator<T>(getList()->first_); } 93 94 /** @returns the first element in the list */ 95 inline static Iterator<T> begin() 92 96 { return Iterator<T>(getList()->first_); } 93 97
Note: See TracChangeset
for help on using the changeset viewer.