VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
waitController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1999 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
15 #include "vrfutil/simClock.h"
16 
17 class DtString;
18 class DtSimManager;
19 class DtTaskMessage;
20 class DtSimMessage;
21 class DtWaitingPSR;
22 
33 {
34 public:
35 
38  DtWaitController(const DtString& name,
39  DtVrfObject* owner,
40  DtSimManager* simManager,
41  DtComponentDescriptor* desc = 0,
42  DtReaderWriterRegistry* parentRegistry = 0);
43 
45  virtual ~DtWaitController();
46 
49  virtual const char* type() const;
50 
52  virtual bool init();
53 
62  virtual void tick();
63 
65  virtual void enable();
66  virtual void registerTaskMsgCallbacks();
67 
69  virtual void disable();
70 
71  static void waitCallback(DtSimMessage* msg, void* usr, DtSimTaskStatePtr taskStatePtr);
72 
74  virtual DtSimTaskStatePtr currentTaskState() const;
75 
79  static DtSimComponent * creator(const DtString& name,
80  DtVrfObject* owner,
81  DtSimManager* simManager,
82  DtComponentDescriptor* desc = 0,
83  DtReaderWriterRegistry* parentRegistry = 0);
84 
85 protected:
86  virtual void processWait(const DtTaskMessage& msg, DtSimTaskStatePtr taskStatePtr);
87 
91 
94  virtual void processWaitTask(DtSimTask* task, DtSimTaskStatePtr taskState);
95 
100  virtual void processWaitDurationTask(DtSimTask* task, DtSimTaskStatePtr taskState);
101 
105  virtual void processWaitElapsedTask(DtSimTask* task, DtSimTaskStatePtr taskState);
106 
110 
112  DtWaitController(const DtWaitController & orig);
113 
115  const DtWaitController & operator=(const DtWaitController & orig);
116 
122  virtual bool createPSR();
123 
127 };
128 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
Definition: waitingPSR.h:34
virtual void enable()
Overridden to call registerTaskMsgCallbacks().
virtual void registerTaskMsgCallbacks()
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:20
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
Definition: readerWriterRegistry.h:39
virtual const char * type() const =0
Returns a string identifies the class type of component.
virtual bool init()
Calls setRadio()
DtBoost::shared_ptr< DtSimTaskState > DtSimTaskStatePtr
Definition: taskAndTaskStateDefines.h:18
DtWaitingPSR * myProcessState
Container for state data associated with this component.
Definition: waitController.h:126
File: simMsg.h.
Definition: simMessage.h:35
File: vlClock.h.
virtual void tick()
This gives the thread of control to the component.
DtWaitController is a controller that models waiting behavior ground and surface entities.
Definition: waitController.h:32
virtual DtSimTaskStatePtr currentTaskState() const
virtual void disable()
Overridden to allow tasks controllers that can be disabled to call task complete. ...
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtSimTask is an abstract base class from which real tasks can derive.
Definition: simTask.h:31
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:103
A DtTaskMsg is a DtRadioMsg with a pointer to a task.
Definition: taskMessage.h:19

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)