Ipelib
Public Member Functions | List of all members
ipe::BufferSource Class Reference

#include <ipebase.h>

Inherits ipe::DataSource.

Public Member Functions

 BufferSource (const Buffer &buffer)
 
virtual int getChar () override
 
virtual int length () const override
 
virtual void setPosition (int pos) override
 
virtual int position () const override
 
- Public Member Functions inherited from ipe::DataSource
virtual ~DataSource ()=0
 

Detailed Description

Data source for parsing from a buffer.

Constructor & Destructor Documentation

◆ BufferSource()

BufferSource::BufferSource ( const Buffer buffer)

Member Function Documentation

◆ getChar()

int BufferSource::getChar ( )
overridevirtual

Get one more character, or EOF.

Implements ipe::DataSource.

References ipe::Buffer::size().

◆ length()

int BufferSource::length ( ) const
overridevirtual

Return length of input stream in characters.

Returns -1 if the stream is not seekable. Calling this function will invalidate the current position.

Reimplemented from ipe::DataSource.

References ipe::Buffer::size().

◆ setPosition()

void BufferSource::setPosition ( int  pos)
overridevirtual

Set position in stream.

Does nothing if the stream is not seekable.

Reimplemented from ipe::DataSource.

◆ position()

int BufferSource::position ( ) const
overridevirtual

Return position in stream.

Returns -1 if the stream is not seekable.

Reimplemented from ipe::DataSource.


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