|
| Message () |
| Constructs a new Message instance.
|
|
| Message (uint32_t id, const Message &message) |
| Constructs a Message instance that borrows the MemoryBuffer owned by the message passed to this function.
|
|
| Message (const Message &src)=delete |
|
uint32_t | getID () const |
|
| MemoryBuffer (MemBlockType type) |
|
| MemoryBuffer (size_t size, MemBlockType type) |
|
| MemoryBuffer (size_t size, bool onlyReserve=false, MemBlockType type=MemBlockType::Block) |
|
| MemoryBuffer (Allocator *allocator, MemBlockType type=MemBlockType::Block) |
|
| MemoryBuffer (size_t size, Allocator *allocator, MemBlockType type=MemBlockType::Block) |
|
| MemoryBuffer (const void *memory, size_t size) |
|
| MemoryBuffer (MemoryBuffer &&other) noexcept |
|
MemoryBuffer & | operator= (MemoryBuffer &&other) noexcept |
|
| MemoryBuffer (const MemoryBuffer &)=delete |
|
MemoryBuffer & | operator= (const MemoryBuffer &)=delete |
|
void | changeType (MemBlockType newType) |
|
void | reset (size_t size, Allocator *allocator) |
|
bool | resize (size_t size, bool keep=true, bool forceRealloc=false) |
|
bool | reserve (size_t size) |
|
void | copy (const MemoryBuffer &other) |
|
void | clear () |
|
void * | data () |
|
const void * | data () const |
|
void * | dataFromPos () |
|
const void * | dataFromPos () const |
|
size_t | size () const |
|
bool | empty () const |
|
void * | grow (size_t bytes) |
|
void | swap (MemoryBuffer &other) |
|
const Allocator * | getAllocator () const |
|
size_t | read (void *buffer, size_t noofbytes) |
|
uint8_t | read8 () |
|
uint16_t | read16 () |
|
uint32_t | read32 () |
|
uint64_t | read64 () |
|
float | readFloat () |
|
double | readDouble () |
|
glm::vec2 | readFloat2 () |
|
glm::vec3 | readFloat3 () |
|
glm::vec4 | readFloat4 () |
|
glm::quat | readQuaternion () |
|
glm::mat4 | readMatrix () |
|
std::string | readString () |
|
bool | write (const void *buffer, size_t noofbytes) |
|
bool | write8 (uint8_t value) |
|
bool | write16 (uint16_t value) |
|
bool | write32 (uint32_t value) |
|
bool | write64 (uint64_t value) |
|
bool | writeFloat (float value) |
|
bool | writeDouble (double value) |
|
bool | writeFloat2 (const glm::vec2 &value) |
|
bool | writeFloat3 (const glm::vec3 &value) |
|
bool | writeFloat4 (const glm::vec4 &value) |
|
bool | writeQuaternion (const glm::quat &value) |
|
bool | writeMatrix (const glm::mat4 &value) |
|
bool | writeString (const StringView &str) |
|
void | seek (int64_t offset, Anchor from) |
|
size_t | pos () const |
|
size_t | unreadSize () const |
|
bool | areContentsEqual (const MemoryBuffer &rhs) const |
|
Definition at line 12 of file Message.h.
Cogs::Network::Message::Ptr Cogs::Network::Message::allocate |
( |
uint32_t |
id | ) |
|
|
static |
void Cogs::Network::Message::deleteMessage |
( |
Message * |
message | ) |
|
|
staticprivate |
Deleter function called by shared_ptr when the last reference to message is destroyed.
This function returns the message object to the pool for reuse. The message destructor will not be called to ensure memory allocated for message payloads is retained and reused. *============================================================================================
Definition at line 68 of file Message.cpp.
Referenced by allocate().