clan::TransferVector< Type > Class Template Reference - ClanLib SDK
Description: clan::TransferVector< Type > Class Template Reference

Public Member Functions | List of all members
clan::TransferVector< Type > Class Template Reference
clanDisplay Display

Transfer Vector. More...

`#include <transfer_vector.h>`

Inheritance diagram for clan::TransferVector< Type >:

## Public Member Functions
| TransferVector ()
| Constructs a null instance.
| TransferVector (const TransferBuffer &transfer_buffer)
| Constructs a TransferVector from an existing buffer.
| TransferVector (GraphicContext &gc, const std::vector< Type > &data, BufferUsage usage=BufferUsage::dynamic_copy)
| TransferVector (GraphicContext &gc, int size, BufferUsage usage=BufferUsage::dynamic_copy)
| Constructs a TransferVector.
| TransferVector (GraphicContext &gc, Type *data, int size, BufferUsage usage=BufferUsage::dynamic_copy)
| Constructs a TransferVector.
Type * | get_data ()
| Retrieves a pointer to the mapped buffer.
Type & | operator[] (int index)
Type & | operator[] (unsigned int index)
void | upload_data (GraphicContext &gc, int offset, const std::vector< Type > &data)
| Uploads data to transfer buffer.
void | upload_data (GraphicContext &gc, int offset, const Type *data, int size)
| Uploads data to transfer buffer.
Public Member Functions inherited from clan::TransferBuffer
| 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

template<typename Type>
class clan::TransferVector< Type >

Transfer Vector.

## Constructor & Destructor Documentation

## ◆ TransferVector() [1/5]

template<typename Type >

clan::TransferVector< Type >::TransferVector | ( |  | ) |
| inline

Constructs a null instance.

## ◆ TransferVector() [2/5]

template<typename Type >

clan::TransferVector< Type >::TransferVector | ( | GraphicContext & | gc,
|  | int | size,
|  | BufferUsage | usage = BufferUsage::dynamic_copy )
| inline

Constructs a TransferVector.

Parameters

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

## ◆ TransferVector() [3/5]

template<typename Type >

clan::TransferVector< Type >::TransferVector | ( | GraphicContext & | gc,
|  | Type * | data,
|  | int | size,
|  | BufferUsage | usage = BufferUsage::dynamic_copy )
| inline

Constructs a TransferVector.

Parameters

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

## ◆ TransferVector() [4/5]

template<typename Type >

clan::TransferVector< Type >::TransferVector | ( | GraphicContext & | gc,
|  | const std::vector< Type > & | data,
|  | BufferUsage | usage = BufferUsage::dynamic_copy )
| inline

## ◆ TransferVector() [5/5]

template<typename Type >

clan::TransferVector< Type >::TransferVector | ( | const TransferBuffer & | transfer_buffer | ) |
| inlineexplicit

Constructs a TransferVector from an existing buffer.

## Member Function Documentation

## ◆ get_data()

template<typename Type >

Type * clan::TransferVector< Type >::get_data | ( |  | ) |
| inline

Retrieves a pointer to the mapped buffer.

References clan::TransferBuffer::get_data().

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

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

template<typename Type >

Type & clan::TransferVector< Type >::operator[] | ( | int | index | ) |
| inline

References clan::TransferVector< Type >::get_data().

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

template<typename Type >

Type & clan::TransferVector< Type >::operator[] | ( | unsigned int | index | ) |
| inline

References clan::TransferVector< Type >::get_data().

## ◆ upload_data() [1/2]

template<typename Type >

void clan::TransferVector< Type >::upload_data | ( | GraphicContext & | gc,
|  | int | offset,
|  | const std::vector< Type > & | data )
| inline

Uploads data to transfer buffer.

References clan::TransferBuffer::upload_data().

## ◆ upload_data() [2/2]

template<typename Type >

void clan::TransferVector< Type >::upload_data | ( | GraphicContext & | gc,
|  | int | offset,
|  | const Type * | data,
|  | int | size )
| inline

Uploads data to transfer buffer.

References clan::TransferBuffer::upload_data().

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

- transfer_vector.h