Checking in miniswig: It's a flex/bison based parser that is able to parse
[supertux.git] / tools / miniswig / create_wrapper.h
1 #ifndef __CREATE_WRAPPER_H__
2 #define __CREATE_WRAPPER_H__
3
4 #include "tree.h"
5
6 class WrapperCreator
7 {
8 public:
9     /// this is used for indentation
10     const char* ind;
11     // output stream
12     std::ostream& out;
13     std::ostream& hppout;
14
15     WrapperCreator(std::ostream& _out = std::cout, std::ostream& _hppout = std::cout)
16         : out(_out), hppout(_hppout)
17     {
18         ind = "  ";
19     }
20
21     void create_wrapper(CompilationUnit* unit);
22     void create_class_wrapper(Class* _class);
23     void create_class_construct_function(Class* _class);
24     void create_class_destruct_function(Class* _class);
25     void create_function_wrapper(Class* _class, Function* function);
26     void prepare_argument(const Type& type, size_t idx, const std::string& var);
27     void push_to_stack(const Type& type, const std::string& var);
28 };
29
30 #endif
31