# Cinder

# cinder::Buffer Class Reference

`#include <Buffer.h>`

List of all members.

## Classes
struct | Obj
## Public Member Functions
| Buffer ()
| Buffer (void *aBuffer, size_t aSize)
| Buffer (size_t size)
size_t | getAllocatedSize () const
size_t | getDataSize () const
void | setDataSize (size_t aSize)
void * | getData ()
const void * | getData () const
shared_ptr< uint8_t > | convertToSharedPtr ()
| Returns a shared_ptr for the data and gives up ownership of the data.
void | resize (size_t newSize)
void | copyFrom (const void *aData, size_t length)
typedef shared_ptr< Obj > Buffer::* | unspecified_bool_type
| Emulates shared_ptr-like behavior.
| operator unspecified_bool_type ()
| Emulates shared_ptr-like behavior.
void | reset ()
| Emulates shared_ptr-like behavior.

## Member Typedef Documentation

typedef shared_ptr<Obj> Buffer::* cinder::Buffer::unspecified_bool_type

Emulates shared_ptr-like behavior.

## Constructor & Destructor Documentation

cinder::Buffer::Buffer | ( |  | ) |

cinder::Buffer::Buffer | ( | void * | aBuffer,
|  | size_t | aSize |
| ) |  |  |

cinder::Buffer::Buffer | ( | size_t | size | ) |

## Member Function Documentation

size_t cinder::Buffer::getAllocatedSize | ( |  | ) | const

size_t cinder::Buffer::getDataSize | ( |  | ) | const

void cinder::Buffer::setDataSize | ( | size_t | aSize | ) |

void* cinder::Buffer::getData | ( |  | ) |

const void* cinder::Buffer::getData | ( |  | ) | const

shared_ptr< uint8_t > cinder::Buffer::convertToSharedPtr | ( |  | ) |

Returns a shared_ptr for the data and gives up ownership of the data.

void cinder::Buffer::resize | ( | size_t | newSize | ) |

void cinder::Buffer::copyFrom | ( | const void * | aData,
|  | size_t | length |
| ) |  |  |

cinder::Buffer::operator unspecified_bool_type | ( |  | ) |

Emulates shared_ptr-like behavior.

void cinder::Buffer::reset | ( |  | ) |

Emulates shared_ptr-like behavior.

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

- include/cinder/Buffer.h
- src/cinder/Buffer.cpp