author | Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
Fri, 26 Jun 2009 09:55:45 +0200 | |
changeset 4604 | 98cb594222af |
parent 4474 | 19e2b7ff3482 |
permissions | -rw-r--r-- |
4474
19e2b7ff3482
bindings/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4454
diff
changeset
|
1 |
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers |
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 |
|
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:
3574
diff
changeset
|
9 |
## Register a nested module for the namespace Config |
3408 | 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:
3574
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:
3574
diff
changeset
|
12 |
register_types_ns3_Config(nested_module) |
3408 | 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 |
||
4474
19e2b7ff3482
bindings/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4454
diff
changeset
|
21 |
## Register a nested module for the namespace addressUtils |
19e2b7ff3482
bindings/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4454
diff
changeset
|
22 |
|
19e2b7ff3482
bindings/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4454
diff
changeset
|
23 |
nested_module = module.add_cpp_namespace('addressUtils') |
19e2b7ff3482
bindings/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4454
diff
changeset
|
24 |
register_types_ns3_addressUtils(nested_module) |
19e2b7ff3482
bindings/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4454
diff
changeset
|
25 |
|
19e2b7ff3482
bindings/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4454
diff
changeset
|
26 |
|
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:
3574
diff
changeset
|
27 |
## Register a nested module for the namespace internal |
3408 | 28 |
|
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:
3574
diff
changeset
|
29 |
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:
3574
diff
changeset
|
30 |
register_types_ns3_internal(nested_module) |
3408 | 31 |
|
32 |
||
33 |
## Register a nested module for the namespace olsr |
|
34 |
||
35 |
nested_module = module.add_cpp_namespace('olsr') |
|
36 |
register_types_ns3_olsr(nested_module) |
|
37 |
||
38 |
||
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:
3574
diff
changeset
|
39 |
def register_types_ns3_Config(module): |
3408 | 40 |
root_module = module.get_root() |
41 |
||
42 |
||
43 |
def register_types_ns3_TimeStepPrecision(module): |
|
44 |
root_module = module.get_root() |
|
45 |
||
46 |
||
4474
19e2b7ff3482
bindings/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4454
diff
changeset
|
47 |
def register_types_ns3_addressUtils(module): |
19e2b7ff3482
bindings/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4454
diff
changeset
|
48 |
root_module = module.get_root() |
19e2b7ff3482
bindings/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4454
diff
changeset
|
49 |
|
19e2b7ff3482
bindings/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4454
diff
changeset
|
50 |
|
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:
3574
diff
changeset
|
51 |
def register_types_ns3_internal(module): |
3408 | 52 |
root_module = module.get_root() |
53 |
||
54 |
||
55 |
def register_types_ns3_olsr(module): |
|
56 |
root_module = module.get_root() |
|
57 |
||
58 |
||
59 |
def register_methods(root_module): |
|
60 |
register_Ns3OnOffApplication_methods(root_module, root_module['ns3::OnOffApplication']) |
|
61 |
return |
|
62 |
||
63 |
def register_Ns3OnOffApplication_methods(root_module, cls): |
|
4241
c35796bc0b4b
rescan python
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4218
diff
changeset
|
64 |
## onoff-application.h: ns3::OnOffApplication::OnOffApplication(ns3::OnOffApplication const & arg0) [copy constructor] |
c35796bc0b4b
rescan python
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4218
diff
changeset
|
65 |
cls.add_constructor([param('ns3::OnOffApplication const &', 'arg0')]) |
3408 | 66 |
## 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
|
67 |
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
|
68 |
'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
|
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 |
is_static=True) |
3408 | 71 |
## 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
|
72 |
cls.add_constructor([]) |
3408 | 73 |
## 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
|
74 |
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
|
75 |
'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
|
76 |
[param('uint32_t', 'maxBytes')]) |
3408 | 77 |
## 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
|
78 |
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
|
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='protected', is_virtual=True) |
3408 | 82 |
## 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
|
83 |
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
|
84 |
'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
|
85 |
[], |
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
|
86 |
visibility='private', is_virtual=True) |
3408 | 87 |
## 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
|
88 |
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
|
89 |
'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
|
90 |
[], |
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
|
91 |
visibility='private', is_virtual=True) |
3408 | 92 |
return |
93 |
||
94 |
def register_functions(root_module): |
|
95 |
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:
3574
diff
changeset
|
96 |
register_functions_ns3_Config(module.get_submodule('Config'), root_module) |
3408 | 97 |
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module) |
4474
19e2b7ff3482
bindings/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4454
diff
changeset
|
98 |
register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), 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:
3574
diff
changeset
|
99 |
register_functions_ns3_internal(module.get_submodule('internal'), root_module) |
3408 | 100 |
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module) |
101 |
return |
|
102 |
||
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:
3574
diff
changeset
|
103 |
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:
3574
diff
changeset
|
104 |
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:
3574
diff
changeset
|
105 |
|
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:
3574
diff
changeset
|
106 |
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:
3574
diff
changeset
|
107 |
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:
3574
diff
changeset
|
108 |
|
4474
19e2b7ff3482
bindings/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4454
diff
changeset
|
109 |
def register_functions_ns3_addressUtils(module, root_module): |
19e2b7ff3482
bindings/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4454
diff
changeset
|
110 |
return |
19e2b7ff3482
bindings/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4454
diff
changeset
|
111 |
|
3408 | 112 |
def register_functions_ns3_internal(module, root_module): |
113 |
return |
|
114 |
||
115 |
def register_functions_ns3_olsr(module, root_module): |
|
116 |
return |
|
117 |