?? memorysharefilestream.h
字號:
/*------------------------------------------------------------------------------
@filename : MemoryShareFileStream.h
*/
#ifndef _MEMORYSHAREFILESTREAM_H_
#define _MEMORYSHAREFILESTREAM_H_
#include <cstdio>
#include <cstdlib>
#include <memory>
#include "IFileStream.h"
namespace IMS_IO
{
class CMemoryShareFileStream : public IFileStream
{
struct SHead
{
SHead()
{
this->nLength = 0;
this->nCurPos = 0;
this->pContent = 0;
this->bClose = false;
this->bClose = false;
}
long nLength;
long nCurPos; //當(dāng)前位置
bool bOPen ; //是否打開了
bool bClose ; //是否關(guān)閉了
unsigned char *pContent;
};
public:
CMemoryShareFileStream(){};
virtual ~CMemoryShareFileStream(){};
public:
bool open(const char *pHandler,int length,char *pFlag);
int seek(long offset,int origin);
int read(void *pBuffer,int size,int count);
bool close();
long length();
long getPos();
public :
SHead m_memFileHandler ;
};
}
#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -