[Mobies-commit] [commit] r3755 - UDM/trunk/src/UdmCliGen
ksmyth at redhat1.isis.vanderbilt.edu
ksmyth at redhat1.isis.vanderbilt.edu
Fri May 20 15:02:33 CDT 2011
Author: ksmyth
Date: Fri May 20 15:02:32 2011
New Revision: 3755
Log:
Cant cast to a concrete class, due to multiple inheritance (the backend will catch invalid ops). Add GmeId to MetaGME->Uml diagrams
Modified:
UDM/trunk/src/UdmCliGen/Implementation.tmpl
Modified: UDM/trunk/src/UdmCliGen/Implementation.tmpl
==============================================================================
--- UDM/trunk/src/UdmCliGen/Implementation.tmpl Wed May 18 10:02:13 2011 (r3754)
+++ UDM/trunk/src/UdmCliGen/Implementation.tmpl Fri May 20 15:02:32 2011 (r3755)
@@ -55,6 +55,7 @@
}
#end for
+## some debugging support
public ${fq_iname($c)} this_downcasted
{
get
@@ -91,6 +92,11 @@
#end for
#def accessors($c)
+## "MgaObject" from GReAT's MetaGME2UML
+#if $c.name == "MgaObject"
+ public string GmeId { get { return global::Udm.Native.UdmGme.UdmGme.UdmId2GmeId(this.id); } }
+#end if
+
${fq_iname($c)} ${fq_iname($c)}.archetype
{
get
@@ -159,7 +165,7 @@
set
{
if (value == null) backing.__impl().setParent(Udm.Native.Udm._null.__impl(), $meta_name);
- else backing.__impl().setParent((($fq_name($prole.target))value).backing.__impl(), $meta_name);
+ else backing.__impl().setParent((value as global::Udm.Native.UdmCliObject).backing.__impl(), $meta_name);
}
}
@@ -218,7 +224,7 @@
set
{
Udm.Native.Object_set set = new Udm.Native.Object_set();
- set.Add((($fq_name($retclass))value).backing);
+ set.Add((value as global::Udm.Native.UdmCliObject).backing);
backing.setAssociation($meta_name, set, $getAssocMode);
}
}
@@ -237,7 +243,7 @@
Udm.Native.Object_set set = new Udm.Native.Object_set();
foreach ($fq_iname($retclass) o in value)
{
- set.Add((($fq_name($retclass))o).backing);
+ set.Add((o as global::Udm.Native.UdmCliObject).backing);
}
backing.setAssociation($meta_name, set, $getAssocMode);
}
@@ -268,7 +274,7 @@
set
{
using (Udm.Native.Object_set set = new Udm.Native.Object_set()) {
- set.Add(((global::Udm.Native.UdmCliObject)value).backing);
+ set.Add((value as global::Udm.Native.UdmCliObject).backing);
backing.setAssociation($meta_name, set, Udm.Native.Udm.TARGETFROMCLASS);
}
}
More information about the Mobies-commit
mailing list