author | Gustavo J. A. M. Carneiro <gjc@inescporto.pt> |
Fri, 29 Aug 2008 14:56:24 +0100 | |
changeset 3567 | 728eb3f583b3 |
parent 3544 | 3685ab98e4b2 |
child 3574 | b6804efbe16b |
permissions | -rw-r--r-- |
3468
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
1 |
from pybindgen import Module, FileCodeSink, param, retval, cppclass |
3408 | 2 |
|
3 |
def register_types(module): |
|
4 |
root_module = module.get_root() |
|
5 |
||
6 |
## onoff-application.h: ns3::OnOffApplication [class] |
|
3457 | 7 |
module.add_class('OnOffApplication', parent=root_module['ns3::Application']) |
3408 | 8 |
|
9 |
## Register a nested module for the namespace internal |
|
10 |
||
11 |
nested_module = module.add_cpp_namespace('internal') |
|
12 |
register_types_ns3_internal(nested_module) |
|
13 |
||
14 |
||
15 |
## Register a nested module for the namespace TimeStepPrecision |
|
16 |
||
17 |
nested_module = module.add_cpp_namespace('TimeStepPrecision') |
|
18 |
register_types_ns3_TimeStepPrecision(nested_module) |
|
19 |
||
20 |
||
21 |
## Register a nested module for the namespace Config |
|
22 |
||
23 |
nested_module = module.add_cpp_namespace('Config') |
|
24 |
register_types_ns3_Config(nested_module) |
|
25 |
||
26 |
||
27 |
## Register a nested module for the namespace olsr |
|
28 |
||
29 |
nested_module = module.add_cpp_namespace('olsr') |
|
30 |
register_types_ns3_olsr(nested_module) |
|
31 |
||
32 |
||
33 |
def register_types_ns3_internal(module): |
|
34 |
root_module = module.get_root() |
|
35 |
||
36 |
||
37 |
def register_types_ns3_TimeStepPrecision(module): |
|
38 |
root_module = module.get_root() |
|
39 |
||
40 |
||
41 |
def register_types_ns3_Config(module): |
|
42 |
root_module = module.get_root() |
|
43 |
||
44 |
||
45 |
def register_types_ns3_olsr(module): |
|
46 |
root_module = module.get_root() |
|
47 |
||
48 |
||
49 |
def register_methods(root_module): |
|
50 |
register_Ns3OnOffApplication_methods(root_module, root_module['ns3::OnOffApplication']) |
|
51 |
return |
|
52 |
||
53 |
def register_Ns3OnOffApplication_methods(root_module, cls): |
|
3567
728eb3f583b3
Require new PyBindGen (now ignores the badly scanned anonymous containers that cause problems on cygwin) and rescan API.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3544
diff
changeset
|
54 |
## onoff-application.h: ns3::OnOffApplication::OnOffApplication(ns3::OnOffApplication const & arg0) [copy constructor] |
728eb3f583b3
Require new PyBindGen (now ignores the badly scanned anonymous containers that cause problems on cygwin) and rescan API.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3544
diff
changeset
|
55 |
cls.add_constructor([param('ns3::OnOffApplication&', 'arg0', is_const=True)]) |
3408 | 56 |
## onoff-application.h: static ns3::TypeId ns3::OnOffApplication::GetTypeId() [member function] |
3468
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
57 |
cls.add_method('GetTypeId', |
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
58 |
'ns3::TypeId', |
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
59 |
[], |
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
60 |
is_static=True) |
3408 | 61 |
## onoff-application.h: ns3::OnOffApplication::OnOffApplication() [constructor] |
3468
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
62 |
cls.add_constructor([]) |
3408 | 63 |
## onoff-application.h: void ns3::OnOffApplication::SetMaxBytes(uint32_t maxBytes) [member function] |
3468
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
64 |
cls.add_method('SetMaxBytes', |
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
65 |
'void', |
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
66 |
[param('uint32_t', 'maxBytes')]) |
3408 | 67 |
## onoff-application.h: void ns3::OnOffApplication::DoDispose() [member function] |
3468
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
68 |
cls.add_method('DoDispose', |
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
69 |
'void', |
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
70 |
[], |
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
71 |
visibility='protected', is_virtual=True) |
3408 | 72 |
## onoff-application.h: void ns3::OnOffApplication::StartApplication() [member function] |
3468
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
73 |
cls.add_method('StartApplication', |
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
74 |
'void', |
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
75 |
[], |
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
76 |
visibility='private', is_virtual=True) |
3408 | 77 |
## onoff-application.h: void ns3::OnOffApplication::StopApplication() [member function] |
3468
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
78 |
cls.add_method('StopApplication', |
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
79 |
'void', |
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
80 |
[], |
0bb5275704fc
Python: new pybindgen, rescan API definitions, new API definition files are more multi-line and hopefully easier to read
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3457
diff
changeset
|
81 |
visibility='private', is_virtual=True) |
3408 | 82 |
return |
83 |
||
84 |
def register_functions(root_module): |
|
85 |
module = root_module |
|
86 |
register_functions_ns3_internal(module.get_submodule('internal'), root_module) |
|
87 |
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module) |
|
88 |
register_functions_ns3_Config(module.get_submodule('Config'), root_module) |
|
89 |
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module) |
|
90 |
return |
|
91 |
||
92 |
def register_functions_ns3_internal(module, root_module): |
|
93 |
return |
|
94 |
||
95 |
def register_functions_ns3_TimeStepPrecision(module, root_module): |
|
96 |
return |
|
97 |
||
98 |
def register_functions_ns3_Config(module, root_module): |
|
99 |
return |
|
100 |
||
101 |
def register_functions_ns3_olsr(module, root_module): |
|
102 |
return |
|
103 |