mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
SDK: Provide comparison operator for device and topo states
This commit is contained in:
committed by
Alexey Rybalchenko
parent
a6da208e79
commit
1140c4c6ab
@@ -92,6 +92,16 @@ enum class AggregatedTopologyState : int
|
||||
Mixed
|
||||
};
|
||||
|
||||
inline auto operator==(DeviceState lhs, AggregatedTopologyState rhs) -> bool
|
||||
{
|
||||
return static_cast<int>(lhs) == static_cast<int>(rhs);
|
||||
}
|
||||
|
||||
inline auto operator==(AggregatedTopologyState lhs, DeviceState rhs) -> bool
|
||||
{
|
||||
return static_cast<int>(lhs) == static_cast<int>(rhs);
|
||||
}
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& os, const AggregatedTopologyState& state)
|
||||
{
|
||||
if (state == AggregatedTopologyState::Mixed) {
|
||||
|
Reference in New Issue
Block a user