author | Gustavo J. A. M. Carneiro <gjc@inescporto.pt> |
Fri, 28 Nov 2008 14:45:48 +0000 | |
changeset 3951 | 561a37800333 |
parent 3855 | 7fdcbeea6c4f |
child 3972 | a84f2ab246e6 |
permissions | -rw-r--r-- |
3844
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
1 |
from pybindgen import Module, FileCodeSink, param, retval, cppclass |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
2 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
3 |
def register_types(module): |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
4 |
root_module = module.get_root() |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
5 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
6 |
## v4ping.h: ns3::V4Ping [class] |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
7 |
module.add_class('V4Ping', parent=root_module['ns3::Application']) |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
8 |
|
3855
7fdcbeea6c4f
Python: require new pybindgen and re-scan API to make the list of free functions and namespaces sorted.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3844
diff
changeset
|
9 |
## Register a nested module for the namespace Config |
3844
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
10 |
|
3855
7fdcbeea6c4f
Python: require new pybindgen and re-scan API to make the list of free functions and namespaces sorted.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3844
diff
changeset
|
11 |
nested_module = module.add_cpp_namespace('Config') |
7fdcbeea6c4f
Python: require new pybindgen and re-scan API to make the list of free functions and namespaces sorted.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3844
diff
changeset
|
12 |
register_types_ns3_Config(nested_module) |
3844
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
13 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
14 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
15 |
## Register a nested module for the namespace TimeStepPrecision |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
16 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
17 |
nested_module = module.add_cpp_namespace('TimeStepPrecision') |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
18 |
register_types_ns3_TimeStepPrecision(nested_module) |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
19 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
20 |
|
3855
7fdcbeea6c4f
Python: require new pybindgen and re-scan API to make the list of free functions and namespaces sorted.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3844
diff
changeset
|
21 |
## Register a nested module for the namespace internal |
3844
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
22 |
|
3855
7fdcbeea6c4f
Python: require new pybindgen and re-scan API to make the list of free functions and namespaces sorted.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3844
diff
changeset
|
23 |
nested_module = module.add_cpp_namespace('internal') |
7fdcbeea6c4f
Python: require new pybindgen and re-scan API to make the list of free functions and namespaces sorted.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3844
diff
changeset
|
24 |
register_types_ns3_internal(nested_module) |
3844
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
25 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
26 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
27 |
## Register a nested module for the namespace olsr |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
28 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
29 |
nested_module = module.add_cpp_namespace('olsr') |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
30 |
register_types_ns3_olsr(nested_module) |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
31 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
32 |
|
3855
7fdcbeea6c4f
Python: require new pybindgen and re-scan API to make the list of free functions and namespaces sorted.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3844
diff
changeset
|
33 |
def register_types_ns3_Config(module): |
3844
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
34 |
root_module = module.get_root() |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
35 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
36 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
37 |
def register_types_ns3_TimeStepPrecision(module): |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
38 |
root_module = module.get_root() |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
39 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
40 |
|
3855
7fdcbeea6c4f
Python: require new pybindgen and re-scan API to make the list of free functions and namespaces sorted.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3844
diff
changeset
|
41 |
def register_types_ns3_internal(module): |
3844
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
42 |
root_module = module.get_root() |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
43 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
44 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
45 |
def register_types_ns3_olsr(module): |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
46 |
root_module = module.get_root() |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
47 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
48 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
49 |
def register_methods(root_module): |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
50 |
register_Ns3V4Ping_methods(root_module, root_module['ns3::V4Ping']) |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
51 |
return |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
52 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
53 |
def register_Ns3V4Ping_methods(root_module, cls): |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
54 |
## v4ping.h: static ns3::TypeId ns3::V4Ping::GetTypeId() [member function] |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
55 |
cls.add_method('GetTypeId', |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
56 |
'ns3::TypeId', |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
57 |
[], |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
58 |
is_static=True) |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
59 |
## v4ping.h: ns3::V4Ping::V4Ping() [constructor] |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
60 |
cls.add_constructor([]) |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
61 |
## v4ping.h: void ns3::V4Ping::StartApplication() [member function] |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
62 |
cls.add_method('StartApplication', |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
63 |
'void', |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
64 |
[], |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
65 |
visibility='private', is_virtual=True) |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
66 |
## v4ping.h: void ns3::V4Ping::StopApplication() [member function] |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
67 |
cls.add_method('StopApplication', |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
68 |
'void', |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
69 |
[], |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
70 |
visibility='private', is_virtual=True) |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
71 |
## v4ping.h: void ns3::V4Ping::DoDispose() [member function] |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
72 |
cls.add_method('DoDispose', |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
73 |
'void', |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
74 |
[], |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
75 |
visibility='private', is_virtual=True) |
3951
561a37800333
The 'contrib' module actually depends on 'common' too (affects waf --python-scan)
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3855
diff
changeset
|
76 |
cls.add_copy_constructor() |
3844
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
77 |
return |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
78 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
79 |
def register_functions(root_module): |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
80 |
module = root_module |
3855
7fdcbeea6c4f
Python: require new pybindgen and re-scan API to make the list of free functions and namespaces sorted.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3844
diff
changeset
|
81 |
register_functions_ns3_Config(module.get_submodule('Config'), root_module) |
3844
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
82 |
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module) |
3855
7fdcbeea6c4f
Python: require new pybindgen and re-scan API to make the list of free functions and namespaces sorted.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3844
diff
changeset
|
83 |
register_functions_ns3_internal(module.get_submodule('internal'), root_module) |
3844
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
84 |
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module) |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
85 |
return |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
86 |
|
3855
7fdcbeea6c4f
Python: require new pybindgen and re-scan API to make the list of free functions and namespaces sorted.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3844
diff
changeset
|
87 |
def register_functions_ns3_Config(module, root_module): |
7fdcbeea6c4f
Python: require new pybindgen and re-scan API to make the list of free functions and namespaces sorted.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3844
diff
changeset
|
88 |
return |
7fdcbeea6c4f
Python: require new pybindgen and re-scan API to make the list of free functions and namespaces sorted.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3844
diff
changeset
|
89 |
|
7fdcbeea6c4f
Python: require new pybindgen and re-scan API to make the list of free functions and namespaces sorted.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3844
diff
changeset
|
90 |
def register_functions_ns3_TimeStepPrecision(module, root_module): |
7fdcbeea6c4f
Python: require new pybindgen and re-scan API to make the list of free functions and namespaces sorted.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3844
diff
changeset
|
91 |
return |
7fdcbeea6c4f
Python: require new pybindgen and re-scan API to make the list of free functions and namespaces sorted.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3844
diff
changeset
|
92 |
|
3844
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
93 |
def register_functions_ns3_internal(module, root_module): |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
94 |
return |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
95 |
|
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
96 |
def register_functions_ns3_olsr(module, root_module): |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
97 |
return |
df9b99bc768c
need bindings for v4ping
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
98 |