Switchboard Extension SDK
Loading...
Searching...
No Matches
Extension.hpp
1//
2// Extension.hpp
3// SwitchboardSDK
4//
5// Created by Balazs Kiss on 30/08/2024.
6//
7
8#pragma once
9
10#include <string>
11#include <switchboard/export.h>
12#include <switchboard_core/NodeFactory.hpp>
13#include <switchboard_core/SwitchboardObject.hpp>
14
15namespace switchboard {
16
20class SWITCHBOARDSDK_EXPORT Extension : public SwitchboardObject {
21public:
27 static SBAnyMap getObjectTypeInfo() {
28 return {};
29 }
30
36
40 virtual ~Extension() = default;
41
49 virtual Result<void> initialize(const SBAnyMap& config) {
50 return makeSuccess();
51 }
52
58 virtual Result<void> deinitialize() {
59 return makeSuccess();
60 }
61
67 virtual std::string getName() = 0;
68
74 virtual std::string getDescription() = 0;
75
82 virtual std::shared_ptr<NodeFactory> getNodeFactory() = 0;
83};
84
85}
static SBAnyMap getObjectTypeInfo()
Static type-info fragment for the abstract Extension base. Empty by design — Extension itself contrib...
Definition Extension.hpp:27
virtual std::shared_ptr< NodeFactory > getNodeFactory()=0
Gets the NodeFactory object of the extension.
virtual std::string getName()=0
Gets the name of the extension.
virtual ~Extension()=default
Destructor.
virtual Result< void > initialize(const SBAnyMap &config)
Initializes the extension.
Definition Extension.hpp:49
Extension()
Constructor for the Extension class.
Definition Extension.hpp:35
virtual Result< void > deinitialize()
Deinitializes the extension.
Definition Extension.hpp:58
virtual std::string getDescription()=0
Gets a human-readable description of the extension.
SwitchboardObject(const std::string &objectType)
SwitchboardObject constructor.
Identifiers for the kind of Switchboard object.
Definition ObjectTypeInfo.hpp:14