VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
taskMessage.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include "vrfmsgs/vrfmsgsDefines.h"
13 #include "vrftasks/simTask.h"
14 
22 {
23 
24 public:
25 
27  DtTaskMessage();
28 
29  DtTaskMessage(const DtTaskMessage & orig);
30 
31 protected:
32  const DtTaskMessage& operator=(DtTaskMessage & orig);
33 
34 public:
35 
38  virtual ~DtTaskMessage() override;
39 
41  virtual DtSimTask* task() const;
42 
56  virtual void setTask(DtSimTask * task);
57 
59  void setOwnsTask(bool b) { myOwnTask = b; }
60 
63  virtual bool independentlyTasked() const;
64  virtual void setIndependentlyTasked(bool yesNo);
65 
69 
70  virtual void setTaskId(int id);
71  virtual int taskId() const;
73 
75 
76  virtual void setSubtaskId(int id);
77  virtual int subtaskId() const;
79 
86 
87  virtual void setTaskTrackingNumber(int n);
88  virtual int taskTrackingNumber() const;
90 
95  virtual void setAffectsIndependentTaskStatus(bool);
96  virtual bool affectsIndependentTaskStatus() const;
98 
104  virtual void setTaskUpgrade(bool);
105  virtual bool taskUpgrade() const;
107 
112  virtual int contentCategoryType() const override;
113 
115  virtual const DtSimTaskMessageType& contentType() const;
116 
122  virtual DtSimMessage* clone() const override;
123 
127  virtual int netRepSize() const override;
128 
131  virtual bool setFromNet(const char* networkBuffer, unsigned contentSize) override;
132 
135  virtual bool setToNet() override;
136 
137  virtual void printDataToString(DtString& str) override;
138 
139  static DtVrfObjectMessage* creator();
140 
141  bool ownsTask() const
142  {
143  return myOwnTask;
144  }
145 
146 protected:
148  bool myOwnTask;
150  int myTaskId;
155  bool myTaskUpgrade = false;
156 };
157 
158 
void setOwnsTask(bool b)
Sets whether or not message has ownership of task. If set to true will delete when task message is de...
Definition: taskMessage.h:59
bool myOwnTask
Definition: taskMessage.h:148
#define DT_DLL_vrfmsgs
This file is used to determine how to build.
Definition: vrfmsgsDefines.h:28
bool myAffectsIndependentTaskStatus
Definition: taskMessage.h:154
int myTaskId
Definition: taskMessage.h:150
virtual bool setToNet()
Fill in our network representation.
virtual void printDataToString(DtString &str) override
Print message.
virtual DtSimMessage * clone() const =0
File: simMsg.h.
Definition: simMessage.h:35
virtual bool setFromNet(const char *networkBuffer, unsigned contentSize)
Fills in the message from the network buffer.
const DtVrfObjectMessage & operator=(const DtVrfObjectMessage &orig)
assignment operator: shallow; assigns values only.
DtSimTask * myTask
Definition: taskMessage.h:147
bool ownsTask() const
Definition: taskMessage.h:141
virtual int netRepSize() const
Returns the size of the simulation network representation of this message. This size includes any tas...
int myTaskTrackingNumber
This is a number that may be provided by the sender of the task, and is then included in the task com...
Definition: taskMessage.h:153
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
virtual int contentCategoryType() const =0
DtSimTask is an abstract base class from which real tasks can derive. It manages the read/write capab...
Definition: simTask.h:30
bool myIndependentlyTasked
Definition: taskMessage.h:149
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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)