bindings/python/my_extra_api_definitions.py
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Sat, 04 Jul 2009 08:15:48 +0200
changeset 4654 2eaebe77d66b
permissions -rw-r--r--
Added tag ns-3.5 for changeset c975274c9707
     1 from pybindgen import Module, FileCodeSink, write_preamble, param, retval
     2 
     3 def register_types(module):
     4     module.add_class('MyClass')
     5     
     6 def register_methods(root_module):
     7     MyClass = root_module['MyClass']
     8     MyClass.add_constructor([], visibility='public')
     9     MyClass.add_constructor([param('double', 's'), param('double', 'l'), param('double', 'mean')], visibility='public')
    10 
    11 def register_functions(module):
    12     module.add_function('SomeFunction', 'int', [param('int', 'xpto')])
    13