Changeset 9800 in orxonox.OLD for branches/new_class_id/src/lib/util/loading/resource.h
- Timestamp:
- Sep 24, 2006, 12:12:14 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/loading/resource.h
r9799 r9800 30 30 class StorePointer 31 31 { 32 33 34 35 32 public: 33 StorePointer(const std::string& loadString, const Resources::KeepLevel& keeplevel); 34 const std::string& loadString() const { return _loadString; }; 35 const Resources::KeepLevel& keepLevel() const { return _keepLevel; }; 36 36 37 38 39 37 private: 38 std::string _loadString; //!< An identifier, to match when loading a File. 39 Resources::KeepLevel _keepLevel; //!< The Priority of this resource. (can only be increased, so none else will delete this) 40 40 }; 41 41 … … 73 73 std::vector<Resources::StorePointer*> _storedResources; 74 74 }; 75 76 77 //! A NewResource is an Object, that can be loaded from Disk 78 /** 79 * 80 */ 81 class NewResource : virtual public BaseObject 82 { 83 ObjectListDeclaration(NewResource); 84 85 public: 86 NewResource(Resources::Type* type); 87 virtual ~NewResource(); 88 89 virtual bool reload() { return false; }; 90 virtual bool unload() { return false; }; 91 92 std::string locateFile(const std::string& fileName) const; 93 94 95 public: 96 protected: 97 Resources::StorePointer* acquireResource(const std::string& loadString); 98 void addResource(Resources::StorePointer* pointer); 99 100 private: 101 std::string locateFileInSubDir(const Directory& directory, const std::string& fileName) const; 102 103 private: 104 Resources::StorePointer* _pointer; //!< Virtual Pointer to the ResourceData. 105 Resources::Type* _type; //!< Type of the NewResource. 106 }; 75 107 } 76 108 77 //! A NewResource is an Object, that can be loaded from Disk78 /**79 *80 */81 class NewResource : virtual public BaseObject82 {83 ObjectListDeclaration(NewResource);84 85 public:86 NewResource(Resources::Type* type);87 virtual ~NewResource();88 89 virtual bool reload() { return false; };90 virtual bool unload() { return false; };91 92 std::string locateFile(const std::string& fileName) const;93 94 95 public:96 protected:97 Resources::StorePointer* acquireResource(const std::string& loadString);98 void addResource(Resources::StorePointer* pointer);99 100 private:101 std::string locateFileInSubDir(const Directory& directory, const std::string& fileName) const;102 103 private:104 Resources::StorePointer* _pointer; //!< Virtual Pointer to the ResourceData.105 Resources::Type* _type; //!< Type of the NewResource.106 };107 108 109 #endif /* _RESOURCE_H */
Note: See TracChangeset
for help on using the changeset viewer.