FlowArithmeticCalculator 1.0.0
Flow Arithmetic Calculator
Loading...
Searching...
No Matches
BlocksConnectionSide.h
Go to the documentation of this file.
1#ifndef BUSINESS_LOGIC_ELEMENTS_BLOCKS_STRUCTURES_BLOCKS_CONNECTION_SIDE_H
2#define BUSINESS_LOGIC_ELEMENTS_BLOCKS_STRUCTURES_BLOCKS_CONNECTION_SIDE_H
3
5
6// forward declaration
8 class BaseBlock;
9}
10
16 // forward declaration
17 struct Port;
18
44
45 using PortsConnection = std::pair<BlocksConnectionSide, BlocksConnectionSide>;
46} // namespace business_logic::elements::structures
47
48namespace std {
52 template <>
53 struct hash<business_logic::elements::structures::BlocksConnectionSide> {
54 std::size_t operator()(
56 return std::hash<business_logic::elements::blocks::BaseBlock*>()(p.block) ^
57 (std::hash<const business_logic::elements::structures::Port*>()(p.port) << 1U);
58 }
59 };
60} // namespace std
61
62#endif // BUSINESS_LOGIC_ELEMENTS_BLOCKS_STRUCTURES_BLOCKS_CONNECTION_SIDE_H
The base class for all blocks, containing common functionality and members.
Definition BaseBlock.h:36
The base classes and structs for elements.
Abstract structures that constitute for the calculator GUI and are logical models of the rendered ent...
std::pair< BlocksConnectionSide, BlocksConnectionSide > PortsConnection
The business logic module.
STL namespace.
bool operator==(const BlocksConnectionSide &other) const
Equality operator.
business_logic::elements::blocks::BaseBlock * block
The block.
const business_logic::elements::structures::Port * port
The port.
Represents a port on a block.
Definition Port.h:11
std::size_t operator()(const business_logic::elements::structures::BlocksConnectionSide &p) const