OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
osg::OperationThread Class Reference

#include <OperationThread.h>

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

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
 
OpenThreads::Atomic _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.

Definition at line 157 of file OperationThread.h.

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.

Definition at line 194 of file OperationThread.h.

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

Definition at line 201 of file OperationThread.h.

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

Get the OperationQueue.

Definition at line 173 of file OperationThread.h.

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

Get the const OperationQueue.

Definition at line 176 of file OperationThread.h.

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

Definition at line 164 of file OperationThread.h.

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

Definition at line 166 of file OperationThread.h.

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

Definition at line 162 of file OperationThread.h.

Member Data Documentation

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

Definition at line 216 of file OperationThread.h.

OpenThreads::Atomic osg::OperationThread::_done
protected

Definition at line 212 of file OperationThread.h.

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

Definition at line 215 of file OperationThread.h.

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

Definition at line 210 of file OperationThread.h.

OpenThreads::Mutex osg::OperationThread::_threadMutex
protected

Definition at line 214 of file OperationThread.h.


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