Switchboard Extension SDK
Loading...
Searching...
No Matches
Node.hpp
1//
2// Created by Balazs Kiss on 2025. 02. 23..
3//
4
5#pragma once
6
7#include <switchboard/export.h>
8#include <switchboard_core/SwitchboardObject.hpp>
9
10#include <map>
11#include <any>
12
13namespace switchboard {
14
15class SWITCHBOARDSDK_EXPORT Node : public SwitchboardObject {
16public:
17
25
31 const std::string& getType() const;
32
38 unsigned int getNumberOfInputs() const;
39
45 unsigned int getNumberOfOutputs() const;
46
47 // MARK: Overridden methods
48
49 Result<SBAny> getValue(const std::string &key) override;
50 Result<void> setValue(const std::string &key, const SBAny &value) override;
51 Result<SBAny> callAction(const std::string& actionName, const SBAnyMap& params) override;
52
53protected:
55 std::string type;
56
58 unsigned int numberOfInputs;
59
61 unsigned int numberOfOutputs;
62
64 std::string title;
65};
66
67}
unsigned int numberOfOutputs
The number of outputs (audio buses) for the node.
Definition Node.hpp:61
unsigned int numberOfInputs
The number of inputs (audio buses) for the node.
Definition Node.hpp:58
std::string type
The type of the node.
Definition Node.hpp:55
Result< void > setValue(const std::string &key, const SBAny &value) override
Sets a value on the object.
Result< SBAny > callAction(const std::string &actionName, const SBAnyMap &params) override
Calls an action on the object.
Node(uint numberOfInputs, uint numberOfOutputs)
Node constructor.
Result< SBAny > getValue(const std::string &key) override
Gets a value from the object.
const std::string & getType() const
Gets the type of the node.
unsigned int getNumberOfInputs() const
Gets the number of inputs for the node.
std::string title
The title of the node that can be displayed in the UI.
Definition Node.hpp:64
unsigned int getNumberOfOutputs() const
Gets the number of outputs for the node.
SwitchboardObject(const std::string &objectType)
SwitchboardObject constructor.