359c1edbca5b152a921708fc9c49340e2abf4567
[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(Namespace* ns);
22     void create_class_wrapper(Class* _class);
23     void create_class_release_hook(Class* _class);
24     void create_function_wrapper(Class* _class, Function* function);
25     void prepare_argument(const Type& type, size_t idx, const std::string& var);
26     void push_to_stack(const Type& type, const std::string& var);
27 };
28
29 #endif
30