Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9414 in orxonox.OLD for branches/terrain/src/lib/util/filesys/file.h


Ignore:
Timestamp:
Jul 24, 2006, 12:47:07 PM (18 years ago)
Author:
bensch
Message:

merged back here the terrain.old

File:
1 edited

Legend:

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

    r8619 r9414  
    1616  public:
    1717  //! How the File should be opened.
    18   typedef enum
    19   {
    20     ReadOnly,      //!< ReadOnly mode
    21     WriteOnly,     //!< WriteOnly mode
    22     ReadWrite,     //!< Read and Write mode together
    23     Append,        //!< Append at the end.
     18  typedef enum {
     19    ReadOnly    = 0,     //!< ReadOnly mode
     20    WriteOnly   = 1,     //!< WriteOnly mode
     21    ReadWrite   = 2,     //!< Read and Write mode together
     22    Append              = 3      //!< Append at the end.
    2423  } OpenMode;
    25 
    2624public:
    2725  File();
     
    4139  virtual bool open(OpenMode mode);
    4240  virtual bool close();
    43   int handle() const { return this->_handle; };
    44 
     41  FILE* handle() const
     42  { return this->_handle; };
     43  inline OpenMode mode() const
     44  { return _mode; }
    4545  /** @returns the FileName of this File */
    4646  const std::string& name() const { return this->_name; };
     
    7373
    7474  private:
    75     int                 _handle;          //!< The FileHandle (if set).
     75    FILE*               _handle;          //!< The FileHandle (if set).
    7676    std::string         _name;            //!< The Name of the File.
    7777    stat*               _status;          //!< The Stat of the File.
    78 
     78        OpenMode                        _mode;
    7979    static std::string  _cwd;             //!< The currend Working directory.
    8080
Note: See TracChangeset for help on using the changeset viewer.