clan::TransferBuffer Class Reference - ClanLib SDK
Description: clan::TransferBuffer Class Reference

Public Member Functions | List of all members
clan::TransferBuffer Class Reference
clanDisplay Display

Transfer Buffer. More...

`#include <transfer_buffer.h>`

Inheritance diagram for clan::TransferBuffer:

## Public Member Functions
| TransferBuffer ()
| Constructs a null instance.
| TransferBuffer (GraphicContext &gc, const void *data, int size, BufferUsage usage=BufferUsage::dynamic_copy)
| Constructs a transfer buffer.
| TransferBuffer (GraphicContext &gc, int size, BufferUsage usage=BufferUsage::dynamic_copy)
| Constructs a transfer buffer.
virtual | ~TransferBuffer ()
void * | get_data ()
| Retrieves a pointer to the mapped buffer.
TransferBufferProvider * | get_provider () const
| Get Provider.
bool | is_null () const
| Returns true if this object is invalid.
void | lock (GraphicContext &gc, BufferAccess access)
| Maps buffer into system memory.
| operator bool () const
bool | operator== (const TransferBuffer &other) const
| Handle comparison operator.
void | throw_if_null () const
| Throw an exception if this object is invalid.
void | unlock ()
| Unmaps buffer.
void | upload_data (GraphicContext &gc, int offset, const void *data, int size)
| Uploads data to transfer buffer.

## Detailed Description

Transfer Buffer.

## Constructor & Destructor Documentation

## ◆ TransferBuffer() [1/3]

clan::TransferBuffer::TransferBuffer | ( |  | ) |

Constructs a null instance.

Referenced by clan::TransferVector< Type >::TransferVector(), clan::TransferVector< Type >::TransferVector(), clan::TransferVector< Type >::TransferVector(), clan::TransferVector< Type >::TransferVector(), and operator==().

## ◆ TransferBuffer() [2/3]

clan::TransferBuffer::TransferBuffer | ( | GraphicContext & | gc,
|  | int | size,
|  | BufferUsage | usage = BufferUsage::dynamic_copy )

Constructs a transfer buffer.

Parameters

  gc | = Graphic Context
  size | = value
  usage | = Buffer Usage

References clan::dynamic_copy.

## ◆ TransferBuffer() [3/3]

clan::TransferBuffer::TransferBuffer | ( | GraphicContext & | gc,
|  | const void * | data,
|  | int | size,
|  | BufferUsage | usage = BufferUsage::dynamic_copy )

Constructs a transfer buffer.

Parameters

  gc | = Graphic Context
  data | = void
  size | = value
  usage | = Buffer Usage

References clan::dynamic_copy.

## ◆ ~TransferBuffer()

virtual clan::TransferBuffer::~TransferBuffer | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ get_data()

void * clan::TransferBuffer::get_data | ( |  | ) |

Retrieves a pointer to the mapped buffer.

Referenced by clan::TransferVector< Type >::get_data().

## ◆ get_provider()

TransferBufferProvider * clan::TransferBuffer::get_provider | ( |  | ) | const

Get Provider.

Returns
  provider

## ◆ is_null()

bool clan::TransferBuffer::is_null | ( |  | ) | const
| inline

Returns true if this object is invalid.

## ◆ lock()

void clan::TransferBuffer::lock | ( | GraphicContext & | gc,
|  | BufferAccess | access )

Maps buffer into system memory.

## ◆ operator bool()

clan::TransferBuffer::operator bool | ( |  | ) | const
| inlineexplicit

## ◆ operator==()

bool clan::TransferBuffer::operator== | ( | const TransferBuffer & | other | ) | const

Handle comparison operator.

References TransferBuffer().

## ◆ throw_if_null()

void clan::TransferBuffer::throw_if_null | ( |  | ) | const

Throw an exception if this object is invalid.

## ◆ unlock()

void clan::TransferBuffer::unlock | ( |  | ) |

Unmaps buffer.

## ◆ upload_data()

void clan::TransferBuffer::upload_data | ( | GraphicContext & | gc,
|  | int | offset,
|  | const void * | data,
|  | int | size )

Uploads data to transfer buffer.

Referenced by clan::TransferVector< Type >::upload_data(), and clan::TransferVector< Type >::upload_data().

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

- transfer_buffer.h