VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
singleTaskControllerComponent.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
14 
15 
21 {
22 
23 public:
24 
31  DtSimManager* simManager,
32  DtComponentDescriptor* compDesc = 0,
33  DtReaderWriterRegistry* parentRegistry = 0);
34 
37 
42  virtual void postTick();
43 
52  virtual bool beginProcessingTask(const DtTaskMessage& task,
53  DtSimTaskStatePtr taskState);
54 
57  virtual void taskNotify(const DtSimTask & task);
58 
59 
64  virtual void taskComplete(bool success = true);
65 
69  virtual void clearTask();
70 
73  virtual void suspendTask();
74 
78  virtual int sendSubtask(DtSimTask& task);
79 
83  virtual void clearSubtask(int subtaskId);
84 
88  virtual void addPendingSubtaskId(int subtaskId);
89 
94  virtual bool findPendingSubtaskId(int subtaskId);
95 
97  virtual bool isSubtasked() const;
98 
103  virtual void removePendingSubtaskId(int subtaskId);
104 
107  virtual void removeAllPendingSubtaskIds();
108 
110  virtual std::vector<int> currentPendingSubstaskIds() const;
111 
114  //virtual DtTaskMessage* pendingSubtask(int subtaskId, DtString& controller) const;
115 
117  virtual void clearCurrentTaskMessage();
118 
120  virtual DtTaskMessage * currentTaskMessage() const;
121 
127  virtual DtSimTaskStatePtr currentTaskState() const;
128 
138  virtual bool decideToGiveUpTask() const;
139 
143  virtual void giveUpTask();
144 
146  virtual bool taskActive(int taskId) const;
147 
149  virtual bool clearTopLevelTasks();
150 
152  virtual void clearConflictingTopLevelTasks(const DtSimTaskMessageType& conflictType);
153 
155  virtual void clearTasksByType(const DtSimTaskMessageType& taskType);
156 
158  virtual void clearTaskById(int taskId);
159 
160  virtual DtSuspendedTaskInfo* suspendTaskById(int taskId);
161 
162  virtual DtSuspendedTaskInfo* suspendSubtaskById(int taskId, int subtaskId);
163 
165  virtual std::list<DtTaskMessage*> currentTaskMessages() const;
166 
169 
171  virtual void disable();
172 
173 protected:
176  virtual void clearPendingSubtasks();
177 
181  virtual void clearSubtasksByType(const DtSimTaskMessageType& taskType);
182 
186  virtual void cleanupInactiveSubtaskStatus();
187 };
virtual std::list< DtTaskMessage * > currentTaskMessages() const =0
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
virtual bool beginProcessingTask(const DtTaskMessage &task, DtSimTaskStatePtr taskState)
Called by the task manager when this controller should start executing the specified task...
All the information about a single suspended task.
Definition: suspendedTaskInfo.h:23
virtual void clearTask()
Called when you want to clear out this component&#39;s task state.
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:20
virtual DtTaskWithTaskStateListPtr topLevelTasks() const =0
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
End User Description: DtTaskControllerComponent is the base class for all controllers that respond to...
Definition: taskControllerComponent.h:48
Definition: readerWriterRegistry.h:39
virtual bool clearTopLevelTasks()=0
If this controller has any top level tasks (not subtasks), they are cleared.
virtual void taskNotify(const DtSimTask &task)
This is called to let us know when some other component receives a task In the case of this component...
Definition: taskControllerComponent.h:82
DtBoost::shared_ptr< DtSimTaskState > DtSimTaskStatePtr
Definition: taskAndTaskStateDefines.h:18
virtual DtSuspendedTaskInfo * suspendSubtaskById(int taskId, int subtaskId)=0
virtual void disable()
Overridden to 1) remove any task message callbacks registered by this controller 2) call clear task...
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
virtual void clearTasksByType(const DtSimTaskMessageType &taskType)=0
Clears any tasks of the specified type running in this controller.
virtual void clearConflictingTopLevelTasks(const DtSimTaskMessageType &conflictType)=0
Clears any top level tasks on this controller that conflict with the conflict task type...
virtual DtSuspendedTaskInfo * suspendTaskById(int taskId)=0
DtBoost::shared_ptr< DtTaskWithTaskStateList > DtTaskWithTaskStateListPtr
Definition: taskAndTaskStateDefines.h:27
virtual bool taskActive(int taskId) const =0
virtual void clearTaskById(int taskId)=0
Clears any task of the specified ID running in this controller.
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
virtual void postTick()
This function is called immediately after tick() is called.

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)