WSF
WsfTaskCancelMessage.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFTASKCANCELMESSAGE_HPP
13#define WSFTASKCANCELMESSAGE_HPP
14
15#include "wsf_export.h"
16
17#include <memory>
18#include <string>
19
20class UtScriptClass;
21class UtScriptTypes;
22#include "WsfMessage.hpp"
23class WsfPlatform;
24#include "WsfStringId.hpp"
25class WsfTask;
26#include "WsfTrackId.hpp"
27
32{
33public:
34 WsfTaskCancelMessage(); // For XIO (de)serialization.
35 WsfTaskCancelMessage(WsfPlatform* aPlatformPtr);
36 WsfTaskCancelMessage(WsfPlatform* aPlatformPtr, const WsfTask& aTask);
37
38 WsfMessage* Clone() const override;
39
40 const char* GetScriptClassName() const override;
41
42 static std::unique_ptr<UtScriptClass> CreateScriptClass(const std::string& aClassName, UtScriptTypes* aScriptTypesPtr);
43
44 static WsfStringId GetTypeId();
45
47 unsigned int GetTaskId() const { return mTaskId; }
48
50
51 WsfPlatform* GetAssigner() const;
52
55
57 void SetAssignerPlatformIndex(size_t aIndex) { mAssignerPlatformIndex = aIndex; }
58
61
65
67
68 WsfPlatform* GetAssignee() const;
69
72
74 void SetAssigneePlatformIndex(size_t aIndex) { mAssigneePlatformIndex = aIndex; }
75
78
82
84
85
86 const WsfTrackId& GetTrackId() const { return mTrackId; }
87
89 void SetTrackId(const WsfTrackId& aTrackId) { mTrackId = aTrackId; }
91
93
94
95 WsfStringId GetTaskType() const { return mTaskType; }
96
98 void SetTaskType(WsfStringId aTaskType) { mTaskType = aTaskType; }
99
101 void SetTaskType(const std::string& aTaskType) { mTaskType = aTaskType; }
103
107
108
110
112 void SetResourceName(WsfStringId aResourceName) { mResourceName = aResourceName; }
113
115 void SetResourceName(const std::string& aResourceName) { mResourceName = aResourceName; }
117
119 template<typename T>
126
127protected:
128 // Using the default copy constructor.
129 // WsfTaskCancelMessage(const WsfTaskCancelMessage& aSrc);
130
132 unsigned int mTaskId;
133
136
139
142
145
148
151
154
157
160};
161
162#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
WsfMessage(WsfStringId aType)
Constructor for XIO (de)serialization.
Definition WsfMessage.cpp:25
void Serialize(T &aBuff)
(De)serializer for XIO
Definition WsfMessage.hpp:207
const char * GetScriptClassName() const override
Definition WsfMessage.cpp:235
static WsfStringId GetTypeId()
Definition WsfMessage.cpp:159
virtual WsfMessage * Clone() const
Definition WsfMessage.cpp:150
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
size_t mAssignerPlatformIndex
The platform index of the assigner.
Definition WsfTaskCancelMessage.hpp:135
void SetResourceName(const std::string &aResourceName)
Set the resource (string form).
Definition WsfTaskCancelMessage.hpp:115
WsfStringId GetAssigneePlatformName() const
Get the name of the assignee.
Definition WsfTaskCancelMessage.hpp:77
static std::unique_ptr< UtScriptClass > CreateScriptClass(const std::string &aClassName, UtScriptTypes *aScriptTypesPtr)
Definition WsfTaskCancelMessage.cpp:126
WsfStringId mAssigneePlatformName
The name of the assignee.
Definition WsfTaskCancelMessage.hpp:147
WsfStringId GetAssigneeProcessorName() const
Get the name of the processor on the assignee.
Definition WsfTaskCancelMessage.hpp:80
void SetAssigneePlatformIndex(size_t aIndex)
Set the platform index of the assignee.
Definition WsfTaskCancelMessage.hpp:74
WsfStringId mResourceName
The resource assigned for the task.
Definition WsfTaskCancelMessage.hpp:159
WsfStringId mAssignerPlatformName
The name of the assigner.
Definition WsfTaskCancelMessage.hpp:138
void SetTrackId(const WsfTrackId &aTrackId)
Set the track ID to which the message applies.
Definition WsfTaskCancelMessage.hpp:89
WsfStringId GetAssignerProcessorName() const
Get the name of the processor on the assigner.
Definition WsfTaskCancelMessage.hpp:63
size_t GetAssignerPlatformIndex() const
Get the platform index of the assigner.
Definition WsfTaskCancelMessage.hpp:54
void SetResourceName(WsfStringId aResourceName)
Set the resource (ID form).
Definition WsfTaskCancelMessage.hpp:112
void Serialize(T &aBuff)
For XIO (de)serialization.
Definition WsfTaskCancelMessage.hpp:120
size_t GetAssigneePlatformIndex() const
Get the platform index of the assignee.
Definition WsfTaskCancelMessage.hpp:71
WsfTrackId mTrackId
The track ID of the track associated with the task.
Definition WsfTaskCancelMessage.hpp:153
void SetTaskType(WsfStringId aTaskType)
Set the task type (ID form).
Definition WsfTaskCancelMessage.hpp:98
WsfTaskCancelMessage()
Constructor, for XIO (de)serialization.
Definition WsfTaskCancelMessage.cpp:23
size_t mAssigneePlatformIndex
The platform index of the assignee.
Definition WsfTaskCancelMessage.hpp:144
void SetAssignerPlatformIndex(size_t aIndex)
Set the platform index of the assigner.
Definition WsfTaskCancelMessage.hpp:57
WsfStringId GetAssignerPlatformName() const
Get the name of the assigner.
Definition WsfTaskCancelMessage.hpp:60
WsfStringId mAssignerProcessorName
The name of the processor on the assigner.
Definition WsfTaskCancelMessage.hpp:141
WsfStringId mAssigneeProcessorName
The name of the processor on the assignee.
Definition WsfTaskCancelMessage.hpp:150
WsfStringId GetResourceName() const
Get the resource name.
Definition WsfTaskCancelMessage.hpp:109
WsfStringId GetTaskType() const
Get the task type.
Definition WsfTaskCancelMessage.hpp:95
void SetTaskType(const std::string &aTaskType)
Set the task type (string form).
Definition WsfTaskCancelMessage.hpp:101
unsigned int GetTaskId() const
Return the assigners task ID.
Definition WsfTaskCancelMessage.hpp:47
unsigned int mTaskId
The assigners task ID.
Definition WsfTaskCancelMessage.hpp:132
const WsfTrackId & GetTrackId() const
Get the track ID to which the message applies.
Definition WsfTaskCancelMessage.hpp:86
WsfStringId mTaskType
The type of the task.
Definition WsfTaskCancelMessage.hpp:156
A class that defines a task to be performed.
Definition WsfTask.hpp:28
Definition WsfTrackId.hpp:33
Copyrights Multiple, All Rights Reserved