diff options
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2Archive.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/T2DLL/T2Archive.h b/src/T2DLL/T2Archive.h new file mode 100644 index 0000000..f24a386 --- /dev/null +++ b/src/T2DLL/T2Archive.h @@ -0,0 +1,52 @@ +#pragma once +#include "common.h" + +class DLL_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; +}; |