亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? file.h

?? 浙江大學的悟空嵌入式系統(tǒng)模擬器
?? H
字號:
/////////////////////////////////////////////////////////////////////////////
// Name:        file.h
// Purpose:     wxFile - encapsulates low-level "file descriptor"
//              wxTempFile - safely replace the old file
// Author:      Vadim Zeitlin
// Modified by:
// Created:     29/01/98
// RCS-ID:      $Id: file.h,v 1.1 2005/03/16 06:49:00 kehc Exp $
// Copyright:   (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence:     wxWindows license
/////////////////////////////////////////////////////////////////////////////

#ifndef _WX_FILEH__
#define _WX_FILEH__

#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "file.h"
#endif

#ifndef WX_PRECOMP
  #include  "wx/string.h"
  #include  "wx/filefn.h"
  #include  "wx/strconv.h"
#endif

#if wxUSE_FILE

// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------

// we redefine these constants here because S_IREAD &c are _not_ standard
// however, we do assume that the values correspond to the Unix umask bits
#define wxS_IRUSR 00400
#define wxS_IWUSR 00200
#define wxS_IXUSR 00100

#define wxS_IRGRP 00040
#define wxS_IWGRP 00020
#define wxS_IXGRP 00010

#define wxS_IROTH 00004
#define wxS_IWOTH 00002
#define wxS_IXOTH 00001

// default mode for the new files: corresponds to umask 022
#define wxS_DEFAULT   (wxS_IRUSR | wxS_IWUSR | wxS_IRGRP | wxS_IWGRP |\
                       wxS_IROTH | wxS_IWOTH)

// ----------------------------------------------------------------------------
// class wxFile: raw file IO
//
// NB: for space efficiency this class has no virtual functions, including
//     dtor which is _not_ virtual, so it shouldn't be used as a base class.
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxFile
{
public:
  // more file constants
  // -------------------
    // opening mode
  enum OpenMode { read, write, read_write, write_append, write_excl };
    // standard values for file descriptor
  enum { fd_invalid = -1, fd_stdin, fd_stdout, fd_stderr };

  // static functions
  // ----------------
    // check whether a regular file by this name exists
  static bool Exists(const wxChar *name);
    // check whetther we can access the given file in given mode
    // (only read and write make sense here)
  static bool Access(const wxChar *name, OpenMode mode);

  // ctors
  // -----
    // def ctor
  wxFile() { m_fd = fd_invalid; }
    // open specified file (may fail, use IsOpened())
  wxFile(const wxChar *szFileName, OpenMode mode = read);
    // attach to (already opened) file
  wxFile(int fd) { m_fd = fd; }

  // open/close
    // create a new file (with the default value of bOverwrite, it will fail if
    // the file already exists, otherwise it will overwrite it and succeed)
  bool Create(const wxChar *szFileName, bool bOverwrite = FALSE,
              int access = wxS_DEFAULT);
  bool Open(const wxChar *szFileName, OpenMode mode = read,
            int access = wxS_DEFAULT);
  bool Close();  // Close is a NOP if not opened

  // assign an existing file descriptor and get it back from wxFile object
  void Attach(int fd) { Close(); m_fd = fd; }
  void Detach()       { m_fd = fd_invalid;  }
  int  fd() const { return m_fd; }

  // read/write (unbuffered)
    // returns number of bytes read or ofsInvalid on error
  off_t Read(void *pBuf, off_t nCount);
    // returns the number of bytes written
  size_t Write(const void *pBuf, size_t nCount);
    // returns true on success
  bool Write(const wxString& s, wxMBConv& conv = wxConvLocal)
  {
      const wxWX2MBbuf buf = s.mb_str(conv);
      size_t size = strlen(buf);
      return Write((const char *) buf, size) == size;
  }
    // flush data not yet written
  bool Flush();

  // file pointer operations (return ofsInvalid on failure)
    // move ptr ofs bytes related to start/current off_t/end of file
  off_t Seek(off_t ofs, wxSeekMode mode = wxFromStart);
    // move ptr to ofs bytes before the end
  off_t SeekEnd(off_t ofs = 0) { return Seek(ofs, wxFromEnd); }
    // get current off_t
  off_t Tell() const;
    // get current file length
  off_t Length() const;

  // simple accessors
    // is file opened?
  bool IsOpened() const { return m_fd != fd_invalid; }
    // is end of file reached?
  bool Eof() const;
    // has an error occured?
  bool Error() const { return m_error; }

  // dtor closes the file if opened
  ~wxFile() { Close(); }

private:
  // copy ctor and assignment operator are private because
  // it doesn't make sense to copy files this way:
  // attempt to do it will provoke a compile-time error.
  wxFile(const wxFile&);
  wxFile& operator=(const wxFile&);

  int m_fd; // file descriptor or INVALID_FD if not opened
  bool m_error; // error memory
};

