source: liacs/MIR2010/SourceCode/cximage/xmemfile.h@ 281

Last change on this file since 281 was 95, checked in by Rick van der Zwet, 15 years ago

Bad boy, improper move of directory

File size: 1000 bytes
Line 
1#if !defined(__xmemfile_h)
2#define __xmemfile_h
3
4#include "xfile.h"
5
6//////////////////////////////////////////////////////////
7class DLL_EXP CxMemFile : public CxFile
8{
9public:
10 CxMemFile(BYTE* pBuffer = NULL, DWORD size = 0);
11 ~CxMemFile();
12
13 bool Open();
14 BYTE* GetBuffer(bool bDetachBuffer = true);
15
16 virtual bool Close();
17 virtual size_t Read(void *buffer, size_t size, size_t count);
18 virtual size_t Write(const void *buffer, size_t size, size_t count);
19 virtual bool Seek(long offset, int origin);
20 virtual long Tell();
21 virtual long Size();
22 virtual bool Flush();
23 virtual bool Eof();
24 virtual long Error();
25 virtual bool PutC(unsigned char c);
26 virtual long GetC();
27 virtual char * GetS(char *string, int n);
28 virtual long Scanf(const char *format, void* output);
29
30protected:
31 bool Alloc(DWORD nBytes);
32 void Free();
33
34 BYTE* m_pBuffer;
35 DWORD m_Size;
36 bool m_bFreeOnClose;
37 long m_Position; //current position
38 long m_Edge; //buffer size
39};
40
41#endif
Note: See TracBrowser for help on using the repository browser.