VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
scenarioEventController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
12 
15 {
16 private:
17  //Not Implemented.
19  //Not Implemented.
21  //Not Implemented.
23 
24 public:
25 
26  //\copydoc DtSimComponent(const DtString&,DtLocalObject*,DtSimulationServices*,
27  //DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)
29  DtLocalObject* owner,
30  DtSimulationServices* simManager,
31  DtComponentDescriptor* desc = NULL,
32  DtReaderWriterRegistry* parentRegistry = NULL);
33 
34  virtual ~DtScenarioEventController();
35 
36  //\copydoc DtSimComponent::type()
37  //\return DtScriptedMovementControllerType.
38  virtual const char* type() const;
39 
40  //Main processing for component.
41  virtual void tick();
42 
43 public:
44 
45  //\copydoc DtSimComponent(const DtString&,DtLocalObject*,DtSimulationServices*,
46  //DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)
47  //\return New instance of this class.
48  static DtSimComponent * creator(const DtString& name,
49  DtLocalObject* owner,
50  DtSimulationServices* simManager,
51  DtComponentDescriptor* desc = 0,
52  DtReaderWriterRegistry* parentRegistry = 0);
53 
54 protected:
55  virtual void preFirstTickInit();
56  virtual void setupEventIfNeeded();
57 
59  virtual bool timeToStartFromTimeOfDay() const;
60 
62  virtual bool timeToStartFromScenarioTime() const;
63 
68  virtual bool timeToEndFromTimeOfDay() const;
69 
74  virtual bool timeToEndFromScenarioTime() const;
75 
79  virtual bool allLinkConditionsMet(bool& allConditionsMet) const;
80 
81 
83  static void enabledStateChangeCallback(DtEnableStateChanged, void*);
84  virtual void processEnableStateChanged(DtEnableStateChanged);
85 
86 protected:
89 
90  mutable bool myWaitForNextStartDay;
91  mutable bool myWaitForNextEndDay;
92 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:22
bool myWaitForNextEndDay
Definition: scenarioEventController.h:91
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Definition: readerWriterRegistry.h:39
Definition: scenarioEventManager.h:27
DtRwScenarioEvent myEvent
Definition: scenarioEventController.h:87
DtString myScenarioEventXmlRep
Definition: scenarioEventController.h:88
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
This controller will determine if an event is ready to start/stop.
Definition: scenarioEventController.h:14
The DtRwScenarioEvent class will define the contents of a scenario event and it's current status...
Definition: rwScenarioEvent.h:68
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:95
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
bool myWaitForNextStartDay
Definition: scenarioEventController.h:90
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)