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
DtObjectPublisherContainer Class Reference

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

+ Inheritance diagram for DtObjectPublisherContainer:
+ Collaboration diagram for DtObjectPublisherContainer:

Public Member Functions

 DtObjectPublisherContainer (bool parallel=true)
 
virtual ~DtObjectPublisherContainer ()
 
- Public Member Functions inherited from DtPublisherContainer< DtObjectPublisher >
 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< DtObjectPublisher >
 DtParallelExecutionContainer (bool parallel=true)
 Default to parallel execution. More...
 
virtual ~DtParallelExecutionContainer ()
 
virtual void add (DtObjectPublisher *item)
 Add a reference to the list. More...
 
virtual void remove (DtObjectPublisher *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(DtObjectPublisher::*theMethodPtr)())
 worker methods More...
 
virtual void setParallel (bool parallel)
 The 'parallel' property determines if the methods are executed in parallel or serial. More...
 
virtual bool isParallel () const
 

Additional Inherited Members

- Public Types inherited from DtParallelExecutionContainer< DtObjectPublisher >
typedef std::vector
< DtObjectPublisher * > 
PecContainerType
 
typedef PecContainerType::iterator PecIteratorType
 
- Protected Member Functions inherited from DtParallelExecutionContainer< DtObjectPublisher >
virtual void executeMethodParallel (void(DtObjectPublisher::*theMethodPtr)())
 Execute method on all contained objects in parallel using multiple threads. More...
 
virtual void executeMethodSerial (void(DtObjectPublisher::*theMethodPtr)())
 For test and debug, a convenience to execute methods serially. More...
 
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< DtObjectPublisher >
PecContainerType myExecVec
 Contains pointers to published entities. More...
 

Detailed Description

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

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

DtObjectPublisherContainer::DtObjectPublisherContainer ( bool  parallel = true)
inline
virtual DtObjectPublisherContainer::~DtObjectPublisherContainer ( )
inlinevirtual

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

Document ID: Generated on Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)