Changeset 9788 in orxonox.OLD for branches/new_class_id/src/lib/util/loading/resource.h
- Timestamp:
- Sep 22, 2006, 6:55:52 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/loading/resource.h
r9786 r9788 1 1 /*! 2 2 * @file resource.h 3 * @brief Definition of a Resource.3 * @brief Definition of a NewResource. 4 4 */ 5 5 … … 15 15 #include "filesys/directory.h" 16 16 17 //! A Resource is an Object, that can be loaded from Disk17 //! A NewResource is an Object, that can be loaded from Disk 18 18 /** 19 19 * 20 20 */ 21 class Resource : virtual public BaseObject21 class NewResource : virtual public BaseObject 22 22 { 23 ObjectListDeclaration( Resource);23 ObjectListDeclaration(NewResource); 24 24 public: 25 25 class KeepLevel … … 35 35 { 36 36 public: 37 Pointer(const std::string& loadString, const Resource::KeepLevel& keeplevel);37 Pointer(const std::string& loadString, const NewResource::KeepLevel& keeplevel); 38 38 const std::string& loadString() const { return _loadString; }; 39 const Resource::KeepLevel& keepLevel() const { return _keepLevel; };39 const NewResource::KeepLevel& keepLevel() const { return _keepLevel; }; 40 40 41 41 private: 42 42 std::string _loadString; //!< An identifier, to match when loading a File. 43 Resource::KeepLevel _keepLevel; //!< The Priority of this resource. (can only be increased, so none else will delete this)43 NewResource::KeepLevel _keepLevel; //!< The Priority of this resource. (can only be increased, so none else will delete this) 44 44 }; 45 45 … … 60 60 const std::vector<std::string>& resourcePaths() const { return _resourcePaths; }; 61 61 const std::vector<std::string>& resourceSubPaths() const { return _resourceSubPaths; }; 62 const std::vector< Resource::Pointer*>& storedResources() const { return _storedResources; };62 const std::vector<NewResource::Pointer*>& storedResources() const { return _storedResources; }; 63 63 64 64 void setID(int id); 65 void addResource( Resource::Pointer* resource);65 void addResource(NewResource::Pointer* resource); 66 66 67 67 private: … … 72 72 std::vector<std::string> _fileExtensions; 73 73 74 std::vector< Resource::Pointer*> _storedResources;74 std::vector<NewResource::Pointer*> _storedResources; 75 75 }; 76 76 77 77 78 78 public: 79 Resource(Resource::Type* type);80 virtual ~ Resource();79 NewResource(NewResource::Type* type); 80 virtual ~NewResource(); 81 81 82 82 virtual bool reload() { return false; }; … … 92 92 93 93 protected: 94 Resource::Pointer* acquireResource(const std::string& loadString);95 void addResource( Resource::Pointer* pointer);94 NewResource::Pointer* acquireResource(const std::string& loadString); 95 void addResource(NewResource::Pointer* pointer); 96 96 97 97 private: 98 Resource::Pointer* _pointer; //!< Virtual Pointer to the ResourceData.99 Resource::Type* _type; //!< Type of theResource.98 NewResource::Pointer* _pointer; //!< Virtual Pointer to the ResourceData. 99 NewResource::Type* _type; //!< Type of the NewResource. 100 100 101 101 102 static std::vector< Resource::Type*> _resourceTypes;102 static std::vector<NewResource::Type*> _resourceTypes; 103 103 104 104 //! GLOBALS
Note: See TracChangeset
for help on using the changeset viewer.