Fresco/Berlin/include/Berlin KitImpl.hh,1.12,1.13

Tobias Hunger <[email protected]>
Newsgroups gmane.comp.video.fresco.cvs
Message-ID <[email protected]>
Update of /cvs/fresco/Fresco/Berlin/include/Berlin
In directory purcel:/tmp/cvs-serv9995/Berlin/include/Berlin

Modified Files:
	KitImpl.hh 
Log Message:
Cleanup the cleanup.

A new template create_and_set_body added to KitImpl. That gets us around the
need to define a temporary in most places, shortening the code even further.


Index: KitImpl.hh
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/include/Berlin/KitImpl.hh,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- KitImpl.hh	23 Jan 2003 22:31:01 -0000	1.12
+++ KitImpl.hh	25 Jan 2003 22:37:00 -0000	1.13
@@ -25,6 +25,7 @@
 #include <Prague/Sys/Tracer.hh>
 #include <Fresco/config.hh>
 #include <Fresco/Kit.hh>
+#include <Fresco/Graphic.hh>
 #include <Berlin/DefaultPOA.hh>
 
 class ServerImpl;
@@ -57,6 +58,14 @@
     {
 	activate(impl);
 	return impl->_this();
+    }
+
+    template <typename I, typename Im>
+    typename I::_ptr_type create_and_set_body(Im *impl, Fresco::Graphic_ptr g)
+    {           
+        activate(impl);
+	impl->body(g);
+        return impl->_this();
     }
 
 private:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.