nexuslua
Loading...
Searching...
No Matches
nexuslua::Agent Class Referenceabstract

base class of the three types of agents More...

#include <agent.hpp>

Public Member Functions

 Agent (const std::shared_ptr< agents > &agents)
virtual ~Agent ()
virtual std::string GetName () const =0
 return the name of the agent
virtual std::filesystem::path GetInstallFolder () const
 if this agent is installed as a plugin, return its installation folder, otherwise an empty string
virtual std::filesystem::path GetPersistentFolder () const
 if this agent is installed as a plugin, return the sub folder inside the installation folder that persists during updates, otherwise an empty string
virtual std::string GetVersionOnline () const
 if this agent is installed as a plugin, return the online version, otherwise an empty string
virtual std::string GetVersionInstalled () const
 if this agent is installed as a plugin, return its installed version, otherwise an empty string
virtual bool IsFreeware () const
 if this agent is installed as a plugin, return if it is freeware, otherwise false
virtual std::string GetUrlHelp () const
 if this agent is installed as a plugin, return the URL that contains help about it, otherwise an empty string
virtual std::string GetUrlDownload () const
 if this agent is installed as a plugin, return its download URL, otherwise an empty string
virtual std::string GetUrlLicense () const
 if this agent is installed as a plugin, return an URL with license information, otherwise an empty string
virtual std::string GetUrlPurchase () const
 if this agent is installed as a plugin, return an URL where you can purchase a license, otherwise an empty string
virtual std::string GetLicensee () const
 if this agent is installed as a plugin and a license file has been installed, return the licensee, otherwise an empty string
virtual const std::map< std::string, AgentMessage > & GetMessages () const
 return a reference to all of the messages this agent supports, using the message name as key
virtual const AgentMessageGetMessage (const std::string &messageName) const
 return the message with the given name that this agent accepts
int GetId () const
 returns a unique ID of this agent
ConfigurationGetConfiguration ()
std::shared_ptr< agentsGetAgents ()

Protected Member Functions

void Start (const std::filesystem::path &luaPath, const std::string &luaCode)
void Start (const CppHandler &cppHandler)
virtual void AddMessage (const std::string &messageName, const LuaTable::nested_tables &parameterDescriptions, const std::string &displayName, const std::string &description, const std::string &icon)
friend void::nexuslua::LuaExtension::AddMessage (Agent *agent, const std::string &luaPath, const std::string &messageName, const LuaTable &parameters)

Protected Attributes

std::map< std::string, AgentMessage_messages

Detailed Description

base class of the three types of agents

These types are AgentCpp, AgentLua and AgentPlugin, but these classes do not need to be part of the public interface.

Constructor & Destructor Documentation

◆ Agent()

nexuslua::Agent::Agent ( const std::shared_ptr< agents > & agents)

◆ ~Agent()

virtual nexuslua::Agent::~Agent ( )
virtual

Member Function Documentation

◆ AddMessage()

virtual void nexuslua::Agent::AddMessage ( const std::string & messageName,
const LuaTable::nested_tables & parameterDescriptions,
const std::string & displayName,
const std::string & description,
const std::string & icon )
protectedvirtual

◆ GetAgents()

std::shared_ptr< agents > nexuslua::Agent::GetAgents ( )

◆ GetConfiguration()

Configuration & nexuslua::Agent::GetConfiguration ( )

◆ GetId()

int nexuslua::Agent::GetId ( ) const

returns a unique ID of this agent

◆ GetInstallFolder()

virtual std::filesystem::path nexuslua::Agent::GetInstallFolder ( ) const
virtual

if this agent is installed as a plugin, return its installation folder, otherwise an empty string

◆ GetLicensee()

virtual std::string nexuslua::Agent::GetLicensee ( ) const
virtual

if this agent is installed as a plugin and a license file has been installed, return the licensee, otherwise an empty string

◆ GetMessage()

virtual const AgentMessage & nexuslua::Agent::GetMessage ( const std::string & messageName) const
virtual

return the message with the given name that this agent accepts

◆ GetMessages()

virtual const std::map< std::string, AgentMessage > & nexuslua::Agent::GetMessages ( ) const
virtual

return a reference to all of the messages this agent supports, using the message name as key

◆ GetName()

virtual std::string nexuslua::Agent::GetName ( ) const
pure virtual

return the name of the agent

◆ GetPersistentFolder()

virtual std::filesystem::path nexuslua::Agent::GetPersistentFolder ( ) const
virtual

if this agent is installed as a plugin, return the sub folder inside the installation folder that persists during updates, otherwise an empty string

◆ GetUrlDownload()

virtual std::string nexuslua::Agent::GetUrlDownload ( ) const
virtual

if this agent is installed as a plugin, return its download URL, otherwise an empty string

◆ GetUrlHelp()

virtual std::string nexuslua::Agent::GetUrlHelp ( ) const
virtual

if this agent is installed as a plugin, return the URL that contains help about it, otherwise an empty string

◆ GetUrlLicense()

virtual std::string nexuslua::Agent::GetUrlLicense ( ) const
virtual

if this agent is installed as a plugin, return an URL with license information, otherwise an empty string

◆ GetUrlPurchase()

virtual std::string nexuslua::Agent::GetUrlPurchase ( ) const
virtual

if this agent is installed as a plugin, return an URL where you can purchase a license, otherwise an empty string

◆ GetVersionInstalled()

virtual std::string nexuslua::Agent::GetVersionInstalled ( ) const
virtual

if this agent is installed as a plugin, return its installed version, otherwise an empty string

◆ GetVersionOnline()

virtual std::string nexuslua::Agent::GetVersionOnline ( ) const
virtual

if this agent is installed as a plugin, return the online version, otherwise an empty string

◆ IsFreeware()

virtual bool nexuslua::Agent::IsFreeware ( ) const
virtual

if this agent is installed as a plugin, return if it is freeware, otherwise false

◆ Start() [1/2]

void nexuslua::Agent::Start ( const CppHandler & cppHandler)
protected

◆ Start() [2/2]

void nexuslua::Agent::Start ( const std::filesystem::path & luaPath,
const std::string & luaCode )
protected

◆ void::nexuslua::LuaExtension::AddMessage()

nexuslua::Agent::void::nexuslua::LuaExtension::AddMessage ( Agent * agent,
const std::string & luaPath,
const std::string & messageName,
const LuaTable & parameters )
protected

Member Data Documentation

◆ _messages

std::map<std::string, AgentMessage> nexuslua::Agent::_messages
protected

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