Keos::CBuffer< T > Class Template Reference

Wrapper manipulating the buffers (VB/IB/. More...

#include <KeosBuffer.h>

Inheritance diagram for Keos::CBuffer< T >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 CBuffer (IBufferBase *pBuffer=NULL)
 Default constructor.
T * Lock (ulong nOffset=0, ulong nSize=0, ulong nFlags=0)
 Lock the buffer.
void Unlock ()
 Unlock the buffer.
void Fill (const T *pData, size_t nCount)
 Fill the buffer.
void Release ()
 Destroy the buffer.
const IBufferBaseGetBuffer () const
 Return pointer on the buffer.
ulong GetCount () const
 Return the number of elements in the buffer.

Detailed Description

template<class T>
class Keos::CBuffer< T >

Wrapper manipulating the buffers (VB/IB/.

..).

Definition at line 34 of file KeosBuffer.h.


Constructor & Destructor Documentation

template<class T>
Keos::CBuffer< T >::CBuffer ( IBufferBase pBuffer = NULL  )  [inline]

Default constructor.

Parameters:
pBuffer Pointer on the intern buffer.

Definition at line 87 of file KeosBuffer.h.


Member Function Documentation

template<class T>
T * Keos::CBuffer< T >::Lock ( ulong  nOffset = 0,
ulong  nSize = 0,
ulong  nFlags = 0 
) [inline]

Lock the buffer.

Parameters:
nOffset Lock position.
nSize Number of elements to be locked.
nFlags Lock options.
Returns:
Pointer on the data locked.

Definition at line 93 of file KeosBuffer.h.

Referenced by Keos::CBuffer< T >::Fill().

template<class T>
void Keos::CBuffer< T >::Unlock (  )  [inline]

Unlock the buffer.

Definition at line 100 of file KeosBuffer.h.

Referenced by Keos::CBuffer< T >::Fill().

template<class T>
void Keos::CBuffer< T >::Fill ( const T *  pData,
size_t  nCount 
) [inline]

Fill the buffer.

Parameters:
pData Pointer on the data.
nCount Number of elements to be copied.

Definition at line 107 of file KeosBuffer.h.

References Assert, Keos::CBuffer< T >::Lock(), and Keos::CBuffer< T >::Unlock().

Referenced by Keos::IRenderSystem::CreateIndexBuffer(), and Keos::IRenderSystem::CreateVertexBuffer().

template<class T>
void Keos::CBuffer< T >::Release (  )  [inline]

Destroy the buffer.

Definition at line 118 of file KeosBuffer.h.

template<class T>
const IBufferBase * Keos::CBuffer< T >::GetBuffer (  )  const [inline]

Return pointer on the buffer.

Returns:
Pointer on the data.

Definition at line 125 of file KeosBuffer.h.

Referenced by Keos::IRenderSystem::SetIndexBuffer(), and Keos::IRenderSystem::SetVertexBuffer().

template<class T>
ulong Keos::CBuffer< T >::GetCount (  )  const [inline]

Return the number of elements in the buffer.

Returns:
Buffer size.

Definition at line 132 of file KeosBuffer.h.

Referenced by Keos::IRenderSystem::SetVertexBuffer().


The documentation for this class was generated from the following file:
Generated on Fri Mar 9 14:29:21 2007 for Keos by  doxygen 1.5.1-p1