clan::TransferVector< Type > Class Template Reference

Transfer Vector. More...

#include <transfer_vector.h>

+ Inheritance diagram for clan::TransferVector< Type >:

Public Member Functions

 TransferVector ()
 Constructs a null instance. More...
 
 TransferVector (GraphicContext &gc, int size, BufferUsage usage=usage_dynamic_copy)
 Constructs a TransferVector. More...
 
 TransferVector (GraphicContext &gc, Type *data, int size, BufferUsage usage=usage_dynamic_copy)
 Constructs a TransferVector. More...
 
 TransferVector (GraphicContext &gc, const std::vector< Type > &data, BufferUsage usage=usage_dynamic_copy)
 
 TransferVector (const TransferBuffer &transfer_buffer)
 Constructs a TransferVector from an existing buffer. More...
 
Type * get_data ()
 Retrieves a pointer to the mapped buffer. More...
 
Type & operator[] (int index)
 
Type & operator[] (unsigned int index)
 
void upload_data (GraphicContext &gc, int offset, const Type *data, int size)
 Uploads data to transfer buffer. More...
 
void upload_data (GraphicContext &gc, int offset, const std::vector< Type > &data)
 Uploads data to transfer buffer. More...
 
- Public Member Functions inherited from clan::TransferBuffer
 TransferBuffer ()
 Constructs a null instance. More...
 
 TransferBuffer (GraphicContext &gc, int size, BufferUsage usage=usage_dynamic_copy)
 Constructs a transfer buffer. More...
 
 TransferBuffer (GraphicContext &gc, const void *data, int size, BufferUsage usage=usage_dynamic_copy)
 Constructs a transfer buffer. More...
 
virtual ~TransferBuffer ()
 
void * get_data ()
 Retrieves a pointer to the mapped buffer. More...
 
TransferBufferProviderget_provider () const
 Get Provider. More...
 
bool is_null () const
 Returns true if this object is invalid. More...
 
void lock (GraphicContext &gc, BufferAccess access)
 Maps buffer into system memory. More...
 
 operator bool () const
 
bool operator== (const TransferBuffer &other) const
 Handle comparison operator. More...
 
void throw_if_null () const
 Throw an exception if this object is invalid. More...
 
void unlock ()
 Unmaps buffer. More...
 
void upload_data (GraphicContext &gc, int offset, const void *data, int size)
 Uploads data to transfer buffer. More...
 

Detailed Description

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

Transfer Vector.

Constructor & Destructor Documentation

template<typename Type>
clan::TransferVector< Type >::TransferVector ( )
inline

Constructs a null instance.

template<typename Type>
clan::TransferVector< Type >::TransferVector ( GraphicContext gc,
int  size,
BufferUsage  usage = usage_dynamic_copy 
)
inline

Constructs a TransferVector.

Parameters
gc= Graphic Context
size= value
usage= Buffer Usage
template<typename Type>
clan::TransferVector< Type >::TransferVector ( GraphicContext gc,
Type *  data,
int  size,
BufferUsage  usage = usage_dynamic_copy 
)
inline

Constructs a TransferVector.

Parameters
gc= Graphic Context
data= void
size= value
usage= Buffer Usage
template<typename Type>
clan::TransferVector< Type >::TransferVector ( GraphicContext gc,
const std::vector< Type > &  data,
BufferUsage  usage = usage_dynamic_copy 
)
inline
template<typename Type>
clan::TransferVector< Type >::TransferVector ( const TransferBuffer transfer_buffer)
inlineexplicit

Constructs a TransferVector from an existing buffer.

Member Function Documentation

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[]().

template<typename Type>
Type& clan::TransferVector< Type >::operator[] ( int  index)
inline
template<typename Type>
Type& clan::TransferVector< Type >::operator[] ( unsigned int  index)
inline
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().

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().


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