Revision: 2267
          http://synfig.svn.sourceforge.net/synfig/?rev=2267&view=rev
Author:   dooglus
Date:     2008-11-25 01:21:58 +0000 (Tue, 25 Nov 2008)

Log Message:
-----------
Define CanvasParser::show_canvas_map() when _DEBUG is defined.

Modified Paths:
--------------
    synfig-core/trunk/src/synfig/loadcanvas.cpp
    synfig-core/trunk/src/synfig/loadcanvas.h

Modified: synfig-core/trunk/src/synfig/loadcanvas.cpp
===================================================================
--- synfig-core/trunk/src/synfig/loadcanvas.cpp 2008-11-25 01:21:38 UTC (rev 
2266)
+++ synfig-core/trunk/src/synfig/loadcanvas.cpp 2008-11-25 01:21:58 UTC (rev 
2267)
@@ -2128,6 +2128,24 @@
        
canvas->signal_file_name_changed().connect(sigc::bind(sigc::ptr_fun(_canvas_file_name_changed),canvas.get()));
 }
 
+#ifdef _DEBUG
+void
+CanvasParser::show_canvas_map(String file, int line, String text)
+{
+       return;
+       printf("  .-----\n  |  %s:%d %s\n", file.c_str(), line, text.c_str());
+       std::map<synfig::String, etl::loose_handle<Canvas> > 
canvas_map(synfig::get_open_canvas_map());
+       std::map<synfig::String, etl::loose_handle<Canvas> >::iterator iter;
+       for (iter = canvas_map.begin(); iter != canvas_map.end(); iter++)
+       {
+               synfig::String first(iter->first);
+               etl::loose_handle<Canvas> second(iter->second);
+               printf("  |    %40s : %lx (%d)\n", first.c_str(), 
ulong(&*second), second->count());
+       }
+       printf("  `-----\n\n");
+}
+#endif // _DEBUG
+
 Canvas::Handle
 CanvasParser::parse_from_file_as(const String &file_,const String &as_,String 
&errors)
 {

Modified: synfig-core/trunk/src/synfig/loadcanvas.h
===================================================================
--- synfig-core/trunk/src/synfig/loadcanvas.h   2008-11-25 01:21:38 UTC (rev 
2266)
+++ synfig-core/trunk/src/synfig/loadcanvas.h   2008-11-25 01:21:58 UTC (rev 
2267)
@@ -121,6 +121,10 @@
 
        static void register_canvas_in_map(Canvas::Handle canvas, String as);
 
+#ifdef _DEBUG
+       static void show_canvas_map(String file, int line, String text);
+#endif // _DEBUG
+
        //! \todo writeme
        Canvas::Handle parse_from_file_as(const String &filename,const String 
&as,String &errors);
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Synfig-devl mailing list
Synfig-devl@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to