![]() |
Public API Reference |
Helper class for convenient locking/unlocking of an iRenderBuffer. More...
#include <cstool/rbuflock.h>
Public Member Functions | |
| csRenderBufferLock (iRenderBuffer *buf, csRenderBufferLockType lock=CS_BUF_LOCK_NORMAL) | |
| Construct the helper. | |
| T & | Get (size_t n) const |
| Retrieve an item in the render buffer. | |
| size_t | GetSize () const |
| Retrieve number of items in buffer. | |
| bool | IsValid () const |
| Returns whether the buffer is valid (ie not null). | |
| T * | Lock () const |
| Lock the renderbuffer. | |
| operator T * () const | |
| Retrieve a pointer to the contained data. | |
| T & | operator* () const |
| Get current element. | |
| PointerProxy | operator++ () |
| Set current element to the next, pre-increment version. | |
| PointerProxy | operator++ (int) |
| Set current element to the next, post-increment version. | |
| PointerProxy | operator+= (int n) |
| Add a value to the current element index. | |
| T & | operator[] (size_t n) const |
| Retrieve an item in the render buffer. | |
| ~csRenderBufferLock () | |
| Destruct the helper. | |
Helper class for convenient locking/unlocking of an iRenderBuffer.
The buffer is locked upon construction of the csRenderBufferLock<> object and unlocked on destruction.
The contents can be accessed either directly, array-style or iterator-style in a typed way.
Definition at line 44 of file rbuflock.h.
| csRenderBufferLock< T, TbufferKeeper >::csRenderBufferLock | ( | iRenderBuffer * | buf, |
| csRenderBufferLockType | lock = CS_BUF_LOCK_NORMAL |
||
| ) | [inline] |
| csRenderBufferLock< T, TbufferKeeper >::~csRenderBufferLock | ( | ) | [inline] |
| T& csRenderBufferLock< T, TbufferKeeper >::Get | ( | size_t | n | ) | const [inline] |
Retrieve an item in the render buffer.
Definition at line 197 of file rbuflock.h.
| size_t csRenderBufferLock< T, TbufferKeeper >::GetSize | ( | ) | const [inline] |
Retrieve number of items in buffer.
Definition at line 204 of file rbuflock.h.
| bool csRenderBufferLock< T, TbufferKeeper >::IsValid | ( | ) | const [inline] |
Returns whether the buffer is valid (ie not null).
Definition at line 210 of file rbuflock.h.
| T* csRenderBufferLock< T, TbufferKeeper >::Lock | ( | ) | const [inline] |
Lock the renderbuffer.
Returns a pointer to the contained data.
Definition at line 148 of file rbuflock.h.
| csRenderBufferLock< T, TbufferKeeper >::operator T * | ( | ) | const [inline] |
Retrieve a pointer to the contained data.
Definition at line 157 of file rbuflock.h.
| T& csRenderBufferLock< T, TbufferKeeper >::operator* | ( | ) | const [inline] |
Get current element.
Definition at line 163 of file rbuflock.h.
| PointerProxy csRenderBufferLock< T, TbufferKeeper >::operator++ | ( | ) | [inline] |
Set current element to the next, pre-increment version.
Definition at line 169 of file rbuflock.h.
| PointerProxy csRenderBufferLock< T, TbufferKeeper >::operator++ | ( | int | ) | [inline] |
Set current element to the next, post-increment version.
Definition at line 176 of file rbuflock.h.
| PointerProxy csRenderBufferLock< T, TbufferKeeper >::operator+= | ( | int | n | ) | [inline] |
Add a value to the current element index.
Definition at line 184 of file rbuflock.h.
| T& csRenderBufferLock< T, TbufferKeeper >::operator[] | ( | size_t | n | ) | const [inline] |
Retrieve an item in the render buffer.
Definition at line 191 of file rbuflock.h.