15 newBlockChoiceDelegate,
16 blockLifecycleManagerDelegate,
24 .
block =
this, .port = theInputPort};
30 std::ostringstream oss;
34 oss << std::scientific
36 isHovered ? std::numeric_limits<FloatingPoint>::digits10
Delegate that manages the lifecycles of blocks.
virtual bool isInputConnected(const business_logic::elements::structures::BlocksConnectionSide &side) const =0
Checks if the input port is connected to anything.
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
virtual bool isHovered(int x, int y) const
Checks if the block is hovered over by the mouse.
const FloatingPoint & getPortValue(const structures::Port *port) const
Gets the value of the port.
static const std::vector< business_logic::elements::structures::Port > inputPorts
MonitorBlock(int cx, int cy, business_logic::delegate::INewBlockChoiceDelegate *newBlockChoiceDelegate, business_logic::delegate::IBlockLifecycleManagerDelegate *blockLifecycleManagerDelegate, business_logic::delegate::IWindowDelegate *windowDelegate)
Constructor.
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,...
constexpr int DEFAULT_VALUE_DISPLAY_PRECISION
The base classes and structs for elements.
The business logic module.
std::string stringifyAddressOf(const T *value)
Convert a pointer to a string in format "0x..." containing its hexadecimal address.
A side of a connection between two ports.
business_logic::elements::blocks::BaseBlock * block
The block.
Represents a port on a block.