Ejemplo n.º 1
0
    def __init__(self, stream, description=None):
        """
        Parser constructor

        @param stream: Data input stream (see L{InputStream})
        @param description: (optional) String description
        """
        # Check arguments
        assert hasattr(self, "endian") \
            and self.endian in (BIG_ENDIAN, LITTLE_ENDIAN)

        # Call parent constructor
        GenericFieldSet.__init__(self, None, "root", stream, description, stream.askSize(self))
Ejemplo n.º 2
0
    def __init__(self, stream, description=None):
        """
        Parser constructor

        @param stream: Data input stream (see L{InputStream})
        @param description: (optional) String description
        """
        # Check arguments
        assert hasattr(self, "endian") \
            and self.endian in (BIG_ENDIAN, LITTLE_ENDIAN)

        # Call parent constructor
        GenericFieldSet.__init__(self, None, "root", stream, description, stream.askSize(self))
 def __init__(self, parent, name, *args, **kw):
     assert issubclass(parent.__class__, BasicFieldSet)
     GenericFieldSet.__init__(self, parent, name, parent.stream, *args,
                              **kw)
Ejemplo n.º 4
0
 def __init__(self, parent, name, *args, **kw):
     assert issubclass(parent.__class__, BasicFieldSet)
     GenericFieldSet.__init__(self, parent, name, parent.stream, *args, **kw)