VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
DtPreprocessor Class Reference

DtPreprocessor is a trait which allows a derived class to specify extra processing to be performed prior to tick(), typically in parallel. More...

Inheritance diagram for DtPreprocessor:
Inheritance graph
[legend]

Public Member Functions

virtual void preprocess ()=0
 Pre-compute costly values in advance of tick using parallel threads.

Detailed Description

DtPreprocessor is a trait which allows a derived class to specify extra processing to be performed prior to tick(), typically in parallel.

Use case 1: using preprocess in a DtSimComponent. DtSimComponent::init adds 'this' to the entity's DtSequentialPreprocessorContainer. When an entity is preprocessed, it preprocesses its DtSimComponents sequentially in a single thread. This preserves single thread semantics between DtSimComponents in the same DtVrfObject, and between DtSimComponents and anything exclusively accessed in the DtVrfObject (such as DtVrfObject member variables). Don't override ::preprocess() in a DtSimComponent descendant, instead override the ::parallelTick method. DtSimComponent::preprocess() check whether it's time to tick before calling ::parallelTick. Be careful to watch thread semantics when accessing data 'outside' the containing entity.

Use case 2: preprocess in DtVrfObject. DtVrfObjMgr adds DtVrfObjects to a DtParallelPreprocessorContainer. During DtVrfObjMgr::tick all DtVrfObjects::preprocess are called in parallel with each other.

Member Function Documentation

virtual void DtPreprocessor::preprocess ( )
pure virtual

Pre-compute costly values in advance of tick using parallel threads.

Implemented in DtVrfObject, DtSimComponent, and DtEngineeringObjectSensor.

Referenced by DtParallelPreprocessorContainer::preprocess(), and DtSequentialPreprocessorContainer::preprocess().


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

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)