VR-Engage  2.2
Loading...
Searching...
No Matches
WeaponAmmoUpdate.h
Go to the documentation of this file.
1/*********************************************************************************
2** Copyright (c) 2025 MAK Technologies, Inc.
3** All rights reserved.
4*********************************************************************************/
5
6/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7!!!!!!!!!This is an auto-generated file. Any changes will be destroyed!!!!!!!!!!!
8!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9Generated from: /data/exports/DEV-CAM-BML-043/nightly/3085/libsrc/framework/vreMessages/entity.lua
10*/
11/*-----------------COMMENT----------------------
12Update to the count for a specific munition. Sent on tick if a munition's
13
14count has changed.
15-------------------COMMENT----------------------*/
16#pragma once
17
20#include <vreMessages/export.h>
21#include <vlpi/entityIdentifier.h>
22#include <vlpi/entityType.h>
23
24
25namespace makVre
26{
27
28
29constexpr const char* WeaponAmmoUpdateMessageType = "entityState.weapons.ammoUpdate";
30
32{
33public:
34
35
36 // Struct for defining data
38 {
40
41 DtEntityIdentifier myEntityId;
42 DtEntityType myMunitionType;
44
45 bool operator==(const WeaponAmmoUpdateData& rhs) const;
46 };
47
48 // Default static creators to promote the usage of not using new.
52
53 //! \brief static message identity functions
54 static const std::string& theType();
57
58 //! \brief Get the name of the message type
59 virtual const std::string& type() const override;
60 virtual const makVre::DtVreMessageId& messageId() const override;
61
62 // default destructor
63 virtual ~WeaponAmmoUpdateMessage() override;
64
65 virtual const DtEntityIdentifier& getEntityId() const;
66 virtual void setEntityId(const DtEntityIdentifier& val);
67
68 virtual const DtEntityType& getMunitionType() const;
69 virtual void setMunitionType(const DtEntityType& val);
70
71 virtual int getAmmoCount() const;
72 virtual void setAmmoCount(int val);
73
74
75 // Accessors
76 virtual int messageSize() const override;
77 static makVre::DtVreMessage* decode(char* buffer, int length);
80
81 // Operators
82 bool operator==(const WeaponAmmoUpdateMessage& rhs) const;
83
84protected:
85 // Inaccessible default constructor to promote the usage of the static creator functions
87
88 virtual void serialize(DtStreamWriter& writer) const override;
89 virtual void deserialize(DtStreamReader& reader) override;
90
91protected:
94
95 // Store the data for future use
97};
98
99} // ::makVre
100
101
102
Reader class for decoding values from a byte array.
Definition byteStream.h:42
Writer class for encoding values into a byte array.
Definition byteStream.h:161
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
Message identifier class for the VREngage messaging system.
Definition vreMessageId.h:35
WeaponAmmoUpdateData getData() const
virtual const makVre::DtVreMessageId & messageId() const override
Gets the message ID object.
static makVre::DtVreMessageId theMessageId
Definition WeaponAmmoUpdate.h:92
virtual int messageSize() const override
Static decode function pattern for derived classes.
virtual int getAmmoCount() const
bool operator==(const WeaponAmmoUpdateMessage &rhs) const
virtual const DtEntityIdentifier & getEntityId() const
virtual void deserialize(DtStreamReader &reader) override
Deserializes the message from a stream reader.
virtual const std::string & type() const override
Get the name of the message type.
static WeaponAmmoUpdateMessage * create()
static UInt64 theVersion
Definition WeaponAmmoUpdate.h:93
virtual ~WeaponAmmoUpdateMessage() override
static const makVre::DtVreMessageId & theId()
virtual void setEntityId(const DtEntityIdentifier &val)
static WeaponAmmoUpdateMessage * createFromData(const WeaponAmmoUpdateData)
virtual void setAmmoCount(int val)
static makVre::DtVreMessage * decode(char *buffer, int length)
virtual void setMunitionType(const DtEntityType &val)
static const std::string & theType()
static message identity functions
WeaponAmmoUpdateData getData()
WeaponAmmoUpdateData myData
Definition WeaponAmmoUpdate.h:96
static WeaponAmmoUpdateMessage * createFrom(WeaponAmmoUpdateMessage *)
virtual void serialize(DtStreamWriter &writer) const override
Serializes the message to a stream writer.
virtual const DtEntityType & getMunitionType() const
Defines export macros for the VREngage Messages library.
#define VREMESSAGES_DLL
Export/import macro for non-Windows platforms.
Definition export.h:39
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
unsigned long long UInt64
Unsigned 64-bit integer type.
Definition utilFunctions.h:42
constexpr const char * WeaponAmmoUpdateMessageType
Definition WeaponAmmoUpdate.h:29
int myAmmoCount
Definition WeaponAmmoUpdate.h:43
bool operator==(const WeaponAmmoUpdateData &rhs) const
DtEntityType myMunitionType
Definition WeaponAmmoUpdate.h:42
DtEntityIdentifier myEntityId
Definition WeaponAmmoUpdate.h:41
Defines the base class for all VREngage messages.
Defines message identifier class for the VREngage messaging system.