VR-Engage  2.2
Loading...
Searching...
No Matches
playerCreated.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/playerCreated.lua
10*/
11/*-----------------COMMENT----------------------
12Sent when the player is created. Used for post-initialization setup.
13-------------------COMMENT----------------------*/
14#pragma once
15
18#include <vreMessages/export.h>
19#include <vlpi/entityIdentifier.h>
20#include <string>
21#include <vector>
22
23
24namespace makVre
25{
26
27
28constexpr const char* PlayerCreatedMessageType = "player.created";
29
31{
32public:
33
34
35 // Struct for defining data
37 {
39
40 DtEntityIdentifier myEntityId;
41 std::string myEntityType;
42 std::vector<std::string> myRoles;
43
44 bool operator==(const PlayerCreatedData& rhs) const;
45 };
46
47 // Default static creators to promote the usage of not using new.
51
52 //! \brief static message identity functions
53 static const std::string& theType();
56
57 //! \brief Get the name of the message type
58 virtual const std::string& type() const override;
59 virtual const makVre::DtVreMessageId& messageId() const override;
60
61 // default destructor
62 virtual ~PlayerCreatedMessage() override;
63
64 virtual const DtEntityIdentifier& getEntityId() const;
65 virtual void setEntityId(const DtEntityIdentifier& val);
66
67 virtual const std::string& getEntityType() const;
68 virtual void setEntityType(const std::string& val);
69
70 virtual const std::vector<std::string>& getRoles() const;
71 virtual void setRoles(const std::vector<std::string>& val);
72
73
74 // Accessors
75 virtual int messageSize() const override;
76 static makVre::DtVreMessage* decode(char* buffer, int length);
79
80 // Operators
81 bool operator==(const PlayerCreatedMessage& rhs) const;
82
83protected:
84 // Inaccessible default constructor to promote the usage of the static creator functions
86
87 virtual void serialize(DtStreamWriter& writer) const override;
88 virtual void deserialize(DtStreamReader& reader) override;
89
90protected:
93
94 // Store the data for future use
96};
97
98} // ::makVre
99
100
101
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
static PlayerCreatedMessage * create()
virtual const std::string & getEntityType() const
virtual void serialize(DtStreamWriter &writer) const override
Serializes the message to a stream writer.
static PlayerCreatedMessage * createFromData(const PlayerCreatedData)
PlayerCreatedData myData
Definition playerCreated.h:95
virtual void setRoles(const std::vector< std::string > &val)
virtual const std::vector< std::string > & getRoles() const
static UInt64 theVersion
Definition playerCreated.h:92
static const makVre::DtVreMessageId & theId()
PlayerCreatedData getData()
static makVre::DtVreMessage * decode(char *buffer, int length)
virtual void deserialize(DtStreamReader &reader) override
Deserializes the message from a stream reader.
static makVre::DtVreMessageId theMessageId
Definition playerCreated.h:91
virtual const makVre::DtVreMessageId & messageId() const override
Gets the message ID object.
virtual const DtEntityIdentifier & getEntityId() const
static PlayerCreatedMessage * createFrom(PlayerCreatedMessage *)
PlayerCreatedData getData() const
virtual int messageSize() const override
Static decode function pattern for derived classes.
virtual void setEntityId(const DtEntityIdentifier &val)
static UInt64 theVersionNumber()
static const std::string & theType()
static message identity functions
virtual const std::string & type() const override
Get the name of the message type.
bool operator==(const PlayerCreatedMessage &rhs) const
virtual ~PlayerCreatedMessage() override
virtual void setEntityType(const std::string &val)
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 * PlayerCreatedMessageType
Definition playerCreated.h:28
bool operator==(const PlayerCreatedData &rhs) const
std::vector< std::string > myRoles
Definition playerCreated.h:42
std::string myEntityType
Definition playerCreated.h:41
DtEntityIdentifier myEntityId
Definition playerCreated.h:40
Defines the base class for all VREngage messages.
Defines message identifier class for the VREngage messaging system.