generated from Persson-dev/Godot-Xmake
add packet declare syntax check
This commit is contained in:
@@ -14,13 +14,19 @@ namespace protocol {
|
|||||||
*/
|
*/
|
||||||
enum class PacketSenderType {
|
enum class PacketSenderType {
|
||||||
/** Sent by clients and server */
|
/** Sent by clients and server */
|
||||||
Both,
|
Both = 1,
|
||||||
/** Sent by clients to the server */
|
/** Sent by clients to the server */
|
||||||
Client,
|
Client,
|
||||||
/** Sent by server to the clients */
|
/** Sent by server to the clients */
|
||||||
Server,
|
Server,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class PacketSendType {
|
||||||
|
Reliable = 1,
|
||||||
|
Unreliable,
|
||||||
|
UnreliableOrdered,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \def DeclareAllPacket
|
* \def DeclareAllPacket
|
||||||
|
|||||||
@@ -14,5 +14,9 @@ void packets::ConcretePacket<PT, Data>::Accept(PacketVisitor& a_Visitor) const {
|
|||||||
a_Visitor.Visit(*this);
|
a_Visitor.Visit(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define DeclarePacket(PacketName, packetSendType, packetSenderType) static_assert(static_cast<unsigned>(PacketSendType::packetSendType) && static_cast<unsigned>(PacketSenderType::packetSenderType));
|
||||||
|
|
||||||
|
DeclareAllPacket()
|
||||||
|
|
||||||
} // namespace protocol
|
} // namespace protocol
|
||||||
} // namespace blitz
|
} // namespace blitz
|
||||||
|
|||||||
Reference in New Issue
Block a user