Debian Codegraph @

examples/h/modulegen.py

raw symbols SCIP
1 #! /usr/bin/env python
2
3 import sys
4
5 import pybindgen
6 from pybindgen import ReturnValue, Parameter, Module, CppClass, CppMethod, CppConstructor, FileCodeSink
7
8 def my_module_gen(out_file):
9
10 mod = Module('h')
11 mod.add_include('"h.h"')
12
13 H = mod.add_class('H')
14 H.add_constructor([])
15 H.add_method('Do', None, [])
16
17 Inner = mod.add_class('Inner', outer_class=H)
18 Inner.add_constructor([])
19 Inner.add_method('Do', None, [])
20
21 MostInner = mod.add_class('MostInner', outer_class=Inner)
22 MostInner.add_constructor([])
23 MostInner.add_method('Do', None, [])
24
25 mod.generate(FileCodeSink(out_file))
26
27 if __name__ == '__main__':
28 my_module_gen(sys.stdout)