3es  0.7
tes::CreateMessage Struct Reference

Defines an object creation message. More...

#include <3esmessages.h>

Public Types

enum  { MessageId = OIdCreate }
 ID for this message.
 

Public Member Functions

bool read (PacketReader &reader)
 Read message content. More...
 
bool write (PacketWriter &writer) const
 Write this message to writer. More...
 

Public Attributes

uint32_t id
 Id of the object to create. Zero for transient objects.
 
uint16_t category
 Object categorisation. Used to control visibility.
 
uint16_t flags
 Flags controlling the appearance and creation of the object.
 
uint16_t reserved
 Reserved for future use.
 
ObjectAttributes attributes
 Initial transformation and colour.
 

Detailed Description

Defines an object creation message.

This is the message header and the type specific payload follows.

Member Function Documentation

◆ read()

bool tes::CreateMessage::read ( PacketReader reader)
inline

Read message content.

Crc should have been validated already

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

References tes::ObjectAttributes::read(), and tes::PacketReader::readElement().

◆ write()

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

Write this message to writer.

Parameters
writerThe target buffer.
Returns
True on success.

References tes::ObjectAttributes::write(), and tes::PacketWriter::writeElement().


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