osg::OperationsThread Class Reference

GraphicsThread is a helper class for running OpenGL GraphicsOperation within a single thread assigned to a specific GraphicsContext. More...

Inheritance diagram for osg::OperationsThread:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 OperationsThread ()
void setParent (Object *parent)
ObjectgetParent ()
const ObjectgetParent () const
void add (Operation *operation, bool waitForCompletion=false)
 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 graphics thread run loop.
void setDone (bool done)
bool getDone () const
virtual int cancel ()
 Cancel this graphics thread.

Protected Types

typedef std::list< ref_ptr<
Operation > > 
OperationQueue

Protected Member Functions

virtual ~OperationsThread ()

Protected Attributes

observer_ptr< Object_parent
bool _done
OpenThreads::Mutex _operationsMutex
osg::ref_ptr< osg::RefBlock_operationsBlock
OperationQueue _operations
osg::ref_ptr< Operation_currentOperation

Detailed Description

GraphicsThread is a helper class for running OpenGL GraphicsOperation within a single thread assigned to a specific GraphicsContext.


Member Typedef Documentation

typedef std::list< ref_ptr<Operation> > osg::OperationsThread::OperationQueue [protected]


Constructor & Destructor Documentation

osg::OperationsThread::OperationsThread (  ) 

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


Member Function Documentation

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

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

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

void osg::OperationsThread::add ( Operation operation,
bool  waitForCompletion = false 
)

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::OperationsThread::remove ( Operation operation  ) 

Remove operation from OperationQueue.

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

Remove named operation from OperationQueue.

void osg::OperationsThread::removeAllOperations (  ) 

Remove all operations from OperationQueue.

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

Get the operation currently being run.

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

Run does the graphics thread run loop.

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

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

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

Cancel this graphics thread.


Member Data Documentation

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

bool osg::OperationsThread::_done [protected]

OpenThreads::Mutex osg::OperationsThread::_operationsMutex [protected]

osg::ref_ptr<osg::RefBlock> osg::OperationsThread::_operationsBlock [protected]

OperationQueue osg::OperationsThread::_operations [protected]

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


The documentation for this class was generated from the following file:
Generated at Thu Sep 27 08:36:29 2007 for the OpenSceneGraph by doxygen 1.5.2.