tools: simplify on/off attribute printing
refs #4004
Change-Id: Idb666ff4dbeddc37f1cb10710ba3d75f7fe8bdb5
diff --git a/tools/nfdc/format-helpers.hpp b/tools/nfdc/format-helpers.hpp
index c0f8fd1..0d131f1 100644
--- a/tools/nfdc/format-helpers.hpp
+++ b/tools/nfdc/format-helpers.hpp
@@ -165,6 +165,16 @@
std::ostream&
operator<<(std::ostream& os, const ItemAttributes::Attribute& attr);
+/** \brief print boolean as 'on' or 'off'
+ */
+struct OnOff
+{
+ bool flag;
+};
+
+std::ostream&
+operator<<(std::ostream& os, OnOff v);
+
namespace detail {
template<typename DurationT>