Skip to content

Latest commit

 

History

History
70 lines (40 loc) · 1.23 KB

InputStream.md

File metadata and controls

70 lines (40 loc) · 1.23 KB

InputStream

class InputStream

Inherited by: MemoryInputStream and StdStreamInputStream.

Required header: <Eclog/InputStream.h>

The InputStream abstract class represents an input stream of characters.

Member functions

Name Description
state Checks whether the stream is in good state.
eof Checks whether EOF is reached.
read Extracts characters from the stream.

state

virtual bool state() const;

Checks whether the stream is in good state; the good state does not affect by EOF.

Return value

bool true if the stream is good, false otherwise.


eof

virtual bool eof() const;

Checks whether EOF is reached.

Return value

bool true if EOF is reached, false otherwise.


read

virtual size_t read(char* buffer, size_t size);

Extracts characters from the stream and stores them into the buffer.

Parameters

char* buffer The buffer to store the characters to.

size_t size Maximum number of characters to read.

Return value

size_t The number of characters actually extracted.