Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::IO::StdInputStream Class Reference

Convenience class for reading from standard input. More...

#include <inkscapestream.h>

Inheritance diagram for Inkscape::IO::StdInputStream:
Inkscape::IO::InputStream

Public Member Functions

int available () override
 Return the number of bytes that are currently available to be read.
 
void close () override
 Do whatever it takes to 'close' this input stream The most likely implementation of this method will be for endpoints that use a resource for their data.
 
int get () override
 Read one byte from this input stream.
 
- Public Member Functions inherited from Inkscape::IO::InputStream
 InputStream ()=default
 Constructor.
 
virtual ~InputStream ()=default
 Destructor.
 

Detailed Description

Convenience class for reading from standard input.

Definition at line 132 of file inkscapestream.h.

Member Function Documentation

◆ available()

int Inkscape::IO::StdInputStream::available ( )
inlineoverridevirtual

Return the number of bytes that are currently available to be read.

Implements Inkscape::IO::InputStream.

Definition at line 136 of file inkscapestream.h.

◆ close()

void Inkscape::IO::StdInputStream::close ( )
inlineoverridevirtual

Do whatever it takes to 'close' this input stream The most likely implementation of this method will be for endpoints that use a resource for their data.

Implements Inkscape::IO::InputStream.

Definition at line 139 of file inkscapestream.h.

◆ get()

int Inkscape::IO::StdInputStream::get ( )
inlineoverridevirtual

Read one byte from this input stream.

This is a blocking call. If no data is currently available, this call will not return until it exists. If the user does not want their code to block, then the usual solution is: if (available() > 0) myChar = get(); This call returns -1 on end-of-file.

Implements Inkscape::IO::InputStream.

Definition at line 142 of file inkscapestream.h.


The documentation for this class was generated from the following file: