![]() |
VR-Forces 5.0.2 Developer's Guide
|
DtSequentialExecutionContainer is implementation of DtExecutionContainer which executes methods on all contained objects sequentially in a single thread. Order of execution is guaranteed to be order-as-added.

Public Types | |
| typedef std::vector< Texec * > | SecContainerType |
| typedef SecContainerType::iterator | SecIteratorType |
Public Member Functions | |
| DtSequentialExecutionContainer () | |
| virtual | ~DtSequentialExecutionContainer () |
| virtual void | add (Texec *item) |
| virtual void | remove (Texec *item) |
| virtual void | clear () |
| virtual void | deleteAndClear () |
| virtual bool | empty () const |
| virtual bool | contains (Texec *item) |
| virtual SecIteratorType | begin () |
| virtual SecIteratorType | end () |
| virtual void | executeMethod (void(Texec::*theMethodPtr)()) |
Protected Attributes | |
| SecContainerType | myExecVec |
| typedef std::vector<Texec *> DtSequentialExecutionContainer< Texec >::SecContainerType |
| typedef SecContainerType::iterator DtSequentialExecutionContainer< Texec >::SecIteratorType |
|
inline |
Construct a new container, default to parallel execution and grain_size of 10.
|
inlinevirtual |
Virtual destructor does NOT destroy contents. Call deleteAndClear explicitly to delete contents.
|
inlinevirtual |
Add a reference to the container.
| item | the item to add to the container. |
Implements DtExecutionContainer< Texec >.
References DtSequentialExecutionContainer< Texec >::myExecVec.
|
inlinevirtual |
Remove a reference from the container.
| item | the item to remove from the container. |
Implements DtExecutionContainer< Texec >.
References DtSequentialExecutionContainer< Texec >::myExecVec.
|
inlinevirtual |
Clear the container.
Implements DtExecutionContainer< Texec >.
References DtSequentialExecutionContainer< Texec >::myExecVec.
|
inlinevirtual |
Delete all referenced objects and then clear the container. Items are deleted sequentially, not in parallel, so item's destructor isn't required to be thread safe.
Implements DtExecutionContainer< Texec >.
|
inlinevirtual |
Check if container is empty.
References DtSequentialExecutionContainer< Texec >::myExecVec.
|
inlinevirtual |
Check if container contains item.
| item | the item to check. |
References DtSequentialExecutionContainer< Texec >::begin(), and DtSequentialExecutionContainer< Texec >::end().
|
inlinevirtual |
Note: linux toolchain doesn't support const_iterator. :( Begin iterator over the container.
References DtSequentialExecutionContainer< Texec >::myExecVec.
Referenced by DtSequentialExecutionContainer< Texec >::contains().
|
inlinevirtual |
End iterator over the container.
References DtSequentialExecutionContainer< Texec >::myExecVec.
Referenced by DtSequentialExecutionContainer< Texec >::contains().
|
inlinevirtual |
Execute method on all contained objects sequentially in a single thread.
| theMethodPtr | the method to execute. |
Implements DtExecutionContainer< Texec >.
|
protected |
The execution container.
Referenced by DtSequentialExecutionContainer< Texec >::add(), DtSequentialExecutionContainer< Texec >::begin(), DtSequentialExecutionContainer< Texec >::clear(), DtSequentialExecutionContainer< Texec >::empty(), DtSequentialExecutionContainer< Texec >::end(), and DtSequentialExecutionContainer< Texec >::remove().