3es  0.7
tes::CategoryNameMessage Struct Reference

Category name message. More...

#include <3esmessages.h>

Public Types

enum  { MessageId = CMIdName }
 ID for this message.
 

Public Member Functions

bool read (PacketReader &reader, char *nameBuffer, size_t nameBufferSize)
 Read message content. More...
 
bool write (PacketWriter &writer) const
 Write this message to writer. More...
 

Public Attributes

uint16_t categoryId
 Identifies the category for the message.
 
uint16_t parentId
 The (new) parent category for categoryId. Zero for none.
 
uint16_t defaultActive
 Default categoryId to active? Non zero for yes (1).
 
uint16_t nameLength
 Number of bytes in name, excluding a null terminator.
 
const char * name
 The name string without a null terminator. More...
 

Detailed Description

Category name message.

Member Function Documentation

◆ read()

bool tes::CategoryNameMessage::read ( PacketReader reader,
char *  nameBuffer,
size_t  nameBufferSize 
)
inline

Read message content.

Parameters
readerThe stream to read from.
Returns
True on success, false if there is an issue with amount of data available.

References tes::PacketReader::readElement(), and tes::PacketReader::readRaw().

◆ write()

bool tes::CategoryNameMessage::write ( PacketWriter writer) const
inline

Write this message to writer.

Parameters
writerThe target buffer.
Returns
True on success.

References tes::PacketWriter::writeElement(), and tes::PacketWriter::writeRaw().

Member Data Documentation

◆ name

const char* tes::CategoryNameMessage::name

The name string without a null terminator.

Must be exactly nameLength bytes.


The documentation for this struct was generated from the following file: