VR-Forces 4.10 Class Documentation
 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 
12 #include "vrftasks/simTask.h"
13 
18 #include "vrfmsgs/vrfmsgsDefines.h"
20 {
21 
22 public:
23 
25  DtTaskMessage();
26 
27  DtTaskMessage(const DtTaskMessage & orig);
28 
29 protected:
30  const DtTaskMessage& operator=(DtTaskMessage & orig);
31 
32 public:
33 
36  virtual ~DtTaskMessage();
37 
39  virtual DtSimTask* task() const;
40 
54  virtual void setTask(DtSimTask * task);
55 
57  void setOwnsTask(bool b) { myOwnTask = b; }
58 
61  virtual bool independentlyTasked() const;
62  virtual void setIndependentlyTasked(bool yesNo);
63 
67 
68  virtual void setTaskId(int id);
69  virtual int taskId() const;
71 
73 
74  virtual void setSubtaskId(int id);
75  virtual int subtaskId() const;
77 
84 
85  virtual void setTaskTrackingNumber(int n);
86  virtual int taskTrackingNumber() const;
88 
92 
93  virtual void setAffectsIndependentTaskStatus(bool);
94  virtual bool affectsIndependentTaskStatus() const;
96 
101  virtual int contentCategoryType() const;
102 
104  virtual const DtSimTaskMessageType& contentType() const;
105 
111  virtual DtSimMessage* clone() const;
112 
116  virtual int netRepSize() const;
117 
120  virtual bool setFromNet(const char* networkBuffer,
121  unsigned contentSize);
122 
125  virtual bool setToNet();
126 
127  virtual void printDataToString(DtString& str);
128 
129  static DtVrfObjectMessage* creator();
130 
131  bool ownsTask() const
132  {
133  return myOwnTask;
134  }
135 
136 protected:
138  bool myOwnTask;
140  int myTaskId;
145 };
146 
147 
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:57
bool myOwnTask
Definition: taskMessage.h:138
#define DT_DLL_vrfmsgs
This file is used to determine how to build.
Definition: vrfmsgsDefines.h:28
bool myAffectsIndependentTaskStatus
Definition: taskMessage.h:144
int myTaskId
Definition: taskMessage.h:140
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:137
bool ownsTask() const
Definition: taskMessage.h:131
virtual int netRepSize() const
Returns the size of the simulation network representation of this message.
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:143
The base class for all messages to/from a specific DtVrfObject.
Definition: vrfObjectMessage.h:30
virtual int contentCategoryType() const =0
DtSimTask is an abstract base class from which real tasks can derive.
Definition: simTask.h:31
bool myIndependentlyTasked
Definition: taskMessage.h:139
A DtTaskMsg is a DtRadioMsg with a pointer to a task.
Definition: taskMessage.h:19
virtual void printDataToString(DtString &str)
Print message.

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)