Exemplo n.º 1
0
class MyFloat(wrap.CObject):
    succ = cproperty(cfuncs['myfloat_succ'])
    add = cmethod(cfuncs['myfloat_add'])
    null = cmethod(cfuncs['myfloatp_null'])

    def __init__(self, f):
        self.f = f
        super(MyFloat, self).__init__()

    def __float__(self):
        return self.f
Exemplo n.º 2
0
class MyPoint(wrap.CObject):
    x = cproperty(cfuncs['point_x'], cfuncs['point_setx'])
    y = cproperty(cfuncs['point_y'], cfuncs['point_setx'])
    _cnew = cstaticmethod(cfuncs['make_point'])
    _cdel = cmethod(cfuncs['del_point'])
    dist = cmethod(cfuncs['point_dist'])
Exemplo n.º 3
0
class MyInt3(MyInt2):
    succ = cproperty(myint_succ2)
    doubled = cproperty(myint_doubled)
    add = cmethod(myint_add2)
    mult = cmethod(myint_mult)
Exemplo n.º 4
0
class MyInt2(MyInt1):
    doubled = cproperty(cfuncs['myint_doubled'])
    mult = cmethod(cfuncs['myint_mult'])
Exemplo n.º 5
0
class MyInt1(MyInt):
    succ = cproperty(cfuncs['myint_succ'])
    add = cmethod(cfuncs['myint_add'])
    s_add = cstaticmethod(cfuncs['myint_add'])
    null = cmethod(cfuncs['myintp_null'])