// ----------------------------------------------------------------------------
// class wxTempFile: if you want to replace another file, create an instance
// of wxTempFile passing the name of the file to be replaced to the ctor. Then
// you can write to wxTempFile and call Commit() function to replace the old
// file (and close this one) or call Discard() to cancel the modification. If
// you call neither of them, dtor will call Discard().
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxTempFile
{
public:
  // ctors
    // default
  wxTempFile() { }
    // associates the temp file with the file to be replaced and opens it
  wxTempFile(const wxString& strName);

  // open the temp file (strName is the name of file to be replaced)
  bool Open(const wxString& strName);

  // is the file opened?
  bool IsOpened() const { return m_file.IsOpened(); }

  // I/O (both functions return true on success, false on failure)
  bool Write(const void *p, size_t n) { return m_file.Write(p, n) != 0; }
  bool Write(const wxString& str, wxMBConv& conv = wxConvLibc) { return m_file.Write(str, conv); }

  // different ways to close the file
    // validate changes and delete the old file of name m_strName
  bool Commit();
    // discard changes
  void Discard();

  // dtor calls Discard() if file is still opened
 ~wxTempFile();

private:
  // no copy ctor/assignment operator
  wxTempFile(const wxTempFile&);
  wxTempFile& operator=(const wxTempFile&);

  wxString  m_strName,  // name of the file to replace in Commit()
            m_strTemp;  // temporary file name
  wxFile    m_file;     // the temporary file
};

#endif // wxUSE_FILE

