![]() |
MAK RTIspy API Documentation for HLA 1516
|
Very simple wrapper that provides thread-safe access to a basic queue pointers. More...
Inheritance diagram for DtThreadSafeQueue< T >:
Collaboration diagram for DtThreadSafeQueue< T >:Public Member Functions | |
| DtThreadSafeQueue () | |
| Ctor. | |
| virtual | ~DtThreadSafeQueue () |
| Dtor. | |
| virtual void | push_back (std::auto_ptr< T > elem) |
| Push an element onto the back of the queue. | |
| virtual void | push_front (std::auto_ptr< T > elem) |
| Push an element onto the front of the queue. | |
| virtual std::auto_ptr< T > | pop () |
| Pop an element from the front of the queue Returns 0 if queue is empty. | |
| virtual size_t | size () const |
Protected Attributes | |
| std::deque< T * > | myQueue |
| Data Members. | |
| MAKRti::DtMutex | myLock |
| Lock for critical section access. | |
Very simple wrapper that provides thread-safe access to a basic queue pointers.
Queue always assumes ownership of pointed to objects. This implies that when the queue is deleted all objects on the queue are deleted as well. This also implies that this queue may not be used to store arrays.
| DtThreadSafeQueue< T >::DtThreadSafeQueue | ( | ) |
Ctor.
| virtual DtThreadSafeQueue< T >::~DtThreadSafeQueue | ( | ) | [virtual] |
Dtor.
| virtual std::auto_ptr<T> DtThreadSafeQueue< T >::pop | ( | ) | [inline, virtual] |
Pop an element from the front of the queue Returns 0 if queue is empty.
Referenced by DtAsyncFileDistributorRunnable::executeCommand(), DtAsyncFileDistributorRunnable::getNextEvent(), DtAsyncFileDistributorRunnable::processInternalCommands(), and DtExtendedRtiMsgForwarder::refreshConnectionList().
| virtual void DtThreadSafeQueue< T >::push_back | ( | std::auto_ptr< T > | elem | ) | [inline, virtual] |
Push an element onto the back of the queue.
Referenced by DtAsyncFileDistributorRunnable::executeCommand(), DtAsyncFileDistributorRunnable::fedFileUploaded(), DtAsyncFileDistributorRunnable::postCommand(), DtAsyncFileDistributorRunnable::processTakeFileCmd(), DtAsyncFileDistributorRunnable::registerFedFileRequestsEvent(), DtAsyncFileDistributorRunnable::registerPushFedFileToFederatesEvent(), DtAsyncFileDistributorRunnable::registerPushFedFileToSingleFederateEvent(), DtAsyncFileDistributorRunnable::registerRequestedModulesArrivedEvent(), DtAsyncFileDistributorRunnable::registerTakeFileEvent(), DtAsyncFileDistributorRunnable::registerUploadFedFileToExecEvent(), DtAsyncFileDistributorRunnable::requestFedFileUploadToExec(), DtAsyncFileDistributorRunnable::run(), DtAsyncFileDistributorRunnable::sendFedFile(), DtAsyncFileDistributorRunnable::setOnExitHandler(), DtExtendedRtiMsgForwarder::tcpSocketAdditionCb(), and DtExtendedRtiMsgForwarder::tcpSocketRemovalCb().
| virtual void DtThreadSafeQueue< T >::push_front | ( | std::auto_ptr< T > | elem | ) | [inline, virtual] |
Push an element onto the front of the queue.
| virtual size_t DtThreadSafeQueue< T >::size | ( | ) | const [inline, virtual] |
MAKRti::DtMutex DtThreadSafeQueue< T >::myLock [mutable, protected] |
Lock for critical section access.
std::deque< T* > DtThreadSafeQueue< T >::myQueue [protected] |
Data Members.