OpenSceneGraph  3.5.1
Public Types | Public Member Functions | Public Attributes | List of all members
osgViewer::Renderer::ThreadSafeQueue Struct Reference

Public Types

typedef std::list< osgUtil::SceneView * > SceneViewList
 

Public Member Functions

 ThreadSafeQueue ()
 
 ~ThreadSafeQueue ()
 
void release ()
 Release any thread waiting on the queue, even if the queue is empty. More...
 
void reset ()
 Reset to fefault state (_isReleased = false) More...
 
osgUtil::SceneViewtakeFront ()
 Take a SceneView from the queue. More...
 
void add (osgUtil::SceneView *sv)
 Add a SceneView object to the back of the queue. More...
 

Public Attributes

OpenThreads::Mutex _mutex
 
OpenThreads::Condition _cond
 
SceneViewList _queue
 
bool _isReleased
 

Member Typedef Documentation

Constructor & Destructor Documentation

osgViewer::Renderer::ThreadSafeQueue::ThreadSafeQueue ( )
osgViewer::Renderer::ThreadSafeQueue::~ThreadSafeQueue ( )

Member Function Documentation

void osgViewer::Renderer::ThreadSafeQueue::add ( osgUtil::SceneView sv)

Add a SceneView object to the back of the queue.

void osgViewer::Renderer::ThreadSafeQueue::release ( )

Release any thread waiting on the queue, even if the queue is empty.

void osgViewer::Renderer::ThreadSafeQueue::reset ( )

Reset to fefault state (_isReleased = false)

osgUtil::SceneView* osgViewer::Renderer::ThreadSafeQueue::takeFront ( )

Take a SceneView from the queue.

Can return 0 if release() is called when the queue is empty.

Member Data Documentation

OpenThreads::Condition osgViewer::Renderer::ThreadSafeQueue::_cond
bool osgViewer::Renderer::ThreadSafeQueue::_isReleased
OpenThreads::Mutex osgViewer::Renderer::ThreadSafeQueue::_mutex
SceneViewList osgViewer::Renderer::ThreadSafeQueue::_queue

The documentation for this struct was generated from the following file:

osg logo
Generated at Wed Nov 11 2015 22:15:21 for the OpenSceneGraph by doxygen 1.8.10.