author | Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
Mon, 11 Aug 2008 10:40:31 -0700 | |
changeset 3525 | 4b8ef7da0ac3 |
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 |
## packet-sink.h: ns3::PacketSink [class] |
|
3457 | 7 |
module.add_class('PacketSink', 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_Ns3PacketSink_methods(root_module, root_module['ns3::PacketSink']) |
|
51 |
return |
|
52 |
||
53 |
def register_Ns3PacketSink_methods(root_module, cls): |
|
54 |
## packet-sink.h: static ns3::TypeId ns3::PacketSink::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 |
## packet-sink.h: ns3::PacketSink::PacketSink() [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 |
## packet-sink.h: void ns3::PacketSink::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
|
62 |
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
|
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 |
[], |
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 |
visibility='protected', is_virtual=True) |
3408 | 66 |
## packet-sink.h: void ns3::PacketSink::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
|
67 |
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
|
68 |
'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
|
69 |
[], |
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 |
visibility='private', is_virtual=True) |
3408 | 71 |
## packet-sink.h: void ns3::PacketSink::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
|
72 |
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
|
73 |
'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
|
74 |
[], |
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 |
visibility='private', is_virtual=True) |
3408 | 76 |
return |
77 |
||
78 |
def register_functions(root_module): |
|
79 |
module = root_module |
|
80 |
register_functions_ns3_internal(module.get_submodule('internal'), root_module) |
|
81 |
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module) |
|
82 |
register_functions_ns3_Config(module.get_submodule('Config'), root_module) |
|
83 |
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module) |
|
84 |
return |
|
85 |
||
86 |
def register_functions_ns3_internal(module, root_module): |
|
87 |
return |
|
88 |
||
89 |
def register_functions_ns3_TimeStepPrecision(module, root_module): |
|
90 |
return |
|
91 |
||
92 |
def register_functions_ns3_Config(module, root_module): |
|
93 |
return |
|
94 |
||
95 |
def register_functions_ns3_olsr(module, root_module): |
|
96 |
return |
|
97 |