Changeset 9854 in orxonox.OLD for branches/new_class_id/src/lib/util/loading/resource.h
- Timestamp:
- Sep 28, 2006, 10:17:56 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/loading/resource.h
r9852 r9854 26 26 { 27 27 public: 28 /** @param keepLevel the level to set. */29 inline KeepLevel(unsigned int keepLevel) { _keepLevel = keepLevel; };28 KeepLevel(); 29 KeepLevel(unsigned int keepLevel); 30 30 KeepLevel(const std::string& keepLevelName); 31 31 … … 93 93 bool operator==(const std::string& typeName) const { return this->_typeName == typeName; }; 94 94 95 //////////////////// 96 //// EXTENSIONS //// 95 97 void addExtension(const std::string& extension); 96 98 99 /////////////// 100 //// PATHS //// 97 101 bool addResourcePath(const std::string& path); 98 102 bool addResourceSubPath(const std::string& subPath); … … 109 113 const std::vector<Resources::StorePointer*>& storedResources() const { return _storedResources; }; 110 114 111 virtual void createFromString(const std::string& loadString) = 0; 112 115 /////////////////////////////// 116 //// LOADING AND UNLOADING //// 117 virtual void createFromString(const std::string& loadString, const KeepLevel& keepLevel = KeepLevel()) = 0; 113 118 void unloadAllBelowKeepLevel(const Resources::KeepLevel& keepLevel); 114 119 120 /////////////////// 121 //// INTERNALS //// 115 122 void addResource(Resources::StorePointer* resource); 116 123 124 /////////////// 125 //// DEBUG //// 117 126 void debug() const; 118 127 … … 144 153 tType(const std::string& typeName) : Type(typeName) {}; 145 154 /** @param loadString the String to load a Resource with @brief tries to create a Resource of Type T with a loadString */ 146 virtual void createFromString(const std::string& loadString ) { T::createFromString(loadString); }155 virtual void createFromString(const std::string& loadString, const KeepLevel& keepLevel = KeepLevel()) { T::createFromString(loadString, keepLevel); } 147 156 }; 148 157
Note: See TracChangeset
for help on using the changeset viewer.