10#include <switchboard_core/EventEmitter.hpp>
11#include <switchboard_core/SwitchboardCore.hpp>
12#include <switchboard_core/Configuration.hpp>
13#include <switchboard_core/Property.hpp>
14#include <switchboard_core/Action.hpp>
15#include <switchboard_core/Event.hpp>
21#include <switchboard/Result.hpp>
23namespace switchboard {
25namespace SwitchboardObjectType {
26 inline constexpr const char* SWITCHBOARD =
"switchboard";
27 inline constexpr const char* ENGINE =
"engine";
28 inline constexpr const char* GRAPH =
"graph";
29 inline constexpr const char* NODE =
"node";
30 inline constexpr const char* EXTENSION =
"extension";
94 virtual Result<void>
setValue(
const std::string& key,
const std::any& value);
103 virtual Result<std::any>
getValue(
const std::string& key);
113 virtual Result<std::any>
callAction(
const std::string& actionName,
const std::map<std::string, std::any>& params);
137 void registerProperty(
const std::string& key,
const std::map<std::string, std::any>& propertyInfo);
145 void registerAction(
const std::string& key,
const std::map<std::string, std::any>& actionInfo);
153 void registerEvent(
const std::string& eventName,
const std::map<std::string, std::any>& eventInfo);
157 std::unique_ptr<Impl> impl;
EventEmitter()
Constructor for the EventEmitter class.
~SwitchboardObject() override
SwitchboardObject destructor.
void setObjectID(const std::string &objectID)
Sets the ID of the object.
std::string getObjectType() const
Gets the type of the object.
SwitchboardObject(const std::string &objectType)
SwitchboardObject constructor.
virtual Result< void > setValue(const std::string &key, const std::any &value)
Sets a value on the object.
void setConfigurationValue(const std::string &key, const std::any &value)
Sets a configuration value for the object.
void registerAction(const std::string &key, const std::map< std::string, std::any > &actionInfo)
Registers an action for the object.
std::string getObjectID() const
Gets the ID of the object.
void registerConfiguration(const std::string &key, const std::map< std::string, std::any > &configuration)
Registers a configuration for the object.
void registerEvent(const std::string &eventName, const std::map< std::string, std::any > &eventInfo)
Registers an event for the object.
void registerProperty(const std::string &key, const std::map< std::string, std::any > &propertyInfo)
Registers a property for the object.
virtual Result< std::any > callAction(const std::string &actionName, const std::map< std::string, std::any > ¶ms)
Calls an action on the object.
virtual Result< std::any > getValue(const std::string &key)
Gets a value from the object.
SwitchboardObject * getParentObject() const
Gets the parent object of the object.
void setParentObject(SwitchboardObject *parentObject)
Sets the parent object of the object.