30#include "nexuslua_export.h"
49 class NEXUSLUA_EXPORT AgentMessage
66 AgentMessage(
const int agentN,
const AgentType& agentType,
const std::string& agentName,
const std::string& messageName,
const LuaTable::nested_tables& parameterDescriptions,
const std::string& displayName,
const std::string&
description,
const std::string& icon);
67 AgentMessage(
const int agentN,
const AgentType& agentType,
const std::string& agentName,
const std::string& messageName);
71 std::string _agentName;
72 std::string _messageName;
73 LuaTable::nested_tables _parameterDescriptions;
74 std::string _displayName;
75 std::string _description;
77 std::shared_ptr<Lua> _lua;
79 void Validate(
const LuaTable& parameterValues)
const;
LuaTable::nested_tables GetParameterDescriptions() const
return descriptions for each of the parameters of this message (may be empty, usually set for agents ...
AgentType GetAgentType() const
return the type of the agent that accepts this message (Lua or C++)
friend class AgentCpp
Definition agent_message.hpp:64
LuaTable::nested_tables GetDescriptionsOfUnsetParameters(const LuaTable ¶meterValues) const
convenience method. Returns only those descriptions of parameters that are not part of the given para...
std::string GetAgentName() const
return the name of the agent that accepts this message
std::string GetDescription() const
return a description of this message (may be empty, usually set for agents that are used as plugins,...
std::string GetDisplayName() const
return a display name of this message (may be empty, usually set for agents that are used as plugins,...
std::string GetMessageName() const
this message name is used by AgentMessage::Send
std::string GetIconPath() const
return the path to an icon that can be shown in a graphical user interface for this message (may be e...
void Send(const LuaTable ¶meters) const
completes values that are missing in parameters based on GetParameterDescriptions() with their defaul...
friend class Agent
Definition agent_message.hpp:63
Definition description.hpp:33
The nexuslua library is implemented inside this namespace.
AgentType
Definition agent_message.hpp:41
@ Lua
Definition agent_message.hpp:43
@ Cpp
Definition agent_message.hpp:44
@ Undefined
Definition agent_message.hpp:42
This type is used for the parameters of nexuslua::Message. In its serialized representation,...
Definition lua_table.hpp:54