Beispiel #1
0
class UserClass(CStruct):
    c_member_0 = Integer()
    c_member_1 = Integer()
    not_c_member = 2
    c_member_2 = Integer()

    def not_c_member_too(self):
        pass
Beispiel #2
0
class Package(CStruct):
    a = Integer()
    junk = Padding(4)
    b = Integer()
Beispiel #3
0
class BigEndianVector(CStruct):
    endianness = Endianness.big_endian
    x = Integer()
    y = Integer()
Beispiel #4
0
class C(B):
    c_member = Integer()
Beispiel #5
0
class B(A):
    b_member = Integer()
Beispiel #6
0
class A(CStruct):
    a_member_0 = Integer()
    a_member_1 = Integer()
Beispiel #7
0
class VectorYX(CStruct):
    ''' Demonstrates, that members order is important! '''
    y = Integer()
    x = Integer()
Beispiel #8
0
class Polygon(CStruct):
    x = Integer()
    y = Integer()
    vertexes = Double(10)
Beispiel #9
0
class Vector(CStruct):
    endianness = Endianness.little_endian
    x = Integer()
    y = Integer()