19#include <vlpi/entityIdentifier.h>
21class DtRwLocationReference;
66 using ParameterMap = std::map<std::string, std::shared_ptr<ParameterBase>>;
85 virtual const std::string&
type()
const override;
102 template <
typename T>
132 DtASSERT(
typeid(T).hash_code() == (*findIt)->type,
"Incorrect template type used for getParameter");
133 return (*findIt)->value;
135 static T zeroValue();
142 auto param = std::make_shared<Parameter<T>>();
143 param->type =
typeid(T).hash_code();
#define DtASSERT(exp, description)
Primary assertion macro for runtime validation.
Definition assert.h:58
static makVre::DtVreMessageId theMessageId
Static message ID for this message type.
Definition localMessage.h:109
static const makVre::DtVreMessageId & theId()
virtual const std::string & type() const override
Get the name of the message type.
std::map< std::string, std::shared_ptr< ParameterBase > > ParameterMap
Type definition for parameter map.
Definition localMessage.h:66
static DtLocalMessage * create()
Creates a new instance of this message type.
static const std::string & theType()
virtual void setType(const std::string &type)
Used to define the message type.
DtVreMessageId myMessageId
Holds a type ID for this message.
Definition localMessage.h:118
ParameterMap myParameters
List of parameters for this message.
Definition localMessage.h:121
DtLocalMessage()
Protected constructor.
virtual const makVre::DtVreMessageId & messageId() const override
Gets the message ID object.
const T & getParameter(const std::string &name)
Return value of parameter with given name.
Definition localMessage.h:127
virtual ~DtLocalMessage() override
Virtual destructor.
void addParameter(const std::string &name, T data)
Adds an parameter to this message.
Definition localMessage.h:140
virtual const ParameterMap & parameterMap() const
Return const ref to parameter map.
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
Message identifier class for the VREngage messaging system.
Definition vreMessageId.h:35
Defines export macros for the VREngage Messages library.
#define VREMESSAGES_DLL
Export/import macro for non-Windows platforms.
Definition export.h:39
!
Definition glsVreMessageUtil.h:50
Base structure for script attributes.
Definition localMessage.h:46
Templated structure for typed script attributes.
Definition localMessage.h:57
T value
Value of the Parameter.
Definition localMessage.h:62
size_t type
Type hash for runtime type verification.
Definition localMessage.h:59
Defines the base class for all VREngage messages.
Defines message identifier class for the VREngage messaging system.