#endif // _WX_FILEH__

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一级免费一区| 卡一卡二国产精品 | 欧美三级三级三级| 精品久久久久av影院| 亚洲乱码中文字幕| 懂色中文一区二区在线播放| 欧美区视频在线观看| 亚洲欧洲日韩在线| 国产一区二区电影| 日韩精品最新网址| 日韩精品一二区| 欧美影视一区在线| 亚洲欧美一区二区视频| 国产99久久久久久免费看农村| 51精品久久久久久久蜜臀| 亚洲精品欧美激情| 91小视频免费观看| 国产精品理伦片| 成人app在线| 国产精品麻豆一区二区| 国产精品一品二品| 久久欧美中文字幕| 国内欧美视频一区二区| 日韩午夜激情视频| 激情综合五月天| 久久亚洲私人国产精品va媚药| 日本中文一区二区三区| 7777女厕盗摄久久久| 午夜视频久久久久久| 精品婷婷伊人一区三区三| 一区二区三区国产精华| 在线观看网站黄不卡| 一区二区高清免费观看影视大全| 色婷婷综合激情| 亚洲一区二区3| 欧美日韩高清一区二区| 青娱乐精品在线视频| 日韩一区二区视频| 国产尤物一区二区| 中文字幕成人av| 91麻豆产精品久久久久久 | 国产亚洲综合性久久久影院| 国产在线不卡一区| 国产精品国产馆在线真实露脸| 91丨九色丨蝌蚪富婆spa| 一区二区三区鲁丝不卡| 欧美日韩一级片网站| 蜜桃视频在线观看一区| 久久久精品免费观看| 成人午夜视频在线观看| 亚洲黄色在线视频| 91精品婷婷国产综合久久性色| 韩国一区二区视频| 亚洲色图视频免费播放| 欧美精品777| 国产精华液一区二区三区| 亚洲欧洲美洲综合色网| 欧美理论片在线| 国产一区二区在线视频| 亚洲色图在线播放| 欧美一区二区大片| 成人自拍视频在线| 亚洲无线码一区二区三区| 精品成人一区二区三区四区| 91麻豆国产香蕉久久精品| 奇米888四色在线精品| 亚洲欧洲韩国日本视频| 日韩一区二区电影| 91色porny蝌蚪| 久久成人精品无人区| 亚洲欧美一区二区三区久本道91| 制服.丝袜.亚洲.另类.中文| 成人精品电影在线观看| 欧美a级一区二区| 欧美国产日韩一二三区| 欧美一区二区三区视频在线 | 国产一区二区中文字幕| 亚洲综合成人在线视频| 国产日韩欧美一区二区三区乱码| 欧美在线一二三| 成人精品视频.| 精品无人区卡一卡二卡三乱码免费卡 | 亚洲精品日产精品乱码不卡| 精品国产三级a在线观看| 在线欧美小视频| 成人小视频在线观看| 激情综合色综合久久综合| 一区二区三区日韩欧美精品| 国产欧美日韩卡一| 欧美r级在线观看| 91麻豆精品91久久久久同性| 日本二三区不卡| 懂色av中文字幕一区二区三区| 精品亚洲国内自在自线福利| 五月天一区二区三区| 亚洲欧美韩国综合色| 欧美激情在线免费观看| 久久久久青草大香线综合精品| 91精品国产综合久久久蜜臀图片| 91国产免费看| 欧美亚日韩国产aⅴ精品中极品| 99精品1区2区| 色噜噜狠狠成人网p站| 99精品久久免费看蜜臀剧情介绍| 床上的激情91.| 99视频精品在线| 97se亚洲国产综合自在线不卡| 丁香一区二区三区| 国产91精品露脸国语对白| 国产成人精品三级麻豆| 国产在线国偷精品产拍免费yy | 午夜婷婷国产麻豆精品| 一个色在线综合| 亚洲一区二区三区四区不卡| 亚洲精品乱码久久久久久| 亚洲男同性恋视频| 一区二区三区四区亚洲| 一区二区在线看| 亚洲国产欧美在线| 日韩成人一区二区| 日韩成人午夜电影| 久久草av在线| 国产毛片一区二区| 成人毛片老司机大片| eeuss影院一区二区三区| 一本久久a久久免费精品不卡| 99热99精品| 欧美日韩国产综合一区二区| 欧美精品久久久久久久多人混战| 欧美高清视频一二三区 | 欧美日韩在线电影| 4438亚洲最大| 日本一区二区综合亚洲| 亚洲三级电影网站| 日韩中文字幕av电影| 激情综合色综合久久| 成人av电影在线网| 精品视频1区2区| 欧美va亚洲va| 亚洲日本一区二区| 日本麻豆一区二区三区视频| 九一久久久久久| av在线播放不卡| 91.com在线观看| 国产欧美日韩激情| 午夜视黄欧洲亚洲| 国产福利精品一区二区| 91黄色免费网站| 久久久五月婷婷| 亚洲一区二区四区蜜桃| 国产美女一区二区| 欧美午夜电影在线播放| 久久综合色播五月| 亚洲最大的成人av| 国产乱人伦偷精品视频免下载| 99久久777色| 日韩精品一区二区三区蜜臀| 亚洲欧洲日韩av| 精品一区二区三区免费毛片爱| 91欧美一区二区| 国产亚洲va综合人人澡精品| 亚洲一区二区三区视频在线 | 欧美午夜免费电影| 久久免费电影网| 天堂av在线一区| www.av亚洲| 国产喷白浆一区二区三区| 天天综合网天天综合色| www.综合网.com| 久久久三级国产网站| 免费成人性网站| 欧美视频一二三区| 日韩一区在线免费观看| 国产在线观看一区二区| 欧美精品一级二级三级| 自拍偷拍亚洲激情| 国产寡妇亲子伦一区二区| 日韩一区二区三区电影在线观看 | 色香色香欲天天天影视综合网| 久久综合九色综合97婷婷 | 欧美日韩一区在线| 中文字幕一区不卡| 风间由美一区二区av101| 精品少妇一区二区三区日产乱码| 亚洲国产日韩在线一区模特| 99riav久久精品riav| 日本一区二区成人| 国产精品一线二线三线| 精品国产一区二区国模嫣然| 日韩av在线播放中文字幕| 欧美日韩一级视频| 亚洲电影视频在线| 欧美日韩一本到| 亚洲一区二区三区小说| 欧美在线小视频| 亚洲成人自拍网| 欧美高清dvd| 日韩福利视频网| 欧美一卡2卡三卡4卡5免费| 日本色综合中文字幕|