- Timestamp:
- Mar 22, 2006, 12:52:16 PM (19 years ago)
- Location:
- branches/resources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/resources/configure.ac
r7223 r7240 630 630 src/lib/Makefile 631 631 src/lib/math/Makefile 632 src/lib/util/Makefile 632 633 src/lib/graphics/Makefile 633 634 src/lib/graphics/importer/Makefile -
branches/resources/src/lib/BuildLibs.am
r7238 r7240 17 17 $(LIB_PREFIX)/parser/ini_parser/libIniParser.a \ 18 18 $(LIB_PREFIX)/shell/libORXshell.a \ 19 $(LIB_PREFIX)/ libORXlibs.a \19 $(LIB_PREFIX)/util/libORXlibutil.a \ 20 20 $(LIB_PREFIX)/math/libORXmath.a -
branches/resources/src/lib/Makefile.am
r7237 r7240 10 10 coord/p_node.cc \ 11 11 \ 12 util/substring.cc \13 util/color.cc \14 util/helper_functions.cc \15 util/multi_type.cc \16 util/executor/executor.cc \17 \18 util/loading/resource.cc \19 util/loading/resource_manager.cc \20 util/loading/game_loader.cc \21 util/loading/load_param.cc \22 util/loading/load_param_description.cc \23 util/loading/factory.cc \24 util/loading/dynamic_loader.cc \25 \26 12 data/data_tank.cc 27 13 … … 32 18 coord/p_node.h \ 33 19 \ 34 util/substring.h \35 util/multi_type.h \36 util/color.h \37 util/helper_functions.h \38 util/executor/executor.h \39 util/executor/executor_specials.h \40 util/executor/functor_list.h \41 \42 util/loading/resource.h \43 util/loading/resource_manager.h \44 util/loading/game_loader.h \45 util/loading/load_param.h \46 util/loading/load_param_description.h \47 util/loading/factory.h \48 util/loading/dynamic_loader.h \49 \50 util/count_pointer.h \51 util/list.h \52 \53 20 \ 54 21 data/data_tank.h … … 57 24 . \ 58 25 math \ 26 util \ 59 27 graphics \ 60 28 sound \ -
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.