Changeset 7625 in orxonox.OLD for branches/qt_gui/src/lib
- Timestamp:
- May 16, 2006, 9:17:10 AM (19 years ago)
- Location:
- branches/qt_gui/src/lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/qt_gui/src/lib/parser/ini_parser/ini_parser.h
r7624 r7625 18 18 * This class can be used to load an initializer file and parse it's contents for variablename=value pairs. 19 19 */ 20 class IniParser 20 class IniParser : public File 21 21 { 22 22 private: -
branches/qt_gui/src/lib/shell/shell_completion_plugin.cc
r7616 r7625 98 98 if (completionBegin.empty()) // if we do not yet have the beginning of the line, start with the chosen startDir. 99 99 { 100 dir.open(ResourceManager::getInstance()->getDataDir() + this->_subDir); 100 dir.setFileName(ResourceManager::getInstance()->getDataDir() + this->_subDir); 101 dir.open(); 101 102 while(dir) 102 103 { … … 112 113 directoryName = completionBegin.substr(0, pos); 113 114 114 dir.open(ResourceManager::getInstance()->getDataDir() + directoryName); 115 dir.setFileName(ResourceManager::getInstance()->getDataDir() + directoryName); 116 dir.open(); 115 117 116 118 std::string fileName; -
branches/qt_gui/src/lib/util/directory.cc
r7624 r7625 42 42 #endif 43 43 Directory::Directory(const std::string& directoryName) 44 :willfail(false)44 : File(directoryName), willfail(false) 45 45 { 46 46 this->handle = 0; … … 52 52 } 53 53 54 bool Directory::open( const std::string& directoryName)54 bool Directory::open() 55 55 { 56 56 #if not defined(__WIN32__) 57 57 if (this->handle != NULL) 58 58 this->close(); 59 this->handle = opendir( directoryName.c_str());59 this->handle = opendir(this->name().c_str()); 60 60 if (!handle) 61 61 willfail = true; … … 75 75 // First check the attributes trying to access a non-Directory with 76 76 // FindFirstFile takes ages 77 DWORD attrs = GetFileAttributes( directoryName.c_str());77 DWORD attrs = GetFileAttributes(this->name().c_str()); 78 78 if ( (attrs == 0xFFFFFFFF) || ((attrs && FILE_ATTRIBUTE_DIRECTORY) == 0) ) 79 79 { … … 81 81 return false; 82 82 } 83 std::string Full( directoryName);83 std::string Full(this->name()); 84 84 // Circumvent a problem in FindFirstFile with c:\\* as parameter 85 85 if ( (Full.length() > 0) && (Full[Full.length()-1] != '\\') ) -
branches/qt_gui/src/lib/util/directory.h
r7624 r7625 42 42 ~Directory(); 43 43 44 virtual bool open( const std::string& directoryName);44 virtual bool open(); 45 45 virtual bool close(); 46 46 operator void*() const { return willfail ? (void*)0:(void*)(-1); } -
branches/qt_gui/src/lib/util/file.h
r7622 r7625 11 11 typedef struct stat; 12 12 13 //! A Class to Handle Files. 13 14 class File 14 15 { 15 16 public: 17 //! How the File should be opened. 16 18 typedef enum 17 19 { 18 ReadOnly, 19 WriteOnly, 20 ReadWrite, 21 Append, 20 ReadOnly, //!< ReadOnly mode 21 WriteOnly, //!< WriteOnly mode 22 ReadWrite, //!< Read and Write mode together 23 Append, //!< Append at the end. 22 24 } OpenMode; 23 25
Note: See TracChangeset
for help on using the changeset viewer.