Changeset 9823 in orxonox.OLD for branches/new_class_id/src/lib/util
- Timestamp:
- Sep 25, 2006, 11:28:28 PM (18 years ago)
- Location:
- branches/new_class_id/src/lib/util
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/filesys/directory.cc
r9785 r9823 215 215 File operator+(const Directory& dir, const File& file) 216 216 { 217 return File(dir.name() + '/'+ file.name());218 } 217 return File(dir.name() + Directory::delimiter + file.name()); 218 } -
branches/new_class_id/src/lib/util/filesys/directory.h
r9785 r9823 65 65 const std::string& operator[](unsigned int fileNumber) const { return this->_fileNames[fileNumber]; }; 66 66 /** @returns a formated string containing the FileName, prepended with the directory-Name */ 67 std::string fileNameInDir(unsigned int fileNumber) const { return this->name() + "/"+ _fileNames[fileNumber]; };67 std::string fileNameInDir(unsigned int fileNumber) const { return this->name() + Directory::delimiter + _fileNames[fileNumber]; }; 68 68 /** @returns a File pointing to the File @param fileNumber the fileNumber (must not bigger than fileCount()) */ 69 69 File getFile(unsigned int fileNumber) const { return File(fileNameInDir(fileNumber)); }; -
branches/new_class_id/src/lib/util/loading/resource.h
r9801 r9823 61 61 public: 62 62 Type(const std::string& typeName); 63 ~Type();63 virtual ~Type(); 64 64 /** @returns true if the names match @param resourceName the Name to compare. @brief compare the Type with a Name */ 65 65 bool operator==(const std::string& resourceName) const { return this->_typeName == resourceName; }; … … 82 82 const std::vector<Resources::StorePointer*>& storedResources() const { return _storedResources; }; 83 83 84 virtual void createFromString(const std::string& loadString) = 0; 85 84 86 void setID(int id); 85 87 void addResource(Resources::StorePointer* resource); … … 95 97 96 98 std::vector<Resources::StorePointer*> _storedResources; //!< An array of all the stored Resources. 99 }; 100 101 template<class T> class tType : public Type 102 { 103 public: 104 tType(const std::string& typeName) : Type(typeName) {}; 105 virtual void createFromString(const std::string& loadString) { T::createFromString(loadString); } 97 106 }; 98 107
Note: See TracChangeset
for help on using the changeset viewer.