CrystalSpace

Public API Reference

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

csRenderBufferLock< T > Class Template Reference

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

#include <rbuflock.h>

List of all members.

Public Methods

 csRenderBufferLock (iRenderBuffer *buf, csRenderBufferLockType lock=CS_BUF_LOCK_NORMAL)
 Construct the helper.

 ~csRenderBufferLock ()
 Destruct the helper.

T * Lock ()
 Lock the renderbuffer. Returns a pointer to the contained data.

void Unlock ()
 Unlock the renderbuffer.

 operator T * ()
 Retrieve a pointer to the contained data.

T & operator[] (int n)
 Retrieve an item in the render buffer.

T & Get (int 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 49 of file rbuflock.h.

References csRenderBufferLockType.

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

Destruct the helper.

Automatically unlocks the buffer if it was locked.

Definition at line 58 of file rbuflock.h.

References csRenderBufferLock< T >::Unlock().


Member Function Documentation

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

Retrieve an item in the render buffer.

Definition at line 97 of file rbuflock.h.

References csRenderBufferLock< T >::Lock().

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

Lock the renderbuffer. Returns a pointer to the contained data.

Definition at line 64 of file rbuflock.h.

Referenced by csRenderBufferLock< T >::Get(), csRenderBufferLock< T >::operator T *(), and csRenderBufferLock< T >::operator[]().

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

Retrieve a pointer to the contained data.

Definition at line 85 of file rbuflock.h.

References csRenderBufferLock< T >::Lock().

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

Retrieve an item in the render buffer.

Definition at line 91 of file rbuflock.h.

References csRenderBufferLock< T >::Lock().

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

Unlock the renderbuffer.

Definition at line 75 of file rbuflock.h.

Referenced by csRenderBufferLock< T >::~csRenderBufferLock().


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