VR-Forces 5.0.1 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();
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 
94 
95  virtual void setAffectsIndependentTaskStatus(bool);
96  virtual bool affectsIndependentTaskStatus() const;
98 
103  virtual int contentCategoryType() const;
104 
106  virtual const DtSimTaskMessageType& contentType() const;
107 
113  virtual DtSimMessage* clone() const;
114 
118  virtual int netRepSize() const;
119 
122  virtual bool setFromNet(const char* networkBuffer,
123  unsigned contentSize);
124 
127  virtual bool setToNet();
128 
129  virtual void printDataToString(DtString& str);
130 
131  static DtVrfObjectMessage* creator();
132 
133  bool ownsTask() const
134  {
135  return myOwnTask;
136  }
137 
138 protected:
140  bool myOwnTask;
142  int myTaskId;
147 };
148 
149 
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:140
#define DT_DLL_vrfmsgs
This file is used to determine how to build.
Definition: vrfmsgsDefines.h:28
bool myAffectsIndependentTaskStatus
Definition: taskMessage.h:146
int myTaskId
Definition: taskMessage.h:142
virtual bool setToNet()
Fill in our network representation.
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:139
bool ownsTask() const
Definition: taskMessage.h:133
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:145
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:141
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
virtual void printDataToString(DtString &str)
Print message.

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)