|
Capycore Engine
0.1.0
A simple and lightweight game engine written in C++ based on the Unity API architecture.
|
Represents either a default or custom message identifier. More...
#include <network_message.h>
Public Types | |
| enum class | Kind : uint8_t { Default , Custom } |
Public Member Functions | |
| MessageType ()=default | |
| MessageType (DefaultMessageTypes t) | |
| MessageType (CustomMessageTypes t) | |
| MessageType (Kind kind, uint16_t t) | |
| bool | operator< (const MessageType &other) const |
| Strict ordering operator for use in associative containers. | |
Static Public Member Functions | |
| static uint16_t | to_raw (const MessageType &type) |
| Packs a MessageType into a 16-bit integer. | |
| static MessageType | from_raw (uint16_t raw) |
| Restores a MessageType from a raw 16-bit value. | |
Public Attributes | |
| Kind | kind |
| uint16_t | value |
Represents either a default or custom message identifier.
MessageType encodes both the message category (Default/Custom) and the underlying 15-bit value. When serialized, the high bit is used to represent whether the type is custom or default.
|
strong |
|
default |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Restores a MessageType from a raw 16-bit value.
Top bit → Kind::Custom. Lowest 15 bits → type value.
|
inline |
Strict ordering operator for use in associative containers.
|
inlinestatic |
Packs a MessageType into a 16-bit integer.
The highest bit indicates whether the type is custom.
| Kind MessageType::kind |
| uint16_t MessageType::value |