Changeset 9718 in orxonox.OLD for branches/new_class_id/src/lib/util
- Timestamp:
- Sep 1, 2006, 11:56:54 PM (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.cc
r9406 r9718 18 18 #include "resource.h" 19 19 20 20 ObjectListDefinition(Resource); 21 21 22 22 … … 26 26 Resource::Resource (const std::string& fileName) 27 27 { 28 // this->setClassID(CL_RESOURCE, "Resource");28 this->registerObject(this, Resource::_objectList); 29 29 30 30 } -
branches/new_class_id/src/lib/util/loading/resource.h
r9715 r9718 19 19 class Resource : virtual public BaseObject 20 20 { 21 ObjectListDeclaration(Resource); 21 22 public: 22 class Priority23 class KeepLevel 23 24 { 24 25 public: 25 void set PriorityName(unsigned int level, const std::string& name)26 void setKeepLevelName(unsigned int level, const std::string& name) 26 27 { 27 if (_ priorityName.size() <= level)28 _ priorityName.resize(level+1);29 _ priorityName[level] = name;28 if (_keepLevelName.size() <= level) 29 _keepLevelName.resize(level+1); 30 _keepLevelName[level] = name; 30 31 } 31 32 private: 32 std::vector<std::string> _ priorityName;33 std::vector<std::string> _keepLevelName; 33 34 }; 34 35 … … 46 47 std::vector<std::string> _resourceSubPaths; 47 48 std::vector<std::string> _fileExtensions; 48 49 49 }; 50 51 50 52 51 public: … … 60 59 61 60 private: 61 std::string _fileName; 62 MultiType _parameters[3]; //!< The Parameters given to this Resource. 63 Resource::KeepLevel _keepLevel; //!< The Priority of this resource. (can only be increased, so noone else will delete this) 62 64 63 static std::vector<std::vector<std::string> > _resourcePaths;64 65 65 static std::vector< std::string> _resourceClassNames;66 static std::vector<Resource::Type> _resourceTypes; 66 67 67 68 //! GLOBALS 68 static std::string _mainGlobalPath; 69 static std::vector<std::string> _globalPaths; 70 71 std::string fileName; 72 73 unsigned int referenceCount; //!< How many times this Resource has been loaded. 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) 76 77 MultiType param[3]; //!< The Parameters given to this Resource. 69 static std::string _mainGlobalPath; 70 static std::vector<std::string> _globalPaths; 78 71 }; 79 72
Note: See TracChangeset
for help on using the changeset viewer.