Changeset 7240 in orxonox.OLD for branches/resources/src/lib/util
- Timestamp:
- Mar 22, 2006, 12:52:16 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
r7238 r7240 2 2 orxonox - the future of 3D-vertical-scrollers 3 3 4 Copyright (C) 200 4orx4 Copyright (C) 2006 orx 5 5 6 6 This program is free software; you can redistribute it and/or modify … … 21 21 namespace Loading 22 22 { 23 /** 24 * @brief Initializes a shared Resource 25 */ 23 26 Resource::SharedResource::SharedResource() 24 27 { … … 30 33 31 34 /** 32 * standard constructor35 * @brief standard constructor 33 36 */ 34 37 Resource::Resource (const std::string& fileName, ResourcePriority prio) … … 40 43 41 44 /** 42 * standard deconstructor45 * @brief standard deconstructor 43 46 */ 44 // Resource::~Resource () 45 // { 46 // } 47 Resource::~Resource () 48 {} 47 49 48 50 … … 50 52 const MultiType& param0, const MultiType& param1, const MultiType& param2) 51 53 {} 54 55 52 56 bool Resource::cache(std::string& fileName, ResourcePriority prio, 53 57 const MultiType& param0, const MultiType& param1, const MultiType& param2) … … 55 59 56 60 57 // reloads the resource. 58 // bool Resource::reload() 59 // {} 60 // unloads the sharedResource (from this Resource) 61 /** 62 * @brief reloads the resource. 63 */ 64 bool Resource::reload() 65 {} 66 61 67 bool Resource::unload() 62 68 {} … … 71 77 {} 72 78 73 // const SharedResource* findResource(std::string& fileName, 74 // const MultiType& param0, const MultiType& param1, const MultiType& param2) 75 // { 76 // } 79 80 bool Resource::reloadResourcesByType(ClassID ResourceType) 81 {} 82 83 bool Resource::reloadAllResources() 84 {} 85 86 bool Resource::unloadResourcesByType(ResourcePriority prio) 87 {} 77 88 78 89 90 bool Resource::unloadAllResources() 91 {} 92 93 void Resource::debug() 94 {} 95 96 97 98 99 const Resource::SharedResource* Resource::findResource(std::string& fileName, 100 const MultiType& param0, const MultiType& param1, const MultiType& param2) 101 {} 102 79 103 } -
branches/resources/src/lib/util/loading/resource.h
r7237 r7240 53 53 public: 54 54 SharedResource(); 55 bool reload(); 55 56 std::string fileName; 56 57 … … 65 66 public: 66 67 Resource(const std::string& fileName = "", ResourcePriority prio = RP_LEVEL); 67 virtual ~Resource() {};68 virtual ~Resource(); 68 69 69 70 // looks if the resource was already loaded and (if not) loads it. … … 73 74 const MultiType& param1 = MT_NULL, 74 75 const MultiType& param2 = MT_NULL); 76 75 77 virtual bool cache(std::string& fileName = "", 76 78 ResourcePriority prio = RP_LEVEL, … … 81 83 82 84 // reloads the resource. 83 virtual bool reload() { };85 virtual bool reload(); 84 86 // unloads the sharedResource (from this Resource) 85 87 virtual bool unload(); 86 88 87 89 // checks if a resource was already loaded. 88 bool isLoaded(std::string& fileName,89 const MultiType& param0 = MT_NULL,90 const MultiType& param1 = MT_NULL,91 const MultiType& param2 = MT_NULL);90 static bool isLoaded(std::string& fileName, 91 const MultiType& param0 = MT_NULL, 92 const MultiType& param1 = MT_NULL, 93 const MultiType& param2 = MT_NULL); 92 94 93 95 // raises the priority can only be raised … … 95 97 96 98 /** @returns the referenceCount of the shared resource behind this resource or 0 if no internal Resource is stored */ 97 unsigned int referenceCount() const { return (this->resource)? this->resource->referenceCount : 0; };99 unsigned int referenceCount() const { return (this->resource)? this->resource->referenceCount : 0; }; 98 100 101 static bool reloadResourcesByType(ClassID ResourceType); 102 static bool reloadAllResources(); 103 104 static bool unloadResourcesByType(ResourcePriority prio); 105 static bool unloadAllResources(); 106 107 static void debug(); 99 108 protected: 100 109 const SharedResource* findResource(std::string& fileName,
Note: See TracChangeset
for help on using the changeset viewer.