コード例 #1
0
ファイル: test_wrapc.py プロジェクト: skoslowski/cfficloak
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
コード例 #2
0
ファイル: test_wrapc.py プロジェクト: skoslowski/cfficloak
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'])
コード例 #3
0
ファイル: test_wrapc.py プロジェクト: skoslowski/cfficloak
class MyInt4(MyInt):
    add_array = cmethod(cfuncs['myint_add_array'], arrays=[1])
コード例 #4
0
ファイル: test_wrapc.py プロジェクト: skoslowski/cfficloak
class MyOutInt(MyInt):
    setp = cmethod(set_ptr_succ, outargs=[1])
    addp = cmethod(set_ptr_add, inoutargs=[1])
    complicated = cmethod(complicated, outargs=[1], inoutargs=[2, 4])
コード例 #5
0
ファイル: test_wrapc.py プロジェクト: skoslowski/cfficloak
class MyInt3(MyInt2):
    succ = cproperty(myint_succ2)
    doubled = cproperty(myint_doubled)
    add = cmethod(myint_add2)
    mult = cmethod(myint_mult)
コード例 #6
0
ファイル: test_wrapc.py プロジェクト: skoslowski/cfficloak
class MyInt2(MyInt1):
    doubled = cproperty(cfuncs['myint_doubled'])
    mult = cmethod(cfuncs['myint_mult'])
コード例 #7
0
ファイル: test_wrapc.py プロジェクト: skoslowski/cfficloak
class MyInt1(MyInt):
    succ = cproperty(cfuncs['myint_succ'])
    add = cmethod(cfuncs['myint_add'])
    s_add = cstaticmethod(cfuncs['myint_add'])
    null = cmethod(cfuncs['myintp_null'])