Inkscape
Vector Graphics Editor
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages Concepts
Inkscape::IO::BufferInputStream Class Reference

This class is for reading character from a DOMString. More...

#include <bufferstream.h>

Inheritance diagram for Inkscape::IO::BufferInputStream:
Inkscape::IO::InputStream

Public Member Functions

 BufferInputStream (const std::vector< unsigned char > &sourceBuffer)
 
 ~BufferInputStream () override
 
int available () override
 Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.
 
void close () override
 Closes this input stream and releases any system resources associated with the stream.
 
int get () override
 Reads the next byte of data from the input stream.
 
- Public Member Functions inherited from Inkscape::IO::InputStream
 InputStream ()=default
 Constructor.
 
virtual ~InputStream ()=default
 Destructor.
 

Private Attributes

const std::vector< unsigned char > & buffer
 
long position
 
bool closed
 

Detailed Description

This class is for reading character from a DOMString.

Definition at line 40 of file bufferstream.h.

Constructor & Destructor Documentation

◆ BufferInputStream()

Inkscape::IO::BufferInputStream::BufferInputStream ( const std::vector< unsigned char > &  sourceBuffer)

Definition at line 37 of file bufferstream.cpp.

References closed, and position.

◆ ~BufferInputStream()

Inkscape::IO::BufferInputStream::~BufferInputStream ( )
overridedefault

Member Function Documentation

◆ available()

int Inkscape::IO::BufferInputStream::available ( )
overridevirtual

Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.

Implements Inkscape::IO::InputStream.

Definition at line 56 of file bufferstream.cpp.

References buffer, closed, and position.

◆ close()

void Inkscape::IO::BufferInputStream::close ( )
overridevirtual

Closes this input stream and releases any system resources associated with the stream.

Implements Inkscape::IO::InputStream.

Definition at line 68 of file bufferstream.cpp.

References closed.

◆ get()

int Inkscape::IO::BufferInputStream::get ( )
overridevirtual

Reads the next byte of data from the input stream.

-1 if EOF

Implements Inkscape::IO::InputStream.

Definition at line 76 of file bufferstream.cpp.

References buffer, closed, and position.

Member Data Documentation

◆ buffer

const std::vector<unsigned char>& Inkscape::IO::BufferInputStream::buffer
private

Definition at line 52 of file bufferstream.h.

Referenced by available(), and get().

◆ closed

bool Inkscape::IO::BufferInputStream::closed
private

Definition at line 54 of file bufferstream.h.

Referenced by available(), BufferInputStream(), close(), and get().

◆ position

long Inkscape::IO::BufferInputStream::position
private

Definition at line 53 of file bufferstream.h.

Referenced by available(), BufferInputStream(), and get().


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