miniswig supports int, float and string constants now
[supertux.git] / tools / miniswig / create_wrapper.hpp
1 #ifndef __CREATE_WRAPPER_H__
2 #define __CREATE_WRAPPER_H__
3
4 #include "tree.hpp"
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
23 private:
24     void create_function_list(Namespace* ns);
25     void create_const_lists(Namespace* ns);
26     void create_class_const_lists(Class* _class);
27     void create_class_wrapper(Class* _class);
28     void create_class_release_hook(Class* _class);
29     void create_function_wrapper(Class* _class, Function* function);
30     void prepare_argument(const Type& type, size_t idx, const std::string& var);
31     void push_to_stack(const Type& type, const std::string& var);
32 };
33
34 #endif
35