Changeset 7237 in orxonox.OLD for branches/resources/src/lib
- Timestamp:
- Mar 21, 2006, 10:07:48 PM (19 years ago)
- Location:
- branches/resources/src/lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/resources/src/lib/BuildLibs.am
r7151 r7237 17 17 $(LIB_PREFIX)/parser/ini_parser/libIniParser.a \ 18 18 $(LIB_PREFIX)/shell/libORXshell.a \ 19 $(LIB_PREFIX)/math/libORXmath.a 19 $(LIB_PREFIX)/math/libORXmath.a \ 20 $(LIB_PREFIX)/libORXlibs.a -
branches/resources/src/lib/Makefile.am
r7221 r7237 16 16 util/executor/executor.cc \ 17 17 \ 18 util/loading/resource.cc \ 18 19 util/loading/resource_manager.cc \ 19 util/loading/resource.cc \20 20 util/loading/game_loader.cc \ 21 21 util/loading/load_param.cc \ … … 40 40 util/executor/functor_list.h \ 41 41 \ 42 util/loading/resource.h \ 42 43 util/loading/resource_manager.h \ 43 util/loading/resource.h \44 44 util/loading/game_loader.h \ 45 45 util/loading/load_param.h \ -
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.