extended Interpreter with ::need* functions, also extended File functions
[aqualang.git] / src / private.h
blob35c424a12bed7a7d4e4618661d424ee7dd03cb4e
2 #include <map>
3 #include "jtc.h"
5 #define ID_HANDLE Interpreter::Value(Interpreter::Value::NumberType('h'))
7 //! todo: create a wrapper method ...
8 namespace Stdlib
10 //namespace FileClass
11 //{
12 void rt_file_constructor(Interpreter& ip, std::vector<Interpreter::Value>& stack);
13 void rt_file_proto_typeof(Interpreter& ip, std::vector<Interpreter::Value>& stack);
14 void rt_file_close(Interpreter& ip, std::vector<Interpreter::Value>& stack);
15 void rt_file_flush(Interpreter& ip, std::vector<Interpreter::Value>& stack);
16 void rt_file_read(Interpreter& ip, std::vector<Interpreter::Value>& stack);
17 void rt_file_readchar(Interpreter& ip, std::vector<Interpreter::Value>& stack);
18 void rt_file_readbyte(Interpreter& ip, std::vector<Interpreter::Value>& stack);
19 void rt_file_print(Interpreter& ip, std::vector<Interpreter::Value>& stack);
20 void rt_file_println(Interpreter& ip, std::vector<Interpreter::Value>& stack);
21 void rt_file_write(Interpreter& ip, std::vector<Interpreter::Value>& stack);
22 void rt_file_writebyte(Interpreter& ip, std::vector<Interpreter::Value>& stack);
24 //}
26 static const std::map<std::string, Interpreter::FuncProto> rtfile_functions =
28 {"close", rt_file_close},
29 {"flush", rt_file_flush},
30 {"read", rt_file_read},
31 {"readChar", rt_file_readchar},
32 {"readByte", rt_file_readbyte},
33 {"print", rt_file_print},
34 {"println", rt_file_println},
35 {"write", rt_file_write},
36 {"writeByte", rt_file_writebyte},
39 void fn_print(Interpreter&, std::vector<Interpreter::Value> &stack);
40 void fn_println(Interpreter&, std::vector<Interpreter::Value> &stack);
41 void fn_readline(Interpreter&, std::vector<Interpreter::Value> &stack);
42 void fn_children(Interpreter&, std::vector<Interpreter::Value> &stack);
43 void fn_tokens(Interpreter&, std::vector<Interpreter::Value> &stack);
44 void fn_expand_node(Interpreter&, std::vector<Interpreter::Value> &stack);
45 void fn_tostring(Interpreter&, std::vector<Interpreter::Value> &stack);
46 void fn_tonumber(Interpreter&, std::vector<Interpreter::Value> &stack);