Inkscape
Vector Graphics Editor
|
This interface is the base of all input stream classes. More...
#include <inkscapestream.h>
Public Member Functions | |
InputStream ()=default | |
Constructor. | |
virtual | ~InputStream ()=default |
Destructor. | |
virtual int | available ()=0 |
Return the number of bytes that are currently available to be read. | |
virtual void | close ()=0 |
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. | |
virtual int | get ()=0 |
Read one byte from this input stream. | |
This interface is the base of all input stream classes.
Users who wish to make an InputStream that is part of a chain should inherit from BasicInputStream. Inherit from this class to make a source endpoint, such as a URI or buffer.
Definition at line 52 of file inkscapestream.h.
|
default |
Constructor.
|
virtualdefault |
Destructor.
|
pure virtual |
Return the number of bytes that are currently available to be read.
Implemented in Inkscape::IO::BufferInputStream, Inkscape::IO::GzipInputStream, Inkscape::IO::BasicInputStream, Inkscape::IO::StdInputStream, Inkscape::IO::StringInputStream, Inkscape::IO::FileInputStream, and Inkscape::IO::XsltInputStream.
Referenced by Inkscape::IO::BasicInputStream::available(), Inkscape::IO::InputStreamReader::available(), and Inkscape::IO::StdReader::available().
|
pure virtual |
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.
Implemented in Inkscape::IO::BufferInputStream, Inkscape::IO::GzipInputStream, Inkscape::IO::BasicInputStream, Inkscape::IO::StdInputStream, Inkscape::IO::StringInputStream, Inkscape::IO::FileInputStream, and Inkscape::IO::XsltInputStream.
Referenced by Inkscape::IO::BasicInputStream::close(), Inkscape::IO::InputStreamReader::close(), and Inkscape::IO::StdReader::close().
|
pure virtual |
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.
Implemented in Inkscape::IO::BufferInputStream, Inkscape::IO::GzipInputStream, Inkscape::IO::BasicInputStream, Inkscape::IO::StdInputStream, Inkscape::IO::StringInputStream, Inkscape::IO::FileInputStream, and Inkscape::IO::XsltInputStream.
Referenced by Inkscape::IO::BasicInputStream::get(), Inkscape::IO::InputStreamReader::get(), Inkscape::IO::StdReader::get(), Inkscape::IO::GzipInputStream::load(), and Inkscape::IO::pipeStream().