OLD | NEW |
1 from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandler
s | 1 from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandler
s |
2 | 2 |
3 | 3 |
4 import pybindgen.settings | 4 import pybindgen.settings |
5 import warnings | 5 import warnings |
6 | 6 |
7 class ErrorHandler(pybindgen.settings.ErrorHandler): | 7 class ErrorHandler(pybindgen.settings.ErrorHandler): |
8 def handle_error(self, wrapper, exception, traceback_): | 8 def handle_error(self, wrapper, exception, traceback_): |
9 warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) | 9 warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) |
10 return True | 10 return True |
11 pybindgen.settings.error_handler = ErrorHandler() | 11 pybindgen.settings.error_handler = ErrorHandler() |
12 | 12 |
13 | 13 |
14 import sys | 14 import sys |
15 import ns3_module_core | 15 import ns3_module_core |
16 import ns3_module_simulator | 16 import ns3_module_simulator |
17 import ns3_module_test | 17 import ns3_module_test |
18 import ns3_module_common | 18 import ns3_module_common |
19 import ns3_module_mobility | 19 import ns3_module_mobility |
| 20 import ns3_module_mpi |
20 import ns3_module_contrib | 21 import ns3_module_contrib |
21 import ns3_module_node | 22 import ns3_module_node |
22 import ns3_module_bridge | 23 import ns3_module_bridge |
23 import ns3_module_csma | 24 import ns3_module_csma |
24 import ns3_module_emu | 25 import ns3_module_emu |
25 import ns3_module_global_routing | 26 import ns3_module_global_routing |
26 import ns3_module_internet_stack | 27 import ns3_module_internet_stack |
27 import ns3_module_list_routing | 28 import ns3_module_list_routing |
28 import ns3_module_onoff | 29 import ns3_module_onoff |
29 import ns3_module_packet_sink | 30 import ns3_module_packet_sink |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 ns3_module_mobility.register_types(module) | 103 ns3_module_mobility.register_types(module) |
103 ···· | 104 ···· |
104 try: | 105 try: |
105 import ns3_module_mobility__local | 106 import ns3_module_mobility__local |
106 except ImportError: | 107 except ImportError: |
107 pass | 108 pass |
108 else: | 109 else: |
109 ns3_module_mobility__local.register_types(module) | 110 ns3_module_mobility__local.register_types(module) |
110 ···· | 111 ···· |
111 root_module.end_section('ns3_module_mobility') | 112 root_module.end_section('ns3_module_mobility') |
| 113 root_module.begin_section('ns3_module_mpi') |
| 114 ns3_module_mpi.register_types(module) |
| 115 ···· |
| 116 try: |
| 117 import ns3_module_mpi__local |
| 118 except ImportError: |
| 119 pass |
| 120 else: |
| 121 ns3_module_mpi__local.register_types(module) |
| 122 ···· |
| 123 root_module.end_section('ns3_module_mpi') |
112 root_module.begin_section('ns3_module_contrib') | 124 root_module.begin_section('ns3_module_contrib') |
113 ns3_module_contrib.register_types(module) | 125 ns3_module_contrib.register_types(module) |
114 ···· | 126 ···· |
115 try: | 127 try: |
116 import ns3_module_contrib__local | 128 import ns3_module_contrib__local |
117 except ImportError: | 129 except ImportError: |
118 pass | 130 pass |
119 else: | 131 else: |
120 ns3_module_contrib__local.register_types(module) | 132 ns3_module_contrib__local.register_types(module) |
121 ···· | 133 ···· |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 ns3_module_mobility.register_methods(root_module) | 577 ns3_module_mobility.register_methods(root_module) |
566 ···· | 578 ···· |
567 try: | 579 try: |
568 import ns3_module_mobility__local | 580 import ns3_module_mobility__local |
569 except ImportError: | 581 except ImportError: |
570 pass | 582 pass |
571 else: | 583 else: |
572 ns3_module_mobility__local.register_methods(root_module) | 584 ns3_module_mobility__local.register_methods(root_module) |
573 ···· | 585 ···· |
574 root_module.end_section('ns3_module_mobility') | 586 root_module.end_section('ns3_module_mobility') |
| 587 root_module.begin_section('ns3_module_mpi') |
| 588 ns3_module_mpi.register_methods(root_module) |
| 589 ···· |
| 590 try: |
| 591 import ns3_module_mpi__local |
| 592 except ImportError: |
| 593 pass |
| 594 else: |
| 595 ns3_module_mpi__local.register_methods(root_module) |
| 596 ···· |
| 597 root_module.end_section('ns3_module_mpi') |
575 root_module.begin_section('ns3_module_contrib') | 598 root_module.begin_section('ns3_module_contrib') |
576 ns3_module_contrib.register_methods(root_module) | 599 ns3_module_contrib.register_methods(root_module) |
577 ···· | 600 ···· |
578 try: | 601 try: |
579 import ns3_module_contrib__local | 602 import ns3_module_contrib__local |
580 except ImportError: | 603 except ImportError: |
581 pass | 604 pass |
582 else: | 605 else: |
583 ns3_module_contrib__local.register_methods(root_module) | 606 ns3_module_contrib__local.register_methods(root_module) |
584 ···· | 607 ···· |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 ns3_module_mobility.register_functions(root_module) | 966 ns3_module_mobility.register_functions(root_module) |
944 ···· | 967 ···· |
945 try: | 968 try: |
946 import ns3_module_mobility__local | 969 import ns3_module_mobility__local |
947 except ImportError: | 970 except ImportError: |
948 pass | 971 pass |
949 else: | 972 else: |
950 ns3_module_mobility__local.register_functions(root_module) | 973 ns3_module_mobility__local.register_functions(root_module) |
951 ···· | 974 ···· |
952 root_module.end_section('ns3_module_mobility') | 975 root_module.end_section('ns3_module_mobility') |
| 976 root_module.begin_section('ns3_module_mpi') |
| 977 ns3_module_mpi.register_functions(root_module) |
| 978 ···· |
| 979 try: |
| 980 import ns3_module_mpi__local |
| 981 except ImportError: |
| 982 pass |
| 983 else: |
| 984 ns3_module_mpi__local.register_functions(root_module) |
| 985 ···· |
| 986 root_module.end_section('ns3_module_mpi') |
953 root_module.begin_section('ns3_module_contrib') | 987 root_module.begin_section('ns3_module_contrib') |
954 ns3_module_contrib.register_functions(root_module) | 988 ns3_module_contrib.register_functions(root_module) |
955 ···· | 989 ···· |
956 try: | 990 try: |
957 import ns3_module_contrib__local | 991 import ns3_module_contrib__local |
958 except ImportError: | 992 except ImportError: |
959 pass | 993 pass |
960 else: | 994 else: |
961 ns3_module_contrib__local.register_functions(root_module) | 995 ns3_module_contrib__local.register_functions(root_module) |
962 ···· | 996 ···· |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1307 out = FileCodeSink(sys.stdout) | 1341 out = FileCodeSink(sys.stdout) |
1308 root_module = module_init() | 1342 root_module = module_init() |
1309 register_types(root_module) | 1343 register_types(root_module) |
1310 register_methods(root_module) | 1344 register_methods(root_module) |
1311 register_functions(root_module) | 1345 register_functions(root_module) |
1312 root_module.generate(out) | 1346 root_module.generate(out) |
1313 | 1347 |
1314 if __name__ == '__main__': | 1348 if __name__ == '__main__': |
1315 main() | 1349 main() |
1316 | 1350 |
OLD | NEW |