VR-Engage  2.3
Loading...
Searching...
No Matches
chat.h
Go to the documentation of this file.
1/*********************************************************************************
2** Copyright (c) 2026 MAK Technologies, Inc.
3** All rights reserved.
4*********************************************************************************/
5
6/**
7* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8* !!!!!!!!!This is an auto-generated file. Any changes will be destroyed!!!!!!!!!!!
9* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10* Generated from: /home/data/exports/DEV-CAM-BML-305/nightly/3375/libsrc/framework/vreMessages/chat.lua
11*/
12#pragma once
13
16#include <vreMessages/export.h>
17#include <vlpi/entityIdentifier.h>
18#include <string>
19
20namespace makVre
21{
22//! \brief Message type identifier for ChatMessage.
23constexpr const char* ChatMessageType = "simulation.chat";
24
25/**
26 * \class ChatMessage
27 * \brief Chat message for interfacing between Network Thread and Main thread.
28 *
29 * Message type: "simulation.chat"
30 *
31 * \note This is an auto-generated class. Do not modify directly.
32 */
34{
35public:
36 //! \brief MsgType enumeration.
42
43 //! \brief Data payload for ChatMessage.
45 {
46 //! \brief Default constructor.
48
49 //! \name Data Members
50 //! \{
51
53 DtEntityIdentifier mySender;
55 std::string myUserName;
56 std::string myChannel;
57 std::string myMessage;
59 //! \}
60
61 //! \name Operators
62 //! \{
63 bool operator==(const ChatData& rhs) const;
64 bool operator!=(const ChatData& rhs) const;
65 //! \}
66 };
67
68 //! \brief Destructor.
69 virtual ~ChatMessage() override;
70
71 //! \name Static Creators
72 //! \{
73 //! \brief Create a new default instance.
74 //! \return A dynamically allocated default message. Caller takes ownership.
76
77 //! \brief Create a copy of the given message.
78 //! \param origMsg The message to copy. Must not be null.
79 //! \return A dynamically allocated copy. Caller takes ownership.
81
82 //! \brief Create a new message initialized with the given data.
83 //! \param data The data payload to initialize the message with.
84 //! \return A dynamically allocated message. Caller takes ownership.
85 static ChatMessage* createFromData(const ChatData data);
86 //! \}
87
88 //! \name Type Identity
89 //! \{
90 //! \brief Get the message type string for this message class.
91 static const std::string& theType();
92
93 //! \brief Get the message identifier for this message class.
95
96 //! \brief Get the version number for this message class.
98
99 //! \brief Get the message type string for this instance.
100 virtual const std::string& type() const override;
101
102 //! \brief Get the message identifier for this instance.
103 virtual const makVre::DtVreMessageId& messageId() const override;
104 //! \}
105
106 //! \name Accessors
107 //! \{
108 virtual MsgType getMessageType() const;
109 virtual void setMessageType(MsgType val);
110
111 virtual const DtEntityIdentifier& getSender() const;
112 virtual void setSender(const DtEntityIdentifier& val);
113
114 virtual time_t getReceiveTime() const;
115 virtual void setReceiveTime(time_t val);
116
117 virtual const std::string& getUserName() const;
118 virtual void setUserName(const std::string& val);
119
120 virtual const std::string& getChannel() const;
121 virtual void setChannel(const std::string& val);
122
123 virtual const std::string& getMessage() const;
124 virtual void setMessage(const std::string& val);
125
126 virtual int getForceType() const;
127 virtual void setForceType(int val);
128 //! \}
129
130 //! \name Serialization
131 //! \{
132 //! \copydoc makVre::DtVreMessage::messageSize()
133 virtual int messageSize() const override;
134
135 //! \brief Decode a message from a byte buffer.
136 //! \param buffer The raw byte buffer to decode from.
137 //! \param length The length of the buffer in bytes.
138 //! \return A dynamically allocated decoded message. Caller takes ownership.
139 static makVre::DtVreMessage* decode(char* buffer, int length);
140
141 //! \brief Get a copy of the message data.
143
144 //! \brief Get a copy of the message data (const).
146 //! \}
147
148 //! \name Operators
149 //! \{
150 bool operator==(const ChatMessage& rhs) const;
151 bool operator!=(const ChatMessage& rhs) const;
152 //! \}
153
154protected:
156
157 //! \copydoc makVre::DtVreMessage::serialize()
158 virtual void serialize(DtStreamWriter& writer) const override;
159
160 //! \copydoc makVre::DtVreMessage::deserialize()
161 virtual void deserialize(DtStreamReader& reader) override;
162
163protected:
166
168};
169} // namespace makVre
170
static makVre::DtVreMessageId theMessageId
Definition chat.h:164
virtual void setChannel(const std::string &val)
virtual void setForceType(int val)
virtual const std::string & type() const override
Get the message type string for this instance.
virtual void setMessage(const std::string &val)
MsgType
MsgType enumeration.
Definition chat.h:38
@ MsgType_SEND
Definition chat.h:39
@ MsgType_RECEIVE
Definition chat.h:40
virtual MsgType getMessageType() const
static ChatMessage * createFrom(ChatMessage *origMsg)
Create a copy of the given message.
ChatData getData() const
Get a copy of the message data (const).
static ChatMessage * create()
Create a copy of the given message.
virtual void setMessageType(MsgType val)
virtual ~ChatMessage() override
Destructor.
bool operator!=(const ChatMessage &rhs) const
static const makVre::DtVreMessageId & theId()
Get the message identifier for this message class.
ChatData myData
Definition chat.h:167
virtual void deserialize(DtStreamReader &reader) override
Deserializes the message from a stream reader.
virtual void setSender(const DtEntityIdentifier &val)
static ChatMessage * createFromData(const ChatData data)
Create a new message initialized with the given data.
virtual int messageSize() const override
Get a copy of the message data.
static UInt64 theVersion
Definition chat.h:165
virtual void setReceiveTime(time_t val)
virtual time_t getReceiveTime() const
virtual const std::string & getUserName() const
virtual const std::string & getChannel() const
virtual const makVre::DtVreMessageId & messageId() const override
Get the message identifier for this instance.
static UInt64 theVersionNumber()
Get the version number for this message class.
virtual const std::string & getMessage() const
virtual int getForceType() const
static const std::string & theType()
Get the message type string for this instance.
virtual const DtEntityIdentifier & getSender() const
virtual void serialize(DtStreamWriter &writer) const override
Serializes the message to a stream writer.
virtual void setUserName(const std::string &val)
static makVre::DtVreMessage * decode(char *buffer, int length)
Decode a message from a byte buffer.
ChatData getData()
Get a copy of the message data.
bool operator==(const ChatMessage &rhs) const
Reader class for decoding values from a byte array.
Definition byteStream.h:43
Writer class for encoding values into a byte array.
Definition byteStream.h:166
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
Message identifier class for the VREngage messaging system.
Definition vreMessageId.h:35
Defines export macros for the VREngage Messages library.
#define VREMESSAGES_DLL
Export/import macro for non-Windows platforms.
Definition export.h:39
!
Definition glsVreMessageUtil.h:50
unsigned long long UInt64
Unsigned 64-bit integer type.
Definition utilFunctions.h:42
constexpr const char * ChatMessageType
Message type identifier for ChatMessage.
Definition chat.h:23
Data payload for ChatMessage.
Definition chat.h:45
MsgType myMessageType
Definition chat.h:52
int myForceType
Definition chat.h:58
bool operator==(const ChatData &rhs) const
ChatData()
Default constructor.
time_t myReceiveTime
Definition chat.h:54
std::string myMessage
Definition chat.h:57
bool operator!=(const ChatData &rhs) const
std::string myChannel
Definition chat.h:56
std::string myUserName
Definition chat.h:55
DtEntityIdentifier mySender
Definition chat.h:53
Defines the base class for all VREngage messages.
Defines message identifier class for the VREngage messaging system.