Changeset 9789 in orxonox.OLD for branches/new_class_id/src/lib/util/loading/resource.h
- Timestamp:
- Sep 22, 2006, 10:20:14 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/loading/resource.h
r9788 r9789 8 8 9 9 #include "base_object.h" 10 #include "multi_type.h"11 10 #include <string> 12 11 #include <vector> … … 26 25 { 27 26 public: 28 void setKeepLevelName(unsigned int level, const std::string& name); 27 KeepLevel(unsigned int keepLevel) { _keepLevel = keepLevel; }; 28 KeepLevel(const std::string& keepLevelName); 29 30 static void defineKeepLevelName(unsigned int level, const std::string& name); 29 31 private: 30 std::vector<std::string> _keepLevelName; 32 unsigned int _keepLevel; 33 private: 34 static std::vector<std::string> _keepLevelNames; 31 35 }; 32 36 37 33 38 protected: 34 class Pointer39 class StorePointer 35 40 { 36 41 public: 37 Pointer(const std::string& loadString, const NewResource::KeepLevel& keeplevel);42 StorePointer(const std::string& loadString, const NewResource::KeepLevel& keeplevel); 38 43 const std::string& loadString() const { return _loadString; }; 39 44 const NewResource::KeepLevel& keepLevel() const { return _keepLevel; }; 40 45 41 46 private: 42 std::string _loadString; //!< An identifier, to match when loading a File.47 std::string _loadString; //!< An identifier, to match when loading a File. 43 48 NewResource::KeepLevel _keepLevel; //!< The Priority of this resource. (can only be increased, so none else will delete this) 44 49 }; … … 60 65 const std::vector<std::string>& resourcePaths() const { return _resourcePaths; }; 61 66 const std::vector<std::string>& resourceSubPaths() const { return _resourceSubPaths; }; 62 const std::vector<NewResource:: Pointer*>& storedResources() const { return _storedResources; };67 const std::vector<NewResource::StorePointer*>& storedResources() const { return _storedResources; }; 63 68 64 69 void setID(int id); 65 void addResource(NewResource:: Pointer* resource);70 void addResource(NewResource::StorePointer* resource); 66 71 67 72 private: … … 72 77 std::vector<std::string> _fileExtensions; 73 78 74 std::vector<NewResource:: Pointer*> _storedResources;79 std::vector<NewResource::StorePointer*> _storedResources; 75 80 }; 76 81 … … 92 97 93 98 protected: 94 NewResource:: Pointer* acquireResource(const std::string& loadString);95 void addResource(NewResource:: Pointer* pointer);99 NewResource::StorePointer* acquireResource(const std::string& loadString); 100 void addResource(NewResource::StorePointer* pointer); 96 101 97 102 private: 98 NewResource:: Pointer* _pointer; //!< Virtual Pointer to the ResourceData.103 NewResource::StorePointer* _pointer; //!< Virtual Pointer to the ResourceData. 99 104 NewResource::Type* _type; //!< Type of the NewResource. 100 105
Note: See TracChangeset
for help on using the changeset viewer.