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

ksmyth at redhat3.isis.vanderbilt.edu ksmyth at redhat3.isis.vanderbilt.edu
Wed Sep 21 10:29:50 CDT 2016


Author: ksmyth
Date: Wed Sep 21 10:29:50 2016
New Revision: 4382

Log:
Udm Python: add open that takes 2 args (what does metalocator mean when opening a IMgaProject). Add get_object_by_id

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

Modified: UDM/trunk/src/UdmPython/UdmPython.cpp
==============================================================================
--- UDM/trunk/src/UdmPython/UdmPython.cpp	Fri Jul 22 16:30:44 2016	(r4381)
+++ UDM/trunk/src/UdmPython/UdmPython.cpp	Wed Sep 21 10:29:50 2016	(r4382)
@@ -153,6 +153,11 @@
 	throw runtime_error("Unrecognized type for systemname");
 }
 
+void SDN_OpenExisting_2(Udm::SmartDataNetwork& self, object systemname) {
+    std::string metalocator = "";
+    SDN_OpenExisting(self, systemname, metalocator);
+}
+
 void SDN_CreateNew(Udm::SmartDataNetwork& self, const string &systemname, const string& metalocator, const Udm::Object rootclass) {
 	const Uml::Class& root = Uml::SafeTypeContainer::GetSafeType(Uml::Class::Cast(rootclass));
 	self.CreateNew(systemname, metalocator, root, Udm::CHANGES_LOST_DEFAULT);
@@ -925,7 +930,9 @@
 		.def("__new__", SDN_New, with_custodian_and_ward_postcall<2, 0>())
 		.staticmethod("__new__")
 		.def("open", SDN_OpenExisting)
+		.def("open", SDN_OpenExisting_2)
 		.def("create", SDN_CreateNew)
+		.def("get_object_by_id", &Udm::SmartDataNetwork::ObjectById)
 		.def("close_with_update", &Udm::SmartDataNetwork::CloseWithUpdate)
 		.def("close_no_update", &Udm::SmartDataNetwork::CloseNoUpdate)
 		.def("save_as", &Udm::SmartDataNetwork::SaveAs)


More information about the Mobies-commit mailing list