OpenSceneGraph  3.0.1
Public Member Functions | Protected Member Functions | Protected Attributes
osg::OperationThread Class Reference

OperationThread is a helper class for running Operation within a single thread. More...

Inheritance diagram for osg::OperationThread:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 OperationThread ()
void setParent (Object *parent)
ObjectgetParent ()
const ObjectgetParent () const
void setOperationQueue (OperationQueue *opq)
 Set the OperationQueue.
OperationQueuegetOperationQueue ()
 Get the OperationQueue.
const OperationQueuegetOperationQueue () const
 Get the const OperationQueue.
void add (Operation *operation)
 Add operation to end of OperationQueue, this will be executed by the graphics thread once this operation gets to the head of the queue.
void remove (Operation *operation)
 Remove operation from OperationQueue.
void remove (const std::string &name)
 Remove named operation from OperationQueue.
void removeAllOperations ()
 Remove all operations from OperationQueue.
osg::ref_ptr< OperationgetCurrentOperation ()
 Get the operation currently being run.
virtual void run ()
 Run does the opertion thread run loop.
void setDone (bool done)
bool getDone () const
virtual int cancel ()
 Cancel this graphics thread.

Protected Member Functions

virtual ~OperationThread ()

Protected Attributes

observer_ptr< Object_parent
bool _done
OpenThreads::Mutex _threadMutex
osg::ref_ptr< OperationQueue_operationQueue
osg::ref_ptr< Operation_currentOperation

Detailed Description

OperationThread is a helper class for running Operation within a single thread.


Constructor & Destructor Documentation

virtual osg::OperationThread::~OperationThread ( ) [protected, virtual]

Member Function Documentation

Add operation to end of OperationQueue, this will be executed by the graphics thread once this operation gets to the head of the queue.

virtual int osg::OperationThread::cancel ( ) [virtual]

Cancel this graphics thread.

Get the operation currently being run.

bool osg::OperationThread::getDone ( ) const [inline]

Get the OperationQueue.

Get the const OperationQueue.

const Object* osg::OperationThread::getParent ( ) const [inline]

Remove operation from OperationQueue.

void osg::OperationThread::remove ( const std::string &  name)

Remove named operation from OperationQueue.

Remove all operations from OperationQueue.

virtual void osg::OperationThread::run ( ) [virtual]

Run does the opertion thread run loop.

Reimplemented in osg::GraphicsThread.

Set the OperationQueue.


Member Data Documentation

bool osg::OperationThread::_done [protected]
OpenThreads::Mutex osg::OperationThread::_threadMutex [protected]

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

osg logo
Generated at Sun May 6 2012 20:07:47 for the OpenSceneGraph by doxygen 1.8.0.