CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

csRenderBufferLock< T > Class Template Reference

Helper class for convenient locking/unlocking of an iRenderBuffer. More...

#include <cstool/rbuflock.h>

List of all members.

Public Member Functions

 csRenderBufferLock (iRenderBuffer *buf, csRenderBufferLockType lock=CS_BUF_LOCK_NORMAL)
 Construct the helper.
 ~csRenderBufferLock ()
 Destruct the helper.
T * Lock ()
 Lock the renderbuffer.
void Unlock ()
 Unlock the renderbuffer.
 operator T * ()
 Retrieve a pointer to the contained data.
T & operator[] (size_t n)
 Retrieve an item in the render buffer.
T & Get (size_t n)
 Retrieve an item in the render buffer.


Detailed Description

template<class T>
class csRenderBufferLock< T >

Helper class for convenient locking/unlocking of an iRenderBuffer.

The contents can be accessed either directly or array-style in typed way.

Definition at line 37 of file rbuflock.h.


Constructor & Destructor Documentation

template<class T>
csRenderBufferLock< T >::csRenderBufferLock iRenderBuffer buf,
csRenderBufferLockType  lock = CS_BUF_LOCK_NORMAL
[inline]
 

Construct the helper.

Definition at line 50 of file rbuflock.h.

template<class T>
csRenderBufferLock< T >::~csRenderBufferLock  )  [inline]
 

Destruct the helper.

Automatically unlocks the buffer if it was locked.

Definition at line 60 of file rbuflock.h.


Member Function Documentation

template<class T>
T& csRenderBufferLock< T >::Get size_t  n  )  [inline]
 

Retrieve an item in the render buffer.

Definition at line 105 of file rbuflock.h.

template<class T>
T* csRenderBufferLock< T >::Lock  )  [inline]
 

Lock the renderbuffer.

Returns a pointer to the contained data.

Remarks:
Watch the stride of the buffer.

Definition at line 69 of file rbuflock.h.

template<class T>
csRenderBufferLock< T >::operator T *  )  [inline]
 

Retrieve a pointer to the contained data.

Remarks:
Watch the stride of the buffer.

Definition at line 93 of file rbuflock.h.

template<class T>
T& csRenderBufferLock< T >::operator[] size_t  n  )  [inline]
 

Retrieve an item in the render buffer.

Definition at line 99 of file rbuflock.h.

template<class T>
void csRenderBufferLock< T >::Unlock  )  [inline]
 

Unlock the renderbuffer.

Definition at line 80 of file rbuflock.h.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.3.9.1