Public Member Functions | Protected Member Functions | Protected Attributes

osg::OperationThread Class Reference

Inheritance diagram for osg::OperationThread:
osg::Referenced OpenThreads::Thread osg::GraphicsThread

List of all members.

Public Member Functions

 OperationThread ()
void setParent (Object *parent)
ObjectgetParent ()
const ObjectgetParent () const
void setOperationQueue (OperationQueue *opq)
OperationQueuegetOperationQueue ()
const OperationQueuegetOperationQueue () const
void add (Operation *operation)
void remove (Operation *operation)
void remove (const std::string &name)
void removeAllOperations ()
osg::ref_ptr< OperationgetCurrentOperation ()
virtual void run ()
void setDone (bool done)
bool getDone () const
virtual int cancel ()

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::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.

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

Cancel this graphics thread.

Reimplemented from OpenThreads::Thread.

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

Get the operation currently being run.

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

Get the const OperationQueue.

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

Get the OperationQueue.

Object* osg::OperationThread::getParent (  )  [inline]
const Object* osg::OperationThread::getParent (  )  const [inline]
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.

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

Run does the opertion thread run loop.

Implements OpenThreads::Thread.

Reimplemented in osg::GraphicsThread.

void osg::OperationThread::setDone ( bool  done  ) 
void osg::OperationThread::setOperationQueue ( OperationQueue opq  ) 

Set the OperationQueue.

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

Member Data Documentation

bool osg::OperationThread::_done [protected]

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