From: dooglus Date: Tue, 23 Oct 2007 19:56:48 +0000 (+0000) Subject: Define set_string() for displaying the time values in a set when _DEBUG is defined. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=a352bbde7ba5f36efe3dbe21f119bc0981f8dcf7;p=synfig.git 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 --- 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