C# Class XtermSharp.ReadingBuffer

Buffer for processing input
Because data might not be complete, we need to put back data that we read to process on a future read. To prepare for reading, on every call to parse, the prepare method is given the new buffer to read from. the `hasNext` describes whether there is more data left on the buffer, and `bytesLeft` returnes the number of bytes left. The `getNext` method fetches either the next value from the putback buffer, or when it is empty, it returns it from the buffer that was passed during prepare. Additionally, the terminal parser needs to reset the parser state on demand, and that is surfaced via reset
Mostrar archivo Open project: xamarin/XtermSharp

Public Methods

Method Description
BytesLeft ( ) : int
Done ( ) : void
GetNext ( ) : byte
HasNext ( ) : bool
Prepare ( byte* data, int start, int length ) : void
Putback ( byte code ) : void

Puts back code and the remainder of the buffer

Reset ( ) : void

Method Details

BytesLeft() public method

public BytesLeft ( ) : int
return int

Done() public method

public Done ( ) : void
return void

GetNext() public method

public GetNext ( ) : byte
return byte

HasNext() public method

public HasNext ( ) : bool
return bool

Prepare() public method

public Prepare ( byte* data, int start, int length ) : void
data byte*
start int
length int
return void

Putback() public method

Puts back code and the remainder of the buffer
public Putback ( byte code ) : void
code byte
return void

Reset() public method

public Reset ( ) : void
return void