bindings/python/my_extra_api_definitions.py
author Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
Tue, 08 Jul 2008 10:43:58 -0700
changeset 3408 2cc40b3e4fa5
permissions -rw-r--r--
python bindings
gjc@3408
     1
from pybindgen import Module, FileCodeSink, write_preamble, param, retval
gjc@3408
     2
gjc@3408
     3
def register_types(module):
gjc@3408
     4
    module.add_class('MyClass')
gjc@3408
     5
    
gjc@3408
     6
def register_methods(root_module):
gjc@3408
     7
    MyClass = root_module['MyClass']
gjc@3408
     8
    MyClass.add_constructor([], visibility='public')
gjc@3408
     9
    MyClass.add_constructor([param('double', 's'), param('double', 'l'), param('double', 'mean')], visibility='public')
gjc@3408
    10
gjc@3408
    11
def register_functions(module):
gjc@3408
    12
    module.add_function('SomeFunction', 'int', [param('int', 'xpto')])
gjc@3408
    13