VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
DtPublisherContainer< Texec > Class Template Reference

DtPublisherContainer is an container which will execute a method on all contained objects in parallel threads. More...

+ Inheritance diagram for DtPublisherContainer< Texec >:
+ Collaboration diagram for DtPublisherContainer< Texec >:

Public Member Functions

 DtPublisherContainer (bool parallel=true)
 
virtual ~DtPublisherContainer ()
 
virtual void forceUpdate ()
 For publisher to send PDUs on next tick for all objects. More...
 
virtual void tick ()
 Tick (update) all objects. More...
 
- Public Member Functions inherited from DtParallelExecutionContainer< Texec >
 DtParallelExecutionContainer (bool parallel=true)
 Default to parallel execution. More...
 
virtual ~DtParallelExecutionContainer ()
 
virtual void add (Texec *item)
 Add a reference to the list. More...
 
virtual void remove (Texec *item)
 Remove a reference from the list. More...
 
virtual void clear ()
 Clear the list. More...
 
virtual bool empty ()
 Returns true if the container is empty. More...
 
virtual unsigned int count ()
 Returns the number of items in the container. More...
 
virtual void deleteAndClear ()
 Delete all referenced objects and then clear the list. More...
 
virtual PecIteratorType begin ()
 Iterators over the collection. More...
 
virtual PecIteratorType end ()
 
virtual void executeMethod (void(Texec::*theMethodPtr)())
 worker methods More...
 
virtual void executeMethod (bool(Texec::*theMethodPtr)())
 
virtual void setParallel (bool parallel)
 The 'parallel' property determines if the methods are executed in parallel or serial. More...
 
virtual bool isParallel () const
 
virtual void setMaxNumberThreads (int numThreads)
 Set maximum number of threads created during executeMothod calls. Default is -1, which uses as many threads as possible. More...
 
virtual int maxNumberThreads () const
 

Additional Inherited Members

- Public Types inherited from DtParallelExecutionContainer< Texec >
typedef std::vector< Texec * > PecContainerType
 
typedef PecContainerType::iterator PecIteratorType
 
- Protected Member Functions inherited from DtParallelExecutionContainer< Texec >
virtual void executeMethodParallel (void(Texec::*theMethodPtr)())
 Execute method on all contained objects in parallel using multiple threads. More...
 
virtual void executeMethodParallel (bool(Texec::*theMethodPtr)())
 
virtual void executeMethodSerial (void(Texec::*theMethodPtr)())
 For test and debug, a convenience to execute methods serially. More...
 
virtual void executeMethodSerial (bool(Texec::*theMethodPtr)())
 
virtual void beginParallel ()
 executed before entering a parallel section More...
 
virtual void endParallel ()
 executed after leaving a parallel section More...
 
- Protected Attributes inherited from DtParallelExecutionContainer< Texec >
PecContainerType myExecVec
 Contains pointers to published entities. More...
 

Detailed Description

template<class Texec>
class DtPublisherContainer< Texec >

DtPublisherContainer is an container which will execute a method on all contained objects in parallel threads.

The object is expected to be of a DtXXXPublisher type. The method must be thread safe. Note this class itself is not thread safe, but does not need to be to support parallel execution of its contents.

Constructor & Destructor Documentation

template<class Texec>
DtPublisherContainer< Texec >::DtPublisherContainer ( bool  parallel = true)
inline
template<class Texec>
virtual DtPublisherContainer< Texec >::~DtPublisherContainer ( )
inlinevirtual

Member Function Documentation

template<class Texec>
virtual void DtPublisherContainer< Texec >::forceUpdate ( )
inlinevirtual

For publisher to send PDUs on next tick for all objects.

template<class Texec>
virtual void DtPublisherContainer< Texec >::tick ( )
inlinevirtual

Tick (update) all objects.


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

Document ID: Generated on Thu Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)