WSF
WsfTrackDropMessage.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 WSFTRACKDROPMESSAGE_HPP
13#define WSFTRACKDROPMESSAGE_HPP
14
15#include "wsf_export.h"
16
17#include <memory>
18
19class UtScriptClass;
20class UtScriptTypes;
21#include "WsfMessage.hpp"
22#include "WsfTrackId.hpp"
23
31{
32public:
33 WsfTrackDropMessage(); // For XIO (de)serialization.
34
35 WsfTrackDropMessage(WsfPlatform* aPlatformPtr, double aTime, const WsfTrackId& aTrackId, size_t aPlatformIndex);
36
37 ~WsfTrackDropMessage() override = default;
38
41 WsfMessage* Clone() const override { return new WsfTrackDropMessage(*this); }
42
43 const char* GetScriptClassName() const override;
44 static std::unique_ptr<UtScriptClass> CreateScriptClass(const std::string& aClassName, UtScriptTypes* aScriptTypesPtr);
45
46 static WsfStringId GetTypeId();
47
50 double GetTime() const { return mTime; }
51
53 void SetTime(double aSimTime) { mTime = aSimTime; }
54
57 const WsfTrackId& GetTrackId() const { return mTrackId; }
58
61 size_t GetTargetIndex() const { return mTargetIndex; }
62
64 void SetTargetIndex(size_t aTargetIndex) { mTargetIndex = aTargetIndex; }
65
67 template<typename T>
68 void Serialize(T& aBuff)
69 {
71 aBuff& mTime& mTrackId& mTargetIndex;
72 }
73
74private:
75 double mTime;
76 WsfTrackId mTrackId;
77 size_t mTargetIndex;
78};
79
80#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
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
void SetTargetIndex(size_t aTargetIndex)
Set the truth platform index corresponding to the dropped track.
Definition WsfTrackDropMessage.hpp:64
void Serialize(T &aBuff)
For XIO (de)serialization.
Definition WsfTrackDropMessage.hpp:68
~WsfTrackDropMessage() override=default
size_t GetTargetIndex() const
Definition WsfTrackDropMessage.hpp:61
const WsfTrackId & GetTrackId() const
Definition WsfTrackDropMessage.hpp:57
void SetTime(double aSimTime)
Set the time at which the track was dropped.
Definition WsfTrackDropMessage.hpp:53
double GetTime() const
Definition WsfTrackDropMessage.hpp:50
WsfMessage * Clone() const override
Definition WsfTrackDropMessage.hpp:41
WsfTrackDropMessage()
Constructor, for XIO (de)serialization.
Definition WsfTrackDropMessage.cpp:23
Definition WsfTrackId.hpp:33
Copyrights Multiple, All Rights Reserved