Ipelib: ipe::Buffer Class Reference

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>`

## Classes
struct | Imp

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

## Detailed Description

A memory buffer.

Implements sharing semantics using reference counting.

## Constructor & Destructor Documentation

Buffer::Buffer | ( |  | ) |

Create empty buffer.

Buffer::~Buffer | ( |  | ) |

Destructor.

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

Copy constructor. Constant time, buffer is shared.

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

Create buffer of specified size.

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

Create buffer by copying the data.

## Member Function Documentation

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

Assignment operator (constant-time).

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

Character access.

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

Character access (const version).

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

Return size of buffer;.

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

Return pointer to buffer data.

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

Return pointer to buffer data (const version).

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

- ipebase.h
- ipebase.cpp