C# Класс 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
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Описание методов

BytesLeft() публичный Метод

public BytesLeft ( ) : int
Результат int

Done() публичный Метод

public Done ( ) : void
Результат void

GetNext() публичный Метод

public GetNext ( ) : byte
Результат byte

HasNext() публичный Метод

public HasNext ( ) : bool
Результат bool

Prepare() публичный Метод

public Prepare ( byte* data, int start, int length ) : void
data byte*
start int
length int
Результат void

Putback() публичный Метод

Puts back code and the remainder of the buffer
public Putback ( byte code ) : void
code byte
Результат void

Reset() публичный Метод

public Reset ( ) : void
Результат void