-
Notifications
You must be signed in to change notification settings - Fork 1
/
winxedxx_handle.h
51 lines (44 loc) · 1.29 KB
/
winxedxx_handle.h
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
#ifndef INCLUDE_WINXEDXX_HANDLE_H
#define INCLUDE_WINXEDXX_HANDLE_H
// winxedxx_handle.h
// (C) 2011-2012 Julián Albo "NotFound"
namespace WinxedXX
{
class WxxFileHandle : public WxxDefault
{
public:
WxxFileHandle(int predef = 0);
~WxxFileHandle();
WxxObject *open(const std::string &name);
WxxObject *open(const std::string & name, const std::string &mode);
WxxObject *open(WxxObjectPtr name);
WxxObject *open(WxxObjectPtr name, WxxObjectPtr mode);
WxxObjectPtr close();
void print(WxxObjectPtr obj);
WxxObjectPtr call_method(const std::string &methname, WxxObjectArray &args);
private:
FILE *f;
WxxObjectPtr read(int n);
WxxObjectPtr readline();
};
class WxxStringHandle : public WxxDefault
{
public:
WxxStringHandle();
~WxxStringHandle();
WxxObject *open(const std::string &name);
WxxObject *open(const std::string & name, const std::string &mode);
WxxObject *open(WxxObjectPtr name);
WxxObject *open(WxxObjectPtr name, WxxObjectPtr mode);
WxxObjectPtr close();
void print(WxxObjectPtr obj);
WxxObjectPtr call_method(const std::string &methname, WxxObjectArray &args);
private:
std::string s;
int pos;
bool eof() const;
WxxObjectPtr read(int n);
};
} // namespace WinxedXX
#endif
// End of winxedxx_handle.h