From baf232379877b63fc36cdfd1065b9ab366fb390c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 9 Feb 2022 10:07:54 -0700 Subject: [PATCH] add PBD::PropertyChange::dump (std::ostream&) to make it easier to see what changed --- libs/pbd/pbd/property_basics.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/pbd/pbd/property_basics.h b/libs/pbd/pbd/property_basics.h index da064c90a9..68b9bf2619 100644 --- a/libs/pbd/pbd/property_basics.h +++ b/libs/pbd/pbd/property_basics.h @@ -24,6 +24,7 @@ #include #include #include +#include #include "pbd/libpbd_visibility.h" #include "pbd/xml++.h" @@ -79,6 +80,8 @@ public: void add (PropertyID id) { insert (id); } void add (const PropertyChange& other) { insert (other.begin (), other.end ()); } template void add (PropertyDescriptor p); + + void dump (std::ostream& out) const { int n = 0; for (auto const & what_changed : *this) { if (n > 0) { out << ',' ; } out << g_quark_to_string (what_changed); ++n; } } }; /** Base (non template) part of Property