10#include <switchboard/export.h>
11#include <switchboard_core/EventEmitter.hpp>
12#include <switchboard/SBAny.hpp>
13#include <switchboard_core/SwitchboardCore.hpp>
14#include <switchboard_core/Configuration.hpp>
15#include <switchboard_core/Property.hpp>
16#include <switchboard_core/Action.hpp>
17#include <switchboard_core/Event.hpp>
23#include <switchboard/Result.hpp>
25namespace switchboard {
27namespace SwitchboardObjectType {
28 inline constexpr const char* SWITCHBOARD =
"switchboard";
29 inline constexpr const char* ENGINE =
"engine";
30 inline constexpr const char* GRAPH =
"graph";
31 inline constexpr const char* NODE =
"node";
32 inline constexpr const char* EXTENSION =
"extension";
117 virtual Result<void>
setValue(
const std::string& key,
const SBAny& value);
126 virtual Result<SBAny>
getValue(
const std::string& key);
136 virtual Result<SBAny>
callAction(
const std::string& actionName,
const SBAnyMap& params);
176 void registerEvent(
const std::string& eventName,
const SBAnyMap& eventInfo);
180 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.
void setConfigurationValue(const std::string &key, const SBAny &value)
Sets a configuration value for the object.
std::string getObjectType() const
Gets the type of the object.
std::optional< std::string > getObjectSubtype() const
Gets the subtype of the object.
SwitchboardObject(const std::string &objectType)
SwitchboardObject constructor.
void registerConfiguration(const std::string &key, const SBAnyMap &configuration)
Registers a configuration for the object.
void registerEvent(const std::string &eventName, const SBAnyMap &eventInfo)
Registers an event for the object.
void registerProperty(const std::string &key, const SBAnyMap &propertyInfo)
Registers a property for the object.
virtual Result< void > setValue(const std::string &key, const SBAny &value)
Sets a value on the object.
std::string getURI()
Gets the URI of the object.
std::string getObjectID() const
Gets the ID of the object.
virtual Result< SBAny > getValue(const std::string &key)
Gets a value from the object.
void registerAction(const std::string &key, const SBAnyMap &actionInfo)
Registers an action for the object.
SwitchboardObject * getParentObject() const
Gets the parent object of the object.
virtual Result< SBAny > callAction(const std::string &actionName, const SBAnyMap ¶ms)
Calls an action on the object.
void setObjectSubtype(std::optional< std::string > subtype)
Sets the subtype of the object.
void setParentObject(SwitchboardObject *parentObject)
Sets the parent object of the object.