14 #ifndef OSG_OPERATIONTHREAD
15 #define OSG_OPERATIONTHREAD 1
17 #include <osg/observer_ptr>
20 #include <OpenThreads/Thread>
21 #include <OpenThreads/Barrier>
22 #include <OpenThreads/Condition>
23 #include <OpenThreads/Block>
108 unsigned int getNumOperationsInQueue();
118 void remove(
const std::string& name);
121 void removeAllOperations();
124 void runOperations(
Object* callingObject=0);
127 void releaseAllOperations();
130 void releaseOperationsBlock();
187 void remove(
const std::string& name);
190 void removeAllOperations();
199 void setDone(
bool done);
204 virtual int cancel();
OpenThreads::Mutex _threadMutex
BlockCount(unsigned int blockCount)
OpenThreads::Atomic _done
This class provides an object-oriented thread mutex interface.
osg::ref_ptr< osg::RefBlock > _operationsBlock
Operation(const Operation &op)
void setName(const std::string &name)
std::list< osg::ref_ptr< Operation > > Operations
OperationThreads _operationThreads
virtual void operator()(Object *)=0
RefBlockCount(unsigned blockCount)
void setParent(Object *parent)
This class provides an atomic increment and decrement operation.
Operation(const std::string &name, bool keep)
Operations::iterator _currentOperationIterator
const OperationThreads & getOperationThreads() const
This class provides an object-oriented thread interface.
osg::ref_ptr< OperationQueue > _operationQueue
OperationQueue * getOperationQueue()
const std::string & getName() const
OperationThread OperationsThread
const OperationQueue * getOperationQueue() const
osg::ref_ptr< Operation > _currentOperation
const Object * getParent() const
observer_ptr< Object > _parent
std::set< OperationThread * > OperationThreads
osg::ref_ptr< Operation > getCurrentOperation()
OpenThreads::Mutex _operationsMutex