VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfObjectPlanManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
13 
14 class DtPlan;
15 class DtPlanExecutor;
16 class DtSimBlock;
17 class DtSimCondExpr;
18 class DtSimMessage;
19 class DtSimulationAddress;
20 class DtVrfObjectMessage;
21 class DtIfPlan;
22 class DtTaskMessage;
23 class DtLocalObject;
24 
39 {
40 public:
41 
44 
46  virtual ~DtVrfObjectPlanManager();
47 
49  virtual bool init();
50 
53  virtual void tick();
54 
57  virtual DtPlanExecutor* createPlanExecutor();
58 
63  virtual DtPlan* createAndInitPlan();
64 
66  virtual DtPlan* plan();
67 
69  virtual DtPlan* getOrCreatePlan();
70 
72  virtual DtPlan* nextFramePlan();
73 
79  virtual void setPlan(DtPlan* plan, bool abandonCurrentPlan = true);
80 
84  virtual bool sendPlan();
85 
88  virtual bool sendPlanStatement(int statementId,
89  const DtSimulationAddress& address) const;
90 
92  virtual void setTaskIssuedFromPlan(bool taskIssuedFromPlan);
93 
106  virtual void taskExecuted(const DtTaskMessage& msg, bool abandonPlan = true);
107 
109  static DtVrfObjectPlanManagerFactory* factory();
111  static void setFactory(DtVrfObjectPlanManagerFactory* factory);
112 
115  virtual void processSetPlan(DtSimMessage* msg);
116  virtual void processSetPlan(DtIfPlan* msgData);
117 
119  virtual void prepareForReinitialization();
120 
125  virtual void processRequestPlan(const DtSimMessage* msg);
126 
129  virtual void processAbandonPlan(DtSimMessage* msg);
130 
133  virtual void processRestartPlan(DtSimMessage* msg);
134 
136  virtual void restartPlan();
137 
140  static void currentStatementChangedCallback(const DtPlan& plan,
141  void* usrData);
144  virtual void processCurrentStatementChanged(const DtPlan& plan);
145 
148  static DtVrfObjectPlanManager* creator(DtLocalObject* vrfObject);
149 
154  static DtVrfObjectPlanManager* createVrfObjectPlanManager(
155  const DtString& type, DtLocalObject* vrfObject);
156 
160  virtual bool hasPlan() const;
161 
163  virtual bool isGlobalPlan() const;
164 
166  virtual bool executingPlan() const;
167 
170  virtual void notifyTaskCompletion(int taskId);
171 
173  virtual void notifySkipTask();
174 
179  virtual bool taskAbandonsPlan(const DtTaskMessage& tskMsg) const;
180 
181 protected:
182 
185 
188 
190  DtVrfObjectPlanManager& operator=(const DtVrfObjectPlanManager& orig);
191 
192 protected:
193 
200 
203  DtPlan* myPendingReplacementPlan = nullptr;
204 };
class DtIfPlan:
Definition: ifPlan.h:61
An abstract interface for the execution of a plan. This class defines the interface that is used to c...
Definition: planExecutor.h:32
DtPlan * myPlan
Definition: vrfObjectPlanManager.h:194
bool myIsRegisteredForCallback
Definition: vrfObjectPlanManager.h:199
DtPlanExecutor * myPlanExecutor
Definition: vrfObjectPlanManager.h:195
class DtVrfObjectPlanManager:
Definition: vrfObjectPlanManagerFactory.h:24
bool myTaskIssuedFromPlan
Definition: vrfObjectPlanManager.h:197
class DtSimBlock:
Definition: simBlock.h:27
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
bool myPlanQueuedForAbandonment
Definition: vrfObjectPlanManager.h:198
File: simMsg.h.
Definition: simMessage.h:35
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
class DtVrfObjectPlanManager:
Definition: vrfObjectPlanManager.h:38
class DtPlan:
Definition: plan.h:92
DtSimCondExpr is an abstract base class representing various Conditional Expressions used by the Plan...
Definition: simCondExpr.h:53
static DtVrfObjectPlanManagerFactory * theFactory
This factory is allocated and destroyed by the DtVrfCreator.
Definition: vrfObjectPlanManager.h:202
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
DtLocalObject * myVrfObject
Definition: vrfObjectPlanManager.h:196
A DtTaskMsg is a DtRadioMsg with a pointer to a task. The type of the taskMsg is just the type of the...
Definition: taskMessage.h:21
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)