21#include "vreutil/delegate.h"
69 virtual const std::string&
type()
const = 0;
97 virtual void encode(
char* buffer,
int bufferSize);
Modern delegate class that can bind and invoke callables with any number of parameters.
Definition delegate.h:31
Reader class for decoding values from a byte array.
Definition byteStream.h:42
Writer class for encoding values into a byte array.
Definition byteStream.h:161
virtual void deserialize(DtStreamReader &reader)
Deserializes the message from a stream reader.
virtual const DtVreMessageId & messageId() const =0
Gets the message ID object.
double myDelay
Delay time in seconds before the message should be processed.
Definition vreMessage.h:192
virtual char * encode()
Encodes the message as an array of bytes and returns the bytes.
virtual bool isDelayed()
Checks if the message has remaining delay time.
virtual void setOriginatingApplicationId(UInt64 appId)
Sets the ID of the application that created this message.
UInt64 myApplicationId
ID of the application that created this message.
Definition vreMessage.h:195
UInt64 myVersion
Version number of this message.
Definition vreMessage.h:198
virtual const std::string & type() const =0
Gets the string name of the message type.
virtual void encode(char *buffer, int bufferSize)
Encodes the message into the given buffer of bytes.
virtual void setDelay(double delay)
Sets a delay in seconds before the message is dispatched.
virtual const UInt64 versionNumber() const
Gets the version number of this message.
virtual const UInt64 originatingApplicationId() const
Gets the ID of the application that created this message.
virtual ~DtVreMessage()
Virtual destructor.
virtual void serialize(DtStreamWriter &writer) const
Serializes the message to a stream writer.
virtual void reduceDelay(double dt)
Reduces the remaining delay time.
DtVreMessage()
Default constructor.
virtual int messageSize() const
Static decode function pattern for derived classes.
Message identifier class for the VREngage messaging system.
Definition vreMessageId.h:35
Defines export macros for the VREngage Message Manager library.
#define MESSAGEMANAGER_DLL
Export/import macro for non-Windows platforms.
Definition export.h:39
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
unsigned long long UInt64
Unsigned 64-bit integer type.
Definition utilFunctions.h:42
DtDelegate< DtVreMessageResult, DtVreMessage * > DtVreMessageDelegate
Delegate type for message handler callbacks.
Definition vreMessage.h:212
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
@ HANDLED
The handler processed the message; continue processing.
Definition vreMessage.h:35
@ EATEN
The handler processed the message; stop further processing.
Definition vreMessage.h:36
@ IGNORED
The handler did not process the message; continue processing.
Definition vreMessage.h:34
std::shared_ptr< DtVreMessage > DtVreMessagePtr
Shared pointer type for DtVreMessage objects.
Definition vreMessage.h:205
Provides common utility functions for the VREngage system.
Provides binary serialization and deserialization capabilities.
Defines message identifier class for the VREngage messaging system.