[Mobies-commit] [commit] r3685 - UDM/trunk/include

ksmyth at redhat1.isis.vanderbilt.edu ksmyth at redhat1.isis.vanderbilt.edu
Mon Mar 28 14:20:38 CDT 2011


Author: ksmyth
Date: Mon Mar 28 14:20:38 2011
New Revision: 3685

Log:
Take an IntPtr for LPUNKNOWN project instead of an int

Modified:
   UDM/trunk/include/UdmGme.i

Modified: UDM/trunk/include/UdmGme.i
==============================================================================
--- UDM/trunk/include/UdmGme.i	Mon Mar 28 14:20:09 2011	(r3684)
+++ UDM/trunk/include/UdmGme.i	Mon Mar 28 14:20:38 2011	(r3685)
@@ -20,6 +20,21 @@
 
 %include "UdmGme.h"
 
+%define %cs_custom_cast(TYPE, CSTYPE)
+%typemap(ctype) TYPE, TYPE& "void*"
+%typemap(in) TYPE  %{ $1 = (TYPE)$input; %} 
+%typemap(in) TYPE& %{ $1 = (TYPE*)&$input; %} 
+%typemap(imtype, out="CSTYPE") TYPE, TYPE& "CSTYPE" 
+%typemap(cstype, out="CSTYPE") TYPE, TYPE& "CSTYPE" 
+%typemap(csin) TYPE, TYPE& "$csinput"
+%typemap(csdirectorin) TYPE, TYPE& "$iminput"
+%enddef
+
+struct IUnknown;
+typedef IUnknown *LPUNKNOWN;
+%cs_custom_cast(LPUNKNOWN, IntPtr)
+
+
 %{
 Udm::UdmDiagram UdmDiagram_Wrap(Uml::Diagram* umld);
 namespace UdmGme {
@@ -28,8 +43,8 @@
    Udm::UdmDiagram diagram;
    public:
    GmeDataNetwork dn;
-   GmeDN_Wrapper(Uml::Diagram d, int pUnknownProject, bool customTransactions) : uml_diagram(d), diagram(UdmDiagram_Wrap(&uml_diagram)), dn(diagram) {
-      dn.OpenExisting((LPUNKNOWN) pUnknownProject, Udm::CHANGES_LOST_DEFAULT, customTransactions);
+   GmeDN_Wrapper(Uml::Diagram d, LPUNKNOWN pUnknownProject, bool customTransactions) : uml_diagram(d), diagram(UdmDiagram_Wrap(&uml_diagram)), dn(diagram) {
+      dn.OpenExisting(pUnknownProject, Udm::CHANGES_LOST_DEFAULT, customTransactions);
    }
    GmeDataNetwork& _getDN() { return dn; }
 };
@@ -41,8 +56,8 @@
    Udm::UdmDiagram diagram;
    GmeDataNetwork& dn;
    public:
-   GmeDN_Wrapper(Uml::Diagram d, int pUnknownProject, bool customTransactions) : uml_diagram(d), diagram(UdmDiagram_Wrap(&uml_diagram)), dn(diagram) {
-      dn.OpenExisting((LPUNKNOWN) pUnknownProject, Udm::CHANGES_LOST_DEFAULT, customTransactions);
+   GmeDN_Wrapper(Uml::Diagram d, LPUNKNOWN pUnknownProject, bool customTransactions) : uml_diagram(d), diagram(UdmDiagram_Wrap(&uml_diagram)), dn(diagram) {
+      dn.OpenExisting(pUnknownProject, Udm::CHANGES_LOST_DEFAULT, customTransactions);
    }
    GmeDataNetwork& _getDN() { return dn; }
 };


More information about the Mobies-commit mailing list