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 "NodeFactory.hpp"
11#include "SwitchboardObject.hpp"
12
13#include <string>
14
15namespace switchboard {
16
20class Extension : public SwitchboardObject {
21public:
22
27 Extension() : SwitchboardObject(SwitchboardObjectType::EXTENSION) {}
28
32 virtual ~Extension() = default;
33
41 virtual Result<void> initialize(const std::map<std::string, std::any>& config) {
42 return makeSuccess();
43 };
44
50 virtual Result<void> deinitialize() {
51 return makeSuccess();
52 };
53
59 virtual std::string getName() = 0;
60
67 virtual std::shared_ptr<NodeFactory> getNodeFactory() = 0;
68};
69
70}
virtual Result< void > initialize(const std::map< std::string, std::any > &config)
Initializes the extension.
Definition Extension.hpp:41
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.
Extension()
Constructor for the Extension class.
Definition Extension.hpp:27
virtual Result< void > deinitialize()
Deinitializes the extension.
Definition Extension.hpp:50