Changeset 9852 in orxonox.OLD for branches/new_class_id
- Timestamp:
- Sep 28, 2006, 1:01:03 AM (18 years ago)
- Location:
- branches/new_class_id/src/lib/util/loading
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/loading/resource.h
r9851 r9852 152 152 // RESOURCE ITSELF // 153 153 ///////////////////// 154 155 154 //! A Resource is an Object, that can be loaded from Disk 156 155 /** -
branches/new_class_id/src/lib/util/loading/resource_manager.cc
r9848 r9852 25 25 namespace Resources 26 26 { 27 /// Definition of the ResourceManager's ObjectList. 27 28 ObjectListDefinition(ResourceManager); 28 29 //! Singleton Reference to the ResourceManager … … 55 56 } 56 57 57 58 59 58 /** 59 * @brief Registers a new Type to the ResourceManager. 60 * @param type the Type to register. 61 */ 60 62 void ResourceManager::registerType(Resources::Type* type) 61 63 { … … 64 66 } 65 67 68 /** 69 * @brief Unregisters a new Type to the ResourceManager. 70 * @param type the Type to unregister. 71 */ 66 72 void ResourceManager::unregisterType(Resources::Type* type) 67 73 { … … 74 80 } 75 81 76 82 /** 83 * @brief Sets the main Global path (the main path Resources are searched for) 84 * @param directory the directory to set. 85 * @see Resource::locateFile 86 */ 77 87 void ResourceManager::setMainGlobalPath(const Directory& directory) 78 88 { … … 81 91 } 82 92 93 /** 94 * @brief add a Global search path. (global paths besided the main path.) 95 * @param directory a directory to add. 96 */ 83 97 void ResourceManager::addGlobalPath(const Directory& directory) 84 98 { … … 88 102 } 89 103 90 104 /** 105 * @brief add a ResourcePath to a Type's Paths. 106 * @param resourceName the Type's name of Resource to add the path to. 107 * @param pathName pathName the Name of the path to add. 108 * @return true on success. (if a path was added (no duplicate, and resourceName existed). 109 */ 91 110 bool ResourceManager::addResourcePath(const std::string& resourceName, const std::string& pathName) 92 111 { … … 99 118 } 100 119 120 /** 121 * @brief add a ResourcePath to a Type's SubPaths. 122 * @param resourceName the Type's name of Resource to add the subpath to. 123 * @param pathName pathName the Name of the path to add. 124 * @return true on success. (if a path was added (no duplicate, and resourceName existed). 125 */ 101 126 bool ResourceManager::addResourceSubPath(const std::string& resourceName, const std::string& pathName) 102 127 { … … 109 134 } 110 135 111 112 136 /** 137 * @brief checks wether a File is inside of the MainPath. 138 * @param fileInside the file to check 139 * @return true if the file is inside. 140 */ 113 141 bool ResourceManager::checkFileInMainPath(const File& fileInside) 114 142 { … … 116 144 } 117 145 146 /** 147 * @brief prepends the fileName by the MainGlobalPath (same as mainGlobalPath + '/' + fileName). 148 * @param fileName The FileName to prepend 149 * @returns the prepended file-name 150 */ 118 151 std::string ResourceManager::prependAbsoluteMainPath(const std::string& fileName) 119 152 { … … 121 154 } 122 155 123 156 /** 157 * @brief add a KeepLevelName (this function just counts upwards). 158 * @param keepLevelName the Name of the KeepLevel to set. 159 * @returns the Level the Name was set to. 160 */ 124 161 unsigned int ResourceManager::addKeepLevelName(const std::string& keepLevelName) 125 162 { … … 128 165 } 129 166 167 /** 168 * @param keepLevelName the Name of the KeepLevel. 169 * @returns the ID of the KeepLevel named keepLevelName 170 */ 130 171 unsigned int ResourceManager::getKeepLevelID(const std::string& keepLevelName) const 131 172 { … … 138 179 } 139 180 181 /** 182 * @param keepLevelID the ID to check. 183 * @return the name of the KeepLevel. 184 */ 140 185 const std::string& ResourceManager::getKeepLevelName(unsigned int keepLevelID) const 141 186 { … … 144 189 } 145 190 191 192 /** 193 * @brief loads a Resource from a TypeName and a loadString. 194 * @param resourceTypeName The Name of the Type to what to load a Resource from. 195 * @param loadString the loadString to load in the Type. 196 */ 146 197 void ResourceManager::loadFromLoadString(const std::string& resourceTypeName, const std::string& loadString) 147 198 { … … 159 210 } 160 211 161 212 /** 213 * @brief unloads all Resources below a certain threshhold. 214 * @param keepLevel the KeepLevel below which to erase. 215 * 216 * @not Resources will only be erased, if th keepLevel is below, and the resources are not 217 * referenced anymore. 218 */ 162 219 void ResourceManager::unloadAllBelowKeepLevel(const Resources::KeepLevel& keepLevel) 163 220 {
Note: See TracChangeset
for help on using the changeset viewer.