VR-Link API Documentation for HLA 1.3
 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.
virtual void tick ()
 Tick (update) all objects.
- Public Member Functions inherited from DtParallelExecutionContainer< Texec >
 DtParallelExecutionContainer (bool parallel=true)
 Default to parallel execution.
virtual ~DtParallelExecutionContainer ()
virtual void add (Texec *item)
 Add a reference to the list.
virtual void remove (Texec *item)
 Remove a reference from the list.
virtual void clear ()
 Clear the list.
virtual bool empty ()
 Returns true if the container is empty.
virtual unsigned int count ()
 Returns the number of items in the container.
virtual void deleteAndClear ()
 Delete all referenced objects and then clear the list.
virtual PecIteratorType begin ()
 Iterators over the collection.
virtual PecIteratorType end ()
virtual void executeMethod (void(Texec::*theMethodPtr)())
 worker methods
virtual void setParallel (bool parallel)
 The 'parallel' property determines if the methods are executed in parallel or serial.
virtual bool isParallel () 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.
virtual void executeMethodSerial (void(Texec::*theMethodPtr)())
 For test and debug, a convenience to execute methods serially.
virtual void beginParallel ()
 executed before entering a parallel section
virtual void endParallel ()
 executed after leaving a parallel section
- Protected Attributes inherited from DtParallelExecutionContainer< Texec >
PecContainerType myExecVec
 Contains pointers to published entities.

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 Mon Jun 22 21:18:40 EDT 2020 from SVN revision 213785
Copyright © 2005-2018 MAK Technologies. All Rights Reserved (www.mak.com)