Beispiel #1
0
 def __init__(self, idx, default=0, **kwargs):
     CField.__init__(self, idx, default, **kwargs)
     self.add_constraint(const.ValueTypeConstraint(numbers.Integral))
     self.__ctype = kwargs.get("ctype", "int")
Beispiel #2
0
 def __init__(self, idx, subfield, default=[], length=0, **kwargs):
     CField.__init__(self, idx, default, **dict(kwargs, length=length))
     self.__subfield = subfield
Beispiel #3
0
 def __init__(self, idx, default='', length=0, **kwargs):
     CField.__init__(self, idx, default, **dict(kwargs, length=length))
Beispiel #4
0
 def __init__(self, idx, struct, default=None, **kwargs):
     CField.__init__(self, idx, default, **kwargs)
     self._struct_klass = struct