1#ifndef BUSINESS_LOGIC_ELEMENTS_IMPL_MONITOR_BLOCK_H
2#define BUSINESS_LOGIC_ELEMENTS_IMPL_MONITOR_BLOCK_H
46 [[maybe_unused]]
bool isHovered)
override;
78 const std::vector<business_logic::elements::structures::Port>&
getInputPorts()
86 const std::vector<business_logic::elements::structures::Port>&
getOutputPorts()
101 static const std::vector<business_logic::elements::structures::Port>
inputPorts;
106 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
virtual bool isHovered(int x, int y) const
Checks if the block is hovered over by the mouse.
business_logic::delegate::INewBlockChoiceDelegate * newBlockChoiceDelegate
business_logic::delegate::IWindowDelegate * windowDelegate
A monitor block that displays the value of its input port.
static const std::vector< business_logic::elements::structures::Port > inputPorts
const std::vector< business_logic::elements::structures::Port > & getInputPorts() const override
Gets the input ports of the block.
std::string getSelfId() const override
static const std::vector< business_logic::elements::structures::Port > outputPorts
std::optional< std::string > getValueToRenderAboveBlock(bool isHovered) override
Wrapper that gets the value of the output port above the block; if the input port is not connected,...
business_logic::elements::blocks::BlockType getBlockType() const override
Gets the type of the block.
static constexpr int MONITOR_BLOCK_WIDTH
static constexpr int MONITOR_BLOCK_HEIGHT
const std::vector< business_logic::elements::structures::Port > & getOutputPorts() const override
Gets the output ports of the block.
void calculateOutputValues() override
Calculates the output port values based on input port values.
The base classes and structs for elements.
BlockType
The available block types.