Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
Loading...
Searching...
No Matches
chatmessage.cpp File Reference

The file containing Chat Message logic. More...

#include "chatmessage.h"
#include <utility>

Macros

#define LOAD_BOOL(x)
 
#define LOAD_STRING(x)
 
#define WRITE_BOOL(x)
 
#define WRITE_STRING(x)
 
#define COMPARE(x)   lhs.x == rhs.x &&
 

Functions

bool operator== (const ChatMessage &lhs, const ChatMessage &rhs)
 

Variables

const std::unordered_map< std::string, ChatMessage::ClickEvent::ActionTypeACTION_TABLE
 Table for converting enum values to string.
 

Detailed Description

The file containing Chat Message logic.

Author
Lygaen
Version
0.1
Date
2023-12-16

Macro Definition Documentation

◆ LOAD_BOOL

#define LOAD_BOOL ( x)
Value:
if ((it = document.FindMember(#x)) != document.MemberEnd() && \
it->value.IsBool()) \
x = it->value.GetBool()
constexpr std::string_view type_name()
Gets the name of the type paramater.
Definition event.h:56

◆ LOAD_STRING

#define LOAD_STRING ( x)
Value:
if ((it = document.FindMember(#x)) != document.MemberEnd() && \
it->value.IsString()) \
x = std::string(it->value.GetString(), it->value.GetStringLength())

◆ WRITE_BOOL

#define WRITE_BOOL ( x)
Value:
if (x) \
document.AddMember(#x, rapidjson::Value(x), alloc)

◆ WRITE_STRING

#define WRITE_STRING ( x)
Value:
if (!x.empty()) \
document.AddMember(#x, rapidjson::Value(x.c_str(), x.length(), alloc), alloc)

Function Documentation

◆ operator==()

Parameters
lhsthe left-handside variable
rhsthe righ-handside variable
Returns
true the two variables are equal
false the two variables are not equal

Variable Documentation

◆ ACTION_TABLE

Initial value:
{
}
@ SUGGEST_COMMAND
Suggest command to user.
Definition chatmessage.h:117
@ CHANGE_PAGE
Change page (book only)
Definition chatmessage.h:122
@ RUN_COMMAND
Run command.
Definition chatmessage.h:112
@ OPEN_URL
Open URL.
Definition chatmessage.h:107
@ COPY_TO_CLIPBOARD
Copy text to clipboard.
Definition chatmessage.h:127

Table for converting enum values to string.