author | Gustavo J. A. M. Carneiro <gjc@inescporto.pt> |
Tue, 22 Jul 2008 16:54:24 +0100 | |
changeset 3473 | 6bce86ea4778 |
parent 3468 | 0bb5275704fc |
child 3544 | 3685ab98e4b2 |
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): |
|
54 |
## 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
|
55 |
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
|
56 |
'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
|
57 |
[], |
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 |
is_static=True) |
3408 | 59 |
## 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
|
60 |
cls.add_constructor([]) |
3408 | 61 |
## 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
|
62 |
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
|
63 |
'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
|
64 |
[param('uint32_t', 'maxBytes')]) |
3408 | 65 |
## 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
|
66 |
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
|
67 |
'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
|
68 |
[], |
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 |
visibility='protected', is_virtual=True) |
3408 | 70 |
## 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
|
71 |
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
|
72 |
'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
|
73 |
[], |
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 |
visibility='private', is_virtual=True) |
3408 | 75 |
## 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
|
76 |
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
|
77 |
'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
|
78 |
[], |
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 |
visibility='private', is_virtual=True) |
3408 | 80 |
return |
81 |
||
82 |
def register_functions(root_module): |
|
83 |
module = root_module |
|
84 |
register_functions_ns3_internal(module.get_submodule('internal'), root_module) |
|
85 |
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module) |
|
86 |
register_functions_ns3_Config(module.get_submodule('Config'), root_module) |
|
87 |
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module) |
|
88 |
return |
|
89 |
||
90 |
def register_functions_ns3_internal(module, root_module): |
|
91 |
return |
|
92 |
||
93 |
def register_functions_ns3_TimeStepPrecision(module, root_module): |
|
94 |
return |
|
95 |
||
96 |
def register_functions_ns3_Config(module, root_module): |
|
97 |
return |
|
98 |
||
99 |
def register_functions_ns3_olsr(module, root_module): |
|
100 |
return |
|
101 |