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

osg::OperationThread::OperationThread (  ) 

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


Member Function Documentation

void osg::OperationThread::setParent ( Object parent  )  [inline]

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

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

void osg::OperationThread::setOperationQueue ( OperationQueue opq  ) 

Set the OperationQueue.

OperationQueue* osg::OperationThread::getOperationQueue (  )  [inline]

Get the OperationQueue.

const OperationQueue* osg::OperationThread::getOperationQueue (  )  const [inline]

Get the const OperationQueue.

void osg::OperationThread::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 osg::OperationThread::remove ( Operation operation  ) 

Remove operation from OperationQueue.

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

Remove named operation from OperationQueue.

void osg::OperationThread::removeAllOperations (  ) 

Remove all operations from OperationQueue.

osg::ref_ptr<Operation> osg::OperationThread::getCurrentOperation (  )  [inline]

Get the operation currently being run.

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

Run does the opertion thread run loop.

Reimplemented in osg::GraphicsThread.

void osg::OperationThread::setDone ( bool  done  ) 

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

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

Cancel this graphics thread.


Member Data Documentation

observer_ptr<Object> osg::OperationThread::_parent [protected]

bool osg::OperationThread::_done [protected]

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

osg::ref_ptr<OperationQueue> osg::OperationThread::_operationQueue [protected]

osg::ref_ptr<Operation> osg::OperationThread::_currentOperation [protected]


The documentation for this class was generated from the following file:
Generated at Sun Oct 14 02:12:13 2007 for the OpenSceneGraph by doxygen 1.5.3.