OSDN Git Service

src/commonに移動したため削除。
[simplecms/utakata.git] / common / file.h
diff --git a/common/file.h b/common/file.h
deleted file mode 100755 (executable)
index d91fd9c..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-#pragma once
-
-/**
- CFile
- HGLにおける、基本的なファイルクラス。
- WindowsAPIは使用せず、C標準関数のみで構成する。
- あくまで標準的な機能のみをラッパーしただけである。
-*/
-enum FOPEN_MODE {
-       READ,
-       WRITE,
-       ADD,
-       READ_B,
-       WRITE_B,
-       ADD_B,
-       RW,                     //r+
-       RW_B,           //rb+
-};
-
-class CFile {
-public:
-
-       CFile();
-       CFile(const std::string& fname,FOPEN_MODE mode = READ);
-       ~CFile();
-
-       /**
-        * 指定されたファイルを開く
-        * @param const std::string& fname 開くファイル名
-        * @param FOPEN_MODE mode ファイルオープンモード
-        * @access public
-        * @return int 失敗時は非ゼロ
-        */
-       virtual int open(const std::string& fname,FOPEN_MODE mode = READ);
-
-       /**
-        * 指定されたサイズ、開かれたファイルから読み出す。
-        * これは、すでにopenしていないと意味がない
-        * @param unsigned char* buf データを入れるバッファ
-        * @param unsigned long readsize 読み出すサイズ(バイト)
-        * @access public
-        * @return long 失敗時は非0
-        */
-       virtual int read(unsigned char* buf,unsigned long readsize);
-
-       /**
-        * 指定されたサイズ、開かれたファイルから読み出す。
-        * これは、すでにopenしていないと意味がない
-        * @param unsigned char* buf データを入れるバッファ
-        * @param unsigned long readsize 読み出すサイズ(バイト)
-        * @access public
-        * @return long 失敗時は非0
-        */
-       virtual int read(std::vector<unsigned char>& buf,unsigned long readsize);
-
-       /**
-        * 一行を読み出す
-        * @param std::string& buf バッファ
-        * @access public
-        * @return long
-        */
-       virtual int readLine(std::string& buf);
-
-       /**
-        * 指定したファイルを開いて、読み出す。
-        * 以前開かれていたファイルは閉じられる。
-        * @param const std::string& fname 開くファイル名
-        * @param unsigned char* buf データを入れるバッファ
-        * @param unsigned long readsize 読み出すバイトサイズ
-        * @param FOPEN_MODE mode
-        * @access public
-        * @return long 読み出したサイズ、失敗時は非0
-        */
-       virtual int load(const std::string& fname,unsigned char* buf,
-                               unsigned long readsize,FOPEN_MODE mode = READ);
-
-       /**
-        * 指定されたサイズを書き出す
-        * @param void* lpmem
-        * @param unsigned long size
-        * @access public
-        * @return ing
-        */
-       virtual int write(void *lpmem,unsigned long size);
-
-       /**
-        * 文字列を書き出す
-        * @param const std::string& fname
-        * @access public
-        * @return int
-        */
-       virtual int write(const std::string& fname);
-
-       /**
-        * 現在開かれているファイルを閉じる。
-        * 基本的にこれを実行する必要はない
-        * @access public
-        * @return int
-        */
-       virtual int close();
-
-       /**
-        * ファイルシークを行う。
-        * これは、原則として現在のファイルポインタの位置からである
-        * @param unsigned long seeksize シークするサイズ
-        * @access public
-        * @return int
-        */
-       virtual int seek(unsigned long seeksize);
-
-       /**
-        * ファイルポインタを先頭に戻す
-        * @access public
-        * @return int
-        */
-       virtual int begin();
-
-       /**
-        * ファイルポインタを末尾にやる
-        * @access public
-        * @return int
-        */
-       virtual int end();
-
-       /**
-        * ファイルの末尾かどうか
-        * @access public
-        * @return bool
-        */
-       bool isEOF();
-
-       /**
-        * ファイルが開かれているかどうか
-        * @access public
-        * @return bool
-        */
-       bool isOpen() const {return m_bOpenFlg;}
-       
-       //ファイルサイズを取得する。これはopen時点で取得される、
-       long size() const {return m_lFileSize;}
-
-private:
-
-       /**
-        innerOpen
-        内部使用関数
-        @param const std::stirng& fname ファイル名
-        @param const std::string& mode モード名
-        @access public
-        @return int
-       */
-       int innerOpen(const std::string& fname,const std::string& mode);
-
-       FILE* m_lpFile;
-       std::string m_szFileName;
-       long m_lFileSize;
-
-       bool m_bOpenFlg;
-
-};