1#ifndef BUSINESS_LOGIC_ELEMENTS_IMPL_CONSTANT_BLOCK_H
2#define BUSINESS_LOGIC_ELEMENTS_IMPL_CONSTANT_BLOCK_H
74 const std::vector<business_logic::elements::structures::Port>&
getInputPorts()
82 const std::vector<business_logic::elements::structures::Port>&
getOutputPorts()
97 static const std::vector<business_logic::elements::structures::Port>
inputPorts;
102 static const std::vector<business_logic::elements::structures::Port>
outputPorts;
Class that provides a logger for the given class; automatically deduces the logger.
Delegate that manages the lifecycles of blocks.
Delegate that is notified when a new block is chosen to be added to the canvas.
The delegate for the window.
The base class for all blocks, containing common functionality and members.
business_logic::delegate::IBlockLifecycleManagerDelegate * blockLifecycleManagerDelegate
std::shared_ptr< spdlog::logger > logger
business_logic::delegate::INewBlockChoiceDelegate * newBlockChoiceDelegate
business_logic::delegate::IWindowDelegate * windowDelegate
A constant block that holds a constant value (scalar)
static const std::vector< business_logic::elements::structures::Port > inputPorts
const std::vector< business_logic::elements::structures::Port > & getOutputPorts() const override
Gets the output ports of the block.
static constexpr int CONSTANT_BLOCK_HEIGHT
business_logic::elements::blocks::BlockType getBlockType() const override
Gets the type of the block.
void calculateOutputValues() override
Calculates the output port values based on input port values.
void onDoubleClick(int x, int y) override
Called when the element is double-clicked.
const std::vector< business_logic::elements::structures::Port > & getInputPorts() const override
Gets the input ports of the block.
static const std::vector< business_logic::elements::structures::Port > outputPorts
static constexpr int CONSTANT_BLOCK_WIDTH
std::string getSelfId() const override
Interface for elements that can be double-clicked.
The base classes and structs for elements.
BlockType
The available block types.