fw4spl
|
base class for BufferObject Lock More...
#include <BufferObject.hpp>
Public Types | |
typedef ::boost::conditional< std::is_const< T >::value, const void *, void * >::type | BufferType |
Public Member Functions | |
LockBase () | |
Build an empty lock. | |
LockBase (const std::shared_ptr< T > &bo) | |
Build a lock on object 'bo'. More... | |
LockBase< T >::BufferType | getBuffer () const |
Returns BufferObject's buffer pointer. | |
void | reset () |
Release any count on any Buffer the lock may have. | |
Protected Attributes | |
BufferObject::CounterType | m_count |
std::weak_ptr< T > | m_bufferObject |
base class for BufferObject Lock
This class purpose is to provide a way to count buffer uses, to prevent BufferManager changes on buffer if nb uses > 0
The count is shared with the associated BufferObject. Be aware that this mechanism is actually not thread-safe.
Definition at line 88 of file BufferObject.hpp.
|
inline |
Build a lock on object 'bo'.
Increments BufferObject's lock counts.
bo | BufferObject to lock |
Definition at line 108 of file BufferObject.hpp.
References SLM_ASSERT.