Changeset 7237 in orxonox.OLD for branches/resources/src/lib/util
- Timestamp:
- Mar 21, 2006, 10:07:48 PM (19 years ago)
- Location:
- branches/resources/src/lib/util/loading
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/resources/src/lib/util/loading/resource.cc
r7229 r7237 35 35 * standard deconstructor 36 36 */ 37 Resource::~Resource () 38 { 39 // delete what has to be deleted here 40 } 37 // Resource::~Resource () 38 // { 39 // } 41 40 42 41 Resource::SharedResource::SharedResource() … … 46 45 this->prio = RP_NO; 47 46 } 47 48 49 48 50 } -
branches/resources/src/lib/util/loading/resource.h
r7229 r7237 65 65 public: 66 66 Resource(const std::string& fileName = "", ResourcePriority prio = RP_LEVEL); 67 virtual ~Resource() ;67 virtual ~Resource() {}; 68 68 69 69 // looks if the resource was already loaded and (if not) loads it. … … 73 73 const MultiType& param1 = MT_NULL, 74 74 const MultiType& param2 = MT_NULL); 75 virtual bool cache(std::string& fileName = "", 76 ResourcePriority prio = RP_LEVEL, 77 const MultiType& param0 = MT_NULL, 78 const MultiType& param1 = MT_NULL, 79 const MultiType& param2 = MT_NULL); 80 81 75 82 // reloads the resource. 76 83 virtual bool reload() { }; … … 86 93 // raises the priority can only be raised 87 94 void raisePriority(ResourcePriority prio); 95 88 96 /** @returns the referenceCount of the shared resource behind this resource or 0 if no internal Resource is stored */ 89 97 unsigned int referenceCount() const { return (this->resource)? this->resource->referenceCount : 0; }; … … 95 103 const MultiType& param2 = MT_NULL); 96 104 105 private: 106 static SharedResource* locateResourceByPointer(const void* sharedResource); 107 108 static SharedResource* locateResourceByInfo(std::string& fileName, 109 const MultiType& param0 = MT_NULL, 110 const MultiType& param1 = MT_NULL, 111 const MultiType& param2 = MT_NULL); 112 97 113 protected: 98 SharedResource* resource; //!< The internal Resource, this Resource is keeping (at the moment).114 SharedResource* resource; //!< The internal Resource, this Resource is keeping (at the moment). 99 115 100 static std::map<ClassID, std::vector<SharedResource> > storedResources; 116 /** A Map of all stored Resources. */ 117 static std::map<ClassID, std::vector<SharedResource> > storedResources; 101 118 }; 102 119
Note: See TracChangeset
for help on using the changeset viewer.