Ipelib: ipe::DataSource Class Reference

Ipelib

Public Member Functions | List of all members
ipe::DataSource Class Referenceabstract
Ipe Base

`#include <ipebase.h>`

Inherited by ipe::A85Source, ipe::Base64Source, ipe::BufferSource, ipe::FileSource, ipe::InflateSource, and StandardStyleSource.

## Public Member Functions
virtual | ~DataSource ()=0
virtual int | getChar ()=0
virtual int | length () const
virtual void | setPosition (int pos)
virtual int | position () const

## Detailed Description

Interface for getting data for parsing.

## Constructor & Destructor Documentation

## ◆ ~DataSource()

DataSource::~DataSource | ( |  | ) |
| pure virtual

Pure virtual destructor.

Referenced by ipe::FileStream::tell().

## Member Function Documentation

## ◆ getChar()

virtual int ipe::DataSource::getChar | ( |  | ) |
| pure virtual

Get one more character, or EOF.

Implemented in ipe::BufferSource, ipe::FileSource, ipe::InflateSource, ipe::Base64Source, and ipe::A85Source.

Referenced by ipe::Document::Document(), ipe::A85Source::getChar(), ipe::Base64Source::getChar(), ipe::PdfParser::getTrailer(), and ipe::InflateSource::~InflateSource().

## ◆ length()

int DataSource::length | ( |  | ) | const
| virtual

Return length of input stream in characters.

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

Reimplemented in ipe::BufferSource, and ipe::FileSource.

Referenced by ipe::PdfParser::getTrailer().

## ◆ setPosition()

void DataSource::setPosition | ( | int | pos | ) |
| virtual

Set position in stream.

Does nothing if the stream is not seekable.

Reimplemented in ipe::BufferSource, and ipe::FileSource.

Referenced by ipe::PdfParser::getTrailer().

## ◆ position()

int DataSource::position | ( |  | ) | const
| virtual

Return position in stream.

Returns -1 if the stream is not seekable.

Reimplemented in ipe::BufferSource, and ipe::FileSource.

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

- ipebase.h
- ipebase.cpp