blob: 184fbc18532e888ba2e1416e0c9d6e5fe8c1d69d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#ifndef T2DLL_T2ARCHIVE_H
#define T2DLL_T2ARCHIVE_H
#include "../common.h"
class AFX_CLASS_EXPORT T2Archive {
public:
T2Archive();
virtual ~T2Archive();
virtual BOOL OpenAsReadMode(const char* path);
virtual BOOL OpenAsWriteMode(const char* path);
virtual BOOL Close();
virtual void BeginCompressedStream();
virtual void EndCompressedStream();
virtual BOOL Skip(unsigned long);
virtual int Read(void* buffer, int size);
virtual int Write(const void* buffer, int size);
BOOL operator>>(unsigned char& v);
BOOL operator<<(unsigned char v);
BOOL operator>>(char& v);
BOOL operator<<(char v);
BOOL operator>>(int& v);
BOOL operator<<(int v);
BOOL operator>>(short& v);
BOOL operator<<(short v);
BOOL operator>>(unsigned int& v);
BOOL operator<<(unsigned int v);
BOOL operator>>(unsigned long& v);
BOOL operator<<(unsigned long v);
BOOL operator>>(unsigned short& v);
BOOL operator<<(unsigned short v);
BOOL operator>>(POINT& v);
BOOL operator<<(POINT v);
BOOL operator>>(RECT& v);
BOOL operator<<(RECT v);
BOOL operator>>(CString& v);
BOOL operator<<(CString& v);
BOOL operator>>(char* v);
BOOL operator<<(const char* v);
BOOL ReadPStr(char* v);
BOOL ReadPStr(CString& v);
BOOL WritePStr(const char* v);
BOOL ReadSRect(RECT& v);
BOOL WriteSRect(const RECT& v);
private:
CFile *mFile;
int m8;
BOOL mIsReadable;
BOOL mIsWritable;
char *mBuffer;
int mBufferLen;
char *mPtr;
};
#endif
|