VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfSimPlanExecutor.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
14 #include "vrfplan/planExecutor.h"
17 
19 class DtLocalObject;
20 
26 
28 {
29 private:
34 
35 public:
37  virtual ~DtVrfSimPlanExecutor();
40  virtual bool executeSetDataRequest(const DtPlan& plan, const DtSetDataRequest& sdr);
43  virtual bool executeTask(const DtPlan& plan, const DtSimTask& task);
44 
49  virtual bool executeSimCommand(const DtPlan& plan, const DtSimCommand& command, DtSimCommandContextPtr& context);
50 
52  virtual bool evaluateConditional(const DtPlan& plan, const DtSimCondExpr* conditional);
53 
55  virtual bool taskActive(int taskId) const;
56 
58  virtual bool stopTask(int taskId);
59 
61  virtual int suspendAllTopLevelTasks(bool suspendedFromTrigger = false);
62 
64  virtual bool resumeSuspendedTask(int);
65 
66  virtual bool hasTopLevelTasks() const;
67 
70  virtual DtPlanVariableSubstitutor* planVariableSubstitutor() const;
71 
74  virtual bool isSimCommandComplete(const DtPlan& plan, const DtSimCommand& command, const DtSimCommandContextPtr& context) const;
75 
78  virtual DtPlanVariableSubstitutor* setPlanVariableSubstitutor(DtPlanVariableSubstitutor* v);
79 
80  static void setPlanVariableSubstitutorCreator(DtPlanVariableSubstitutorCreatorFcn);
81  static DtPlanVariableSubstitutorCreatorFcn planVariableSubstitutorCreatorFcn();
82 
87  virtual std::vector<DtReaderWriter*> substituteVariablesIn(const DtRwVariableBindings&, DtReaderWriter*) const;
88 
90  virtual std::vector<DtReaderWriter*> substitutedValues(const DtRwVariableBindings&, const DtReaderWriter*) const;
91 
93  virtual bool subsituteUUIDIfAvailable(const DtRwVariableBindings&, const DtReaderWriter*, DtUUID& uuid) const;
94 
95 protected:
99 };
UUID is a unique ID wrapper class.
Definition: uuid.h:59
An abstract interface for the execution of a plan. This class defines the interface that is used to c...
Definition: planExecutor.h:32
virtual int suspendAllTopLevelTasks(bool suspendedFromTrigger=false)=0
Suspends all top level tasks and returns the suspended id.
virtual bool taskActive(int taskId) const =0
virtual bool evaluateConditional(const DtPlan &plan, const DtSimCondExpr *conditional)=0
Evaluate the specified conditional.
DtPlanExecutor & operator=(const DtPlanExecutor &orig)
Not implemented.
virtual bool resumeSuspendedTask(int)=0
Resumes the suspended task id.
virtual bool isSimCommandComplete(const DtPlan &plan, const DtSimCommand &command, const DtSimCommandContextPtr &context) const =0
Create an executor and call it with the command context pointer to see if the command is complete...
Definition: planVariableSubstitutor.h:30
static DtPlanVariableSubstitutorCreatorFcn thePlanVariableSubstitutorCreatorFcn
Definition: vrfSimPlanExecutor.h:98
Definition: readerWriter.h:85
virtual bool executeSetDataRequest(const DtPlan &plan, const DtSetDataRequest &sdr)=0
Execute the specified Set Data Request in the context of the supplied plan.
virtual bool stopTask(int taskId)=0
Stops the execution of the task with the specified task execution ID. This only has meaning in the co...
virtual bool executeTask(const DtPlan &plan, const DtSimTask &task)=0
Execute the specified Task in the context of the supplied plan.
ReaderWriter object that maintains a list of reader-writer variable bindings. It keeps a list of name...
Definition: rwVariableBindings.h:27
DtPlanVariableSubstitutor * myPlanVariableSubstitutor
Definition: vrfSimPlanExecutor.h:97
DtSetDataRequest is an abstract base class from which real setDataRequests can derive. It manages the read/write capability; derived classes need only use and register read/writatble data types for derived information.
Definition: setDataRequest.h:41
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
Concrete implementation of the DtPlanExecutor which interfaces with the VRF simulation engine...
Definition: vrfSimPlanExecutor.h:27
virtual bool subsituteUUIDIfAvailable(const DtRwVariableBindings &, const DtReaderWriter *, DtUUID &uuid) const =0
If, in the supplied reader/writer there is a matching UUID to substitute, place the resultant value i...
DtSimCommand is an abstract base class from which commands can derive. It manages the read/write capa...
Definition: simCommand.h:32
class DtPlan:
Definition: plan.h:92
DtSimCondExpr is an abstract base class representing various Conditional Expressions used by the Plan...
Definition: simCondExpr.h:53
virtual bool executeSimCommand(const DtPlan &plan, const DtSimCommand &command, DtSimCommandContextPtr &context)=0
Execute the specified Simulation Command in the context of the supplied plan.
DtSimTask is an abstract base class from which real tasks can derive. It manages the read/write capab...
Definition: simTask.h:30
virtual std::vector< DtReaderWriter * > substitutedValues(const DtRwVariableBindings &, const DtReaderWriter *) const =0
Returns a vector list of reader/writer values (cloned from the source) that were substituted. The results of this call must be freed by the user.
DtPlanVariableSubstitutor *(* DtPlanVariableSubstitutorCreatorFcn)(DtLocalObject *)
Definition: planVariableSubstitutor.h:28
virtual std::vector< DtReaderWriter * > substituteVariablesIn(const DtRwVariableBindings &, DtReaderWriter *) const =0
Iterates over all items in the reader writer registry of the supplied item, and, if any of the variab...
DtLocalObject * myVrfObject
Definition: vrfSimPlanExecutor.h:96
virtual bool hasTopLevelTasks() const =0
RFeturns true if there are tasks executing.
Definition: vrfMessageInterface.h:40
DtBoost::shared_ptr< DtSimCommandContext > DtSimCommandContextPtr
Definition: simCommandStmt.h:28
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 Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)