AlgoTestDriverBase - AlgoState << operator

This commit is contained in:
John Colvin committed 2020-05-12 19:03:53 -05:00
1 parent 26693a4c98
commit 19e74c30f8
1 file changed
+13
@@ -159,4 +159,17 @@ struct AlgoTestDriver : public AlgoTestDriverBase
const Algo& algo() const { return _algo; }
};
inline std::ostream& operator <<(std::ostream& ostr, const AlgoState& state) {
switch (state) {
case AlgoState::CREATED: ostr << "CREATED"; break;
case AlgoState::READY: ostr << "READY"; break;
case AlgoState::RUNNING: ostr << "RUNNING"; break;
case AlgoState::CANCELED: ostr << "CANCELED"; break;
case AlgoState::TERMINATED: ostr << "TERMINATED"; break;
case AlgoState::COMPLETED: ostr << "COMPLETED"; break;
default: ostr << "AlgoState_" << static_cast<int>(state); break;
}
return ostr;
}
}}}//namespace