Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
std-streambuf.h
Go to the documentation of this file.
1#ifndef JGADGET_STD_STREAMBUF_H
2#define JGADGET_STD_STREAMBUF_H
3
4#include <dolphin/types.h>
5#include <string>
6
7namespace JGadget {
8template <typename T>
9struct TTrait_char {};
10
11template <>
12struct TTrait_char<char> {
13 static int eof() { return -1; }
14 static int to_int_type(char value) { return (int)value; }
15 static char to_char_type(int value) { return (char)value; }
16 static bool eq_int_type(int a, int b) { return a == b; }
17 static size_t length(const char* sz) { return strlen(sz); }
18};
19
21public:
23 pBase_get_ = NULL;
24 pEnd_get_ = NULL;
25 pCurrent_get_ = NULL;
26 pBase_put_ = NULL;
27 pEnd_put_ = NULL;
28 pCurrent_put_ = NULL;
29 }
30
31 virtual ~TStreamBuffer() = 0;
32
33 int sputc(char param_0) {
35 *pCurrent_put_ = param_0;
37 return TTrait_char<char>::to_int_type(param_0);
38 } else {
40 }
41 }
42
43 int sgetc();
44
45 int sbumpc() {
49 return var_r29;
50 }
51
52 return uflow();
53 }
54
55 int snextc() {
56 int var_r31 = TTrait_char<char>::eof();
57 return TTrait_char<char>::eq_int_type(sbumpc(), var_r31) ? var_r31 : sgetc();
58 }
59
60 virtual void setbuf(char*, s32);
61 virtual s32 sync();
62 virtual int underflow();
63 virtual int uflow();
64 virtual s32 xsputn(const char*, s32);
65 virtual int overflow(int);
66
67 /* 0x04 */ char* pBase_get_;
68 /* 0x08 */ char* pEnd_get_;
69 /* 0x0C */ char* pCurrent_get_;
70 /* 0x10 */ char* pBase_put_;
71 /* 0x14 */ char* pEnd_put_;
72 /* 0x18 */ char* pCurrent_put_;
73};
74}
75
76#endif /* JGADGET_STD_STREAMBUF_H */
size_t strlen(const char *str)
Definition string.c:7
Definition std-streambuf.h:20
char * pBase_get_
Definition std-streambuf.h:67
int sputc(char param_0)
Definition std-streambuf.h:33
virtual int uflow()
Definition std-streambuf.cpp:20
char * pCurrent_put_
Definition std-streambuf.h:72
virtual int underflow()
Definition std-streambuf.cpp:16
char * pBase_put_
Definition std-streambuf.h:70
virtual int overflow(int)
Definition std-streambuf.cpp:57
char * pCurrent_get_
Definition std-streambuf.h:69
int sbumpc()
Definition std-streambuf.h:45
int snextc()
Definition std-streambuf.h:55
virtual ~TStreamBuffer()=0
Definition std-streambuf.cpp:8
TStreamBuffer()
Definition std-streambuf.h:22
char * pEnd_put_
Definition std-streambuf.h:71
virtual void setbuf(char *, s32)
Definition std-streambuf.cpp:10
virtual s32 sync()
Definition std-streambuf.cpp:12
virtual s32 xsputn(const char *, s32)
Definition std-streambuf.cpp:33
char * pEnd_get_
Definition std-streambuf.h:68
signed long s32
Definition types.h:11
a
Definition k_cos.c:89
Definition linklist.cpp:6
static int eof()
Definition std-streambuf.h:13
static int to_int_type(char value)
Definition std-streambuf.h:14
static bool eq_int_type(int a, int b)
Definition std-streambuf.h:16
static size_t length(const char *sz)
Definition std-streambuf.h:17
static char to_char_type(int value)
Definition std-streambuf.h:15
Definition std-streambuf.h:9