10 typedef u16 (CharStrmReader::*ReadFunc)();
13 explicit CharStrmReader(ReadFunc pFunc)
14 : mCharStrm(NULL), mReadFunc(pFunc) {}
18 u16 ReadNextCharUTF8();
19 u16 ReadNextCharUTF16();
20 u16 ReadNextCharCP1252();
21 u16 ReadNextCharSJIS();
24 return (this->*mReadFunc)();
27 const void* GetCurrentPos()
const {
31 void Set(
const char* pStrm) {
34 void Set(
const wchar_t* pStrm) {
39 template <
typename T> T GetChar(
int offset)
const {
40 return static_cast<const T*
>(mCharStrm)[offset];
43 template <
typename T>
void StepStrm(
int offset) {
44 static_cast<const T*
>(mCharStrm) += offset;
48 const void* mCharStrm;