VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simCommandExecutor.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2006 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
14 #include <vlutil/vlString.h>
16 #include "vrfplan/simCommandStmt.h"
17 #include "vrfutil/rwUUID.h"
18 
20 class DtSimCommand;
22 class DtPlan;
23 
29 
31 {
32 public:
34 
35  virtual ~DtSimCommandExecutor();
36 
40  virtual bool executeAndDistribute(const DtSimCommand* command, DtSimCommandContextPtr& context, const DtPlan* plan = 0);
41 
45  virtual bool executeAndDistribute(const DtSimCommand* command, DtSimCommandContextPtr& context, const DtUUID& objectName,
46  const DtPlan* plan = 0);
47 
51  virtual bool isSimCommandComplete(const DtSimCommand* command, const DtSimCommandContextPtr& context, const DtPlan* = 0) const;
52 
55  virtual void distribute(const DtSimCommand* command, const DtPlan* plan = 0);
56 
64  virtual void distribute(const DtSimCommand* command, const DtUUID& objectName,
65  const DtPlan* plan = 0);
66 
68  static void setFactory(DtSimCommandExecutorFactory* factory);
69 
72  static DtSimCommandExecutor* createSimCommandExecutor(const DtSimCommandMessageType& type, DtSimulationServices* simManager);
73 
74 protected:
83  virtual bool execute(const DtSimCommand* command, DtSimCommandContextPtr& context, const DtPlan* plan = 0) = 0;
84 
91  virtual bool execute(const DtSimCommand* command, DtSimCommandContextPtr& context, const DtUUID& objectName,
92  const DtPlan* plan = 0);
93 
94 private:
100  DtSimCommandExecutor& operator=(const DtSimCommandExecutor& orig);
101 
102 protected:
104 
106 };
107 
111 {
112 public:
114 
116 
117  static DtSimCommandExecutor* create(DtSimulationServices* simManager);
118 
119 protected:
120 
121  virtual bool execute(const DtSimCommand* command, DtSimCommandContextPtr& context, const DtPlan* plan = 0) { return true; };
122 
123 private:
130 };
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
Abstract base class for all simCommand executors. Every DtSimCommand should have a corresponding DtSi...
Definition: simCommandExecutor.h:30
Contains the DtUUID class declaration.
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
DtSimCommandExecutor & operator=(const DtSimCommandExecutor &orig)
Not implemented.
static DtSimCommandExecutorFactory * myFactory
Definition: simCommandExecutor.h:105
An executor for a sim command that has no specific execution, but should still be distributed to any ...
Definition: simCommandExecutor.h:110
Define constants for types of tasks, sets, admin messages, reports, and sim commands (all sent via ra...
DtSimulationServices * mySimulationServices
Definition: simCommandExecutor.h:103
DtSimCommand is an abstract base class from which commands can derive. It manages the read/write capa...
Definition: simCommand.h:32
virtual bool execute(const DtSimCommand *command, DtSimCommandContextPtr &context, const DtPlan *plan=0)
Perform the actual execution of the DtSimCommand. Pure virtual function; must be overloaded by derive...
Definition: simCommandExecutor.h:121
class DtPlan:
Definition: plan.h:92
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
Factory for creating DtSimCommandExecutor instances.
Definition: simCommandExecutorFactory.h:24
DtSimCommandDistributionExecutor(DtSimulationServices *simManager)
Definition: simCommandExecutor.h:113
virtual ~DtSimCommandDistributionExecutor()
Definition: simCommandExecutor.h:115
DtBoost::shared_ptr< DtSimCommandContext > DtSimCommandContextPtr
Definition: simCommandStmt.h:28

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)