mfile.h

来自「ADO查看数据库工具的原码」· C头文件 代码 · 共 38 行

H
38
字号
// MFile.h: interface for the CMFile class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MFILE_H__E191451B_0E71_48E4_A7DB_6C5FD67A0271__INCLUDED_)
#define AFX_MFILE_H__E191451B_0E71_48E4_A7DB_6C5FD67A0271__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CMFile  
{
private:
	char *m_pbuf;
	int   m_buflen;
	int   m_Rseekpos;
	int   m_Wseekpos;
	void  resizebuffer(int size);
	int   m_mode;
	int   m_filelen;
public:
	char * getcurdata();
	CMFile();
	virtual ~CMFile();

	enum { MF_MODE_READ=0 , MF_MODE_CREATE ,MF_MODE_APPEND };
	int  tell();
 	int  open(int mode,char *buf=NULL,int size=1024);
	int  seek(int pos,int mode=SEEK_SET);
	int  write(char *buf,int size);
	int  read(char *buf,int size);
	void close();
	char *getdata(int *len){ *len = m_filelen;return m_pbuf;}
};

#endif // !defined(AFX_MFILE_H__E191451B_0E71_48E4_A7DB_6C5FD67A0271__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?