Ipelib

- Main Page
- Related Pages
- Modules
- Classes

- Class List
- Class Hierarchy
- Class Members

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

`#include <ipebase.h>`

## Public Member Functions
| Buffer () noexcept=default
| ~Buffer () noexcept
| Buffer (const Buffer &rhs) noexcept
| Buffer (Buffer &&rhs) noexcept
Buffer & | operator= (const Buffer &rhs) noexcept
Buffer & | operator= (Buffer &&rhs) noexcept
| Buffer (int size) noexcept
| Buffer (const char *data, int size) noexcept
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.

Implements sharing semantics using reference counting.

## Constructor & Destructor Documentation

ipe::Buffer::Buffer | ( |  | ) |
| default noexcept

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

Buffer::~Buffer | ( |  | ) |
| noexcept

Destructor.

Buffer::Buffer | ( | const Buffer & | rhs | ) |
| noexcept

Copy constructor. Constant time, buffer is shared.

Buffer::Buffer | ( | Buffer && | rhs | ) |
| noexcept

Move constructor. Constant time.

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

Create buffer of specified size.

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

Create buffer by copying the data.

References ipe::String::data(), and ipe::String::size().

## Member Function Documentation

Buffer & Buffer::operator= | ( | const Buffer & | rhs | ) |
| noexcept

Assignment operator (constant-time).

Buffer & Buffer::operator= | ( | Buffer && | rhs | ) |
| noexcept

Assignment move operator (constant-time).

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

Character access.

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

Character access (const version).

int ipe::Buffer::size | ( |  | ) | const
| inline noexcept

Return size of buffer;.

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

char* ipe::Buffer::data | ( |  | ) |
| inline noexcept

Return pointer to buffer data.

Referenced by ipe::Bitmap::Bitmap(), ipe::DeflateStream::close(), ipe::DeflateStream::deflate(), ipe::CairoPainter::doDrawBitmap(), ipe::Face::Face(), ipe::Document::formatFromFilename(), ipe::InflateSource::getChar(), ipe::Face::glyphIndex(), ipe::InflateSource::InflateSource(), ipe::PageSelector::PageSelector(), ipe::Bitmap::pixelData(), ipe::DeflateStream::putChar(), ipe::Bitmap::readPNG(), ipe::Thumbnail::render(), ipe::InflateSource::~InflateSource(), and ipe::PdfWriter::~PdfWriter().

const char* ipe::Buffer::data | ( |  | ) | const
| inline noexcept

Return pointer to buffer data (const version).

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

- ipebase.h
- ipebase.cpp