Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7621 in orxonox.OLD for branches/qt_gui/src/lib/util/file.h


Ignore:
Timestamp:
May 15, 2006, 6:35:32 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: nicer File-Class, that can reopen files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/qt_gui/src/lib/util/file.h

    r7620 r7621  
    2323
    2424public:
     25  File();
    2526  File(const std::string& fileName);
    2627  File(const File& file);
    2728  ~File();
     29  void setFileName(const std::string& fileName);
     30  File& operator=(const std::string& fileName);
     31  File& operator=(const File& file);
     32  bool operator==(const std::string& fileName) const;
     33  bool operator==(const File& file) const;
     34
     35
    2836
    2937  virtual bool open(OpenMode mode);
    3038  virtual bool close();
    31   int handle();
     39  int handle() const { return this->_handle; };
    3240
    3341  /** @returns the FileName of this File */
     
    4856  bool remove();
    4957
    50   static void relToAbs(std::string& fileName);
    51   static void absToRel(std::string& fileName);
     58  static void relToAbs(std::string& relFileName);
     59  static void absToRel(std::string& absFileName);
    5260  static const std::string& cwd();
    5361
    5462  private:
    5563    void init();
    56     bool statFile();
     64    void statFile();
    5765    void homeDirCheck(std::string& fileName);
    5866
Note: See TracChangeset for help on using the changeset viewer.