Ipelib: ipe::Buffer Class Reference

Ipelib

Public Member Functions | List of all members
ipe::Buffer Class Reference
Ipe Base

`#include <ipebase.h>`

## Public Member Functions
| Buffer ()=default
| Buffer (int size)
| Buffer (const char *data, int size)
char & | operator[] (int index) noexcept
const char & | operator[] (int index) const noexcept
int | size () const noexcept
char * | data () noexcept
const char * | data () const noexcept

## Detailed Description

A memory buffer.

Can be be copied in constant time, the actual data is shared.

## Constructor & Destructor Documentation

## ◆ Buffer() [1/3]

ipe::Buffer::Buffer | ( |  | ) |
| explicitdefault

Referenced by ipe::Lex::skipWhitespace().

## ◆ Buffer() [2/3]

Buffer::Buffer | ( | int | size | ) |
| explicit

Create buffer of specified size.

## ◆ Buffer() [3/3]

Buffer::Buffer | ( | const char * | data,
|  | int | size
| ) |  |
| explicit

Create buffer by copying the data.

References ipe::String::size().

## Member Function Documentation

## ◆ operator[]() [1/2]

char& ipe::Buffer::operator[] | ( | int | index | ) |
| inlinenoexcept

Character access.

## ◆ operator[]() [2/2]

const char& ipe::Buffer::operator[] | ( | int | index | ) | const
| inlinenoexcept

Character access (const version).

## ◆ size()

int ipe::Buffer::size | ( |  | ) | const
| inlinenoexcept

Return size of buffer;.

Referenced by ipe::Bitmap::Bitmap(), ipe::DeflateStream::close(), ipe::CairoPainter::doDrawBitmap(), ipe::Bitmap::embed(), ipe::Face::Face(), ipe::Document::formatFromFilename(), ipe::InflateSource::getChar(), ipe::BufferSource::getChar(), ipe::Face::glyphIndex(), ipe::ipeDebugBuffer(), ipe::BufferSource::length(), ipe::DeflateStream::putChar(), ipe::PdfDict::write(), ipe::InflateSource::~InflateSource(), and ipe::PdfWriter::~PdfWriter().

## ◆ data() [1/2]

char* ipe::Buffer::data | ( |  | ) |
| inlinenoexcept

Return pointer to buffer data.

Referenced by ipe::Bitmap::Bitmap(), ipe::DeflateStream::close(), ipe::DeflateStream::deflate(), ipe::CairoPainter::doDrawBitmap(), ipe::Bitmap::embed(), ipe::Face::Face(), ipe::PageSelector::fill(), ipe::InflateSource::getChar(), ipe::PdfParser::getTrailer(), ipe::Face::glyphIndex(), ipe::InflateSource::InflateSource(), ipe::DeflateStream::putChar(), ipe::Bitmap::readPNG(), ipe::Thumbnail::render(), ipe::PdfThumbnail::render(), ipe::Bitmap::savePixels(), ipe::InflateSource::~InflateSource(), and ipe::PdfWriter::~PdfWriter().

## ◆ data() [2/2]

const char* ipe::Buffer::data | ( |  | ) | const
| inlinenoexcept

Return pointer to buffer data (const version).

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

- ipebase.h
- ipebase.cpp