openscenegraph
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
osg::OperationThread Class Reference
Inheritance diagram for osg::OperationThread:
osg::Referenced OpenThreads::Thread osg::GraphicsThread

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 ()
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 Referenced (bool threadSafeRefUnref)
 Referenced (const Referenced &)
Referencedoperator= (const Referenced &)
virtual void setThreadSafeRefUnref (bool threadSafe)
bool getThreadSafeRefUnref () const
OpenThreads::MutexgetRefMutex () const
int ref () const
int unref () const
int unref_nodelete () const
int referenceCount () const
ObserverSetgetObserverSet () const
ObserverSetgetOrCreateObserverSet () const
void addObserver (Observer *observer) const
void removeObserver (Observer *observer) const
- Public Member Functions inherited from OpenThreads::Thread
 Thread ()
virtual ~Thread ()
int getThreadId ()
size_t getProcessId ()
int start ()
int startThread ()
int testCancel ()
int setSchedulePriority (ThreadPriority priority)
int getSchedulePriority ()
int setSchedulePolicy (ThreadPolicy policy)
int getSchedulePolicy ()
int setStackSize (size_t size)
size_t getStackSize ()
void printSchedulingInfo ()
int detach ()
int join ()
int setCancelModeDisable ()
int setCancelModeAsynchronous ()
int setCancelModeDeferred ()
bool isRunning ()
virtual void cancelCleanup ()
void * getImplementation ()
int setProcessorAffinity (unsigned int cpunum)

Protected Member Functions

virtual ~OperationThread ()
- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
void deleteUsingDeleteHandler () const

Protected Attributes

observer_ptr< Object_parent
bool _done
OpenThreads::Mutex _threadMutex
osg::ref_ptr< OperationQueue_operationQueue
osg::ref_ptr< Operation_currentOperation
- Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
OpenThreads::Atomic _refCount

Additional Inherited Members

- Public Types inherited from OpenThreads::Thread
enum  ThreadPriority {
  THREAD_PRIORITY_MAX, THREAD_PRIORITY_HIGH, THREAD_PRIORITY_NOMINAL, THREAD_PRIORITY_LOW,
  THREAD_PRIORITY_MIN, THREAD_PRIORITY_DEFAULT
}
enum  ThreadPolicy { THREAD_SCHEDULE_FIFO, THREAD_SCHEDULE_ROUND_ROBIN, THREAD_SCHEDULE_TIME_SHARE, THREAD_SCHEDULE_DEFAULT }
- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
static void setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
static bool getThreadSafeReferenceCounting ()
static void setDeleteHandler (DeleteHandler *handler)
static DeleteHandlergetDeleteHandler ()
- Static Public Member Functions inherited from OpenThreads::Thread
static int SetConcurrency (int concurrencyLevel)
static int GetConcurrency ()
static ThreadCurrentThread ()
static void Init ()
static int YieldCurrentThread ()
static ThreadPriority GetMasterPriority ()
static int microSleep (unsigned int microsec)

Detailed Description

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

Constructor & Destructor Documentation

osg::OperationThread::OperationThread ( )
virtual osg::OperationThread::~OperationThread ( )
protectedvirtual

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
OperationQueue* osg::OperationThread::getOperationQueue ( )
inline

Get the OperationQueue.

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

Get the const 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

osg::ref_ptr<Operation> osg::OperationThread::_currentOperation
protected
bool osg::OperationThread::_done
protected
osg::ref_ptr<OperationQueue> osg::OperationThread::_operationQueue
protected
observer_ptr<Object> osg::OperationThread::_parent
protected
OpenThreads::Mutex osg::OperationThread::_threadMutex
protected

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