[Mobies-commit] [commit] r3694 - UDM/trunk/src/UdmPython

ksmyth at redhat1.isis.vanderbilt.edu ksmyth at redhat1.isis.vanderbilt.edu
Fri Apr 29 16:08:59 CDT 2011


Author: ksmyth
Date: Fri Apr 29 16:08:59 2011
New Revision: 3694

Log:
Expose CopyObjectHierarchy

Modified:
   UDM/trunk/src/UdmPython/UdmPython.cpp

Modified: UDM/trunk/src/UdmPython/UdmPython.cpp
==============================================================================
--- UDM/trunk/src/UdmPython/UdmPython.cpp	Fri Apr 29 16:08:19 2011	(r3693)
+++ UDM/trunk/src/UdmPython/UdmPython.cpp	Fri Apr 29 16:08:59 2011	(r3694)
@@ -3,6 +3,7 @@
 #include "Uml.h"
 #include "UmlExt.h"
 #include "UdmGme.h"
+#include "UdmUtil.h"
 
 #include "boost/python.hpp"
 #include "boost/python/slice.hpp"
@@ -453,6 +454,11 @@
 	return ret;
 }
 
+void CopyObjectHierarchy_(Udm::Object src, Udm::Object dst) {
+	UdmUtil::copy_assoc_map map;
+	UdmUtil::CopyObjectHierarchy(src.__impl(), dst.__impl(), dst.__impl()->__getdn(), map);
+}
+
 namespace {
 	class Object_access : Udm::Object {
 	public:
@@ -529,6 +535,9 @@
 
 	def("uml_diagram", Uml_Diagram);
 
+	def("CopyObjectHierarchy", &CopyObjectHierarchy_);
+
+
 	class_<Udm::SmartDataNetwork>("SmartDataNetwork", no_init) //, init<const Udm::UdmDiagram &>())
 		.def("__new__", SDN_New, with_custodian_and_ward_postcall<2, 0>())
 		.staticmethod("__new__")


More information about the Mobies-commit mailing list