From a352bbde7ba5f36efe3dbe21f119bc0981f8dcf7 Mon Sep 17 00:00:00 2001 From: dooglus Date: Tue, 23 Oct 2007 19:56:48 +0000 Subject: [PATCH] Define set_string() for displaying the time values in a set when _DEBUG is defined. git-svn-id: http://svn.voria.com/code@950 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/node.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/synfig-core/trunk/src/synfig/node.h b/synfig-core/trunk/src/synfig/node.h index d60d7d7..85ad5eb 100644 --- a/synfig-core/trunk/src/synfig/node.h +++ b/synfig-core/trunk/src/synfig/node.h @@ -247,6 +247,32 @@ guid_cast(const synfig::GUID& guid) return etl::handle::cast_dynamic(synfig::find_node(guid)); } +#ifdef _DEBUG +template +synfig::String set_string(T start, T end) +{ + synfig::String ret("["); + bool started = false; + + while (start != end) + { + if (started) ret += ", "; + else started = true; + + ret += synfig::String((*start).c_str()); + start++; + } + + return ret + "]"; +} + +template +synfig::String set_string(T set) +{ + return set_string(set.begin(), set.end()); +} +#endif // _DEBUG + typedef etl::handle NodeHandle; }; // END of namespace synfig -- 2.7.4