Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF C++ runtime support?
EMF C++ runtime support? [message #416454] Fri, 01 February 2008 14:36 Go to next message
Jose Hernandez is currently offline Jose HernandezFriend
Messages: 46
Registered: July 2009
Member
Does anyone know if there is any such thing as a version of the EMF runtime
for C++?

Regards,
Jose
Re: EMF C++ runtime support? [message #416456 is a reply to message #416454] Fri, 01 February 2008 15:29 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33139
Registered: July 2009
Senior Member
Jose,

I'm not aware of specifics, but I do recall someone telling me a few
years back about their organizations's effort in this regard.


Jose Hernandez wrote:
> Does anyone know if there is any such thing as a version of the EMF runtime
> for C++?
>
> Regards,
> Jose
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF C++ runtime support? [message #416457 is a reply to message #416456] Fri, 01 February 2008 16:32 Go to previous messageGo to next message
Jose Hernandez is currently offline Jose HernandezFriend
Messages: 46
Registered: July 2009
Member
Thanks Ed.

I will be interested to know if anyone reading this thread can offer any
hints as to how one might go about creating an C++ EMF runtime.

Jose

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fnvdsr$nga$1@build.eclipse.org...
>
> I'm not aware of specifics, but I do recall someone telling me a few years
> back about their organizations's effort in this regard.
>
> Jose Hernandez wrote:
>> Does anyone know if there is any such thing as a version of the EMF
>> runtime for C++?
Re: EMF C++ runtime support? [message #416458 is a reply to message #416457] Fri, 01 February 2008 17:13 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33139
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000405090002060504000600
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Jose,

The EMF4Net guys did it for C# but that's a lot easier given how much C#
is like Java:
<http://www.eclipse.org/modeling/emft/?project=emf4net>

http://www.eclipse.org/modeling/emft/?project=emf4net

I hope someone response to you query as well. I'd be very interested!


Jose Hernandez wrote:
> Thanks Ed.
>
> I will be interested to know if anyone reading this thread can offer any
> hints as to how one might go about creating an C++ EMF runtime.
>
> Jose
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:fnvdsr$nga$1@build.eclipse.org...
>
>> I'm not aware of specifics, but I do recall someone telling me a few years
>> back about their organizations's effort in this regard.
>>
>> Jose Hernandez wrote:
>>
>>> Does anyone know if there is any such thing as a version of the EMF
>>> runtime for C++?
>>>
>
>
>


--------------000405090002060504000600
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Jose,<br>
<br>
The EMF4Net guys did it for C# but that's a lot easier given how much
C# is like Java:<a
href="http://www.eclipse.org/modeling/emft/?project=emf4net"><br>
</a>
<blockquote><a
href="http://www.eclipse.org/modeling/emft/?project=emf4net">http://www.eclipse.org/modeling/emft/?project=emf4net</a><br>
</blockquote>
I hope someone response to you query as well.&nbsp; I'd be very interested!<br>
<br>
<br>
Jose Hernandez wrote:
<blockquote cite="mid:fnvhjv$o6n$1@build.eclipse.org" type="cite">
<pre wrap="">Thanks Ed.

I will be interested to know if anyone reading this thread can offer any
hints as to how one might go about creating an C++ EMF runtime.

Jose

"Ed Merks" <a class="moz-txt-link-rfc2396E" href="mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</a> wrote in message
<a class="moz-txt-link-freetext" href="news:fnvdsr$nga$1@build.eclipse.org">news:fnvdsr$nga$1@build.eclipse.org</a>...
</pre>
<blockquote type="cite">
<pre wrap="">I'm not aware of specifics, but I do recall someone telling me a few years
back about their organizations's effort in this regard.

Jose Hernandez wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Does anyone know if there is any such thing as a version of the EMF
runtime for C++?
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->

</pre>
</blockquote>
<br>
</body>
</html>

--------------000405090002060504000600--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF C++ runtime support? [message #416463 is a reply to message #416458] Sat, 02 February 2008 04:36 Go to previous messageGo to next message
Reinhold Bihler is currently offline Reinhold BihlerFriend
Messages: 64
Registered: July 2009
Member
This is a multi-part message in MIME format.

------=_NextPart_000_004C_01C8655D.84E2D040
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Jose,

C++ code generation and runtime support for EMF would be very cool! In =
the company
I am working for we use C++, Java and C# for the development of our =
products. There is
often the need to exchange modeled data between software components =
written in
different languages. That was one reason why I started the EMF4Net =
project Ed mentioned
(see also www.emf4net.org and wiki.eclipse.org/EMF4Net_Proposal for more =
information)
which basically tries to translate EMF's Java runtime to C#.

Translating EMF's runtime to C++ I see at least the following =
challenges:

- C++ lacks the concept of a garbage collector for automatic memory =
management. This
could be solved by using a smart pointer concept (see e.g. =
http://www.boost.org/libs/smart_ptr/smart_ptr.htm )

- C++ lacks imho a "real" standard library. I know there is the STL but =
in comparison to the
Java SDK API or the .Net SDK libraries the provided functionality is =
very limited. The EMF
runtime uses different list and map implementations. This is done by =
extending basic list and=20
map implementations. I am not sure how this could be done by =
extending the STL list and map
implementations (I am by no means a C++ guru but guess a real guru =
would find a way ;-).
Probably there are open source C++ libraries that could help to =
overcome C++ lack of standard
libraries. Apache has some very good C++ libraries like the C++ =
implementation of Xerces
and there is the boost project (http://www.boost.org/).=20

- <rant on>In the C/C++ world every compiler seems to follow its own =
standard so providing
a portable C++ library is a challenge on its own</rant off>. =
However, for a first step a
implementation for a wide spread compiler like gcc, Intel's or =
Microsoft's C++ compilers
would do. The libary could then be ported to other compilers later =
on.
=20
The C++ code generation part is not a real problem as the EMF code =
generation and Java
code templates can be extended and modified easily.

So my conclusion is that a C++ implementation of EMF's runtime could be =
done especially as
the eclipse community and the EMF guys in special are very helpful. And =
there is also the
eclipse CDT project which might be used to develop and integrate a =
EMF4C++ implementation.

It is definitively a challenge but more a matter of the willingness to =
invest real efforts. It would
make a cool sub project to EMF and a wonderful contribution to the =
community. Hint, hint.. ;-)

Best regards,

Reinhold
"Ed Merks" <merks@ca.ibm.com> wrote in message =
news:fnvk0a$7oe$1@build.eclipse.org...
Jose,

The EMF4Net guys did it for C# but that's a lot easier given how much =
C# is like Java:

http://www.eclipse.org/modeling/emft/?project=3Demf4net

I hope someone response to you query as well. I'd be very interested!


Jose Hernandez wrote:=20
Thanks Ed.

I will be interested to know if anyone reading this thread can offer any =

hints as to how one might go about creating an C++ EMF runtime.

Jose

"Ed Merks" <merks@ca.ibm.com> wrote in message=20
news:fnvdsr$nga$1@build.eclipse.org...
I'm not aware of specifics, but I do recall someone telling me a few =
years=20
back about their organizations's effort in this regard.

Jose Hernandez wrote:
Does anyone know if there is any such thing as a version of the EMF=20
runtime for C++?
=20

=20

------=_NextPart_000_004C_01C8655D.84E2D040
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3DISO-8859-1>
<META content=3D"MSHTML 6.00.2900.3243" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Jose,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>C++ code generation and runtime support =
for EMF=20
would be very cool! </FONT><FONT face=3DArial size=3D2>In the =
company</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I am working for we use C++, Java and =
C# for the=20
development of our products. There is</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>often the need to exchange modeled data =
between=20
software components written in</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>different languages. That was one =
reason why I=20
started the EMF4Net project Ed mentioned</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>(see also <A=20
href=3D"http://www.emf4net.org">www.emf4net.org</A> and&nbsp;<A=20
href=3D"http://wiki.eclipse.org/EMF4Net_Proposal">wiki.eclipse.org/EMF4Ne=
t_Proposal</A>&nbsp;for=20
more information)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>which basically tries to translate =
EMF's=20
</FONT><FONT face=3DArial size=3D2>Java runtime to C#.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Translating EMF's runtime to C++ I see =
at least the=20
following challenges:<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-&nbsp;C++ lacks the concept of a =
garbage collector=20
for automatic memory management. This<BR>&nbsp;&nbsp;&nbsp; could be =
solved by=20
using a smart pointer&nbsp;</FONT><FONT face=3DArial size=3D2>concept =
(see e.g. <A=20
href=3D"http://www.boost.org/libs/smart_ptr/smart_ptr.htm">http://www.boo=
st.org/libs/smart_ptr/smart_ptr.htm</A>&nbsp;)<BR></FONT ></DIV>
<DIV><FONT face=3DArial size=3D2>- C++ lacks imho a "real" standard =
library. I know=20
there is the STL but in comparison to the</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; Java SDK API or the =
..Net=20
SDK&nbsp;libraries the provided functionality is very limited. The=20
EMF</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
runtime&nbsp;</FONT><FONT=20
face=3DArial size=3D2>uses different list and map implementations. This =
is done by=20
extending basic list and </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
map&nbsp;</FONT><FONT face=3DArial=20
size=3D2>implementations. I am not sure how this could be done by =
extending the=20
STL list and map</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; implementations (I =
am by no=20
means a C++ guru but guess a real guru would find a way =
;-).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; Probably there are =
open source=20
C++ libraries that could help to overcome C++ lack of =
standard</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; libraries. Apache =
has some very=20
good C++ libraries like the C++ implementation of =
Xerces<BR>&nbsp;&nbsp;&nbsp;=20
and there is the boost project (<A=20
href=3D"http://www.boost.org/">http://www.boost.org/</A>). </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>-&nbsp;&lt;rant on&gt;In the C/C++ =
world every=20
compiler seems to follow its own standard so providing</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; a portable C++ =
library is a=20
challenge on its own&lt;/rant off&gt;. However, for a first step =
a</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
implementation&nbsp;</FONT><FONT=20
face=3DArial size=3D2>for a wide spread compiler like gcc, Intel's or =
Microsoft's=20
C++ compilers<BR>&nbsp;&nbsp;&nbsp; would do. The libary could then be =
ported to=20
other compilers later on.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The C++ code generation part is not a =
real problem=20
as the&nbsp;EMF code generation and Java</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>code templates can be&nbsp;</FONT><FONT =
face=3DArial=20
size=3D2>extended and modified easily.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So my conclusion is that a C++ =
implementation of=20
EMF's runtime could be done especially as</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>the </FONT><FONT face=3DArial =
size=3D2>eclipse=20
community and the EMF guys in special are very helpful. And there is =
also=20
the<BR>eclipse CDT project which might be used to develop and integrate =
a=20
EMF4C++ implementation.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>It is definitively </FONT><FONT =
face=3DArial size=3D2>a=20
challenge </FONT><FONT face=3DArial size=3D2>but more a matter of the =
willingness to=20
invest real efforts. It would<BR>make a cool sub project to </FONT><FONT =

face=3DArial size=3D2>EMF and a wonderful contribution to the community. =
Hint,=20
hint.. ;-)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Best regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Reinhold</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Ed Merks" &lt;<A =
href=3D"mailto:merks@ca.ibm.com">merks@ca.ibm.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:fnvk0a$7oe$1@build.eclipse.org">news:fnvk0a$7oe$1@build.ecli=
pse.org</A>...</DIV>Jose,<BR><BR>The=20
EMF4Net guys did it for C# but that's a lot easier given how much C# =
is like=20
Java:<A =
href=3D"http://www.eclipse.org/modeling/emft/?project=3Demf4net"><BR></A>=

<BLOCKQUOTE><A=20
=
href=3D"http://www.eclipse.org/modeling/emft/?project=3Demf4net">http://w=
ww.eclipse.org/modeling/emft/?project=3Demf4net</A><BR></BLOCKQUOTE >I=20
hope someone response to you query as well.&nbsp; I'd be very=20
interested!<BR><BR><BR>Jose Hernandez wrote:=20
<BLOCKQUOTE cite=3Dmid:fnvhjv$o6n$1@build.eclipse.org =
type=3D"cite"><PRE wrap=3D"">Thanks Ed.

I will be interested to know if anyone reading this thread can offer any =

hints as to how one might go about creating an C++ EMF runtime.

Jose

"Ed Merks" <A class=3Dmoz-txt-link-rfc2396E =
href=3D"mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</A> wrote in =
message=20
<A class=3Dmoz-txt-link-freetext =
href=3D"news:fnvdsr$nga$1@build.eclipse.org">news:fnvdsr$nga$1@build.ecli=
pse.org</A>...
</PRE>
<BLOCKQUOTE type=3D"cite"><PRE wrap=3D"">I'm not aware of specifics, =
but I do recall someone telling me a few years=20
back about their organizations's effort in this regard.

Jose Hernandez wrote:
</PRE>
<BLOCKQUOTE type=3D"cite"><PRE wrap=3D"">Does anyone know if there =
is any such thing as a version of the EMF=20
runtime for C++?
</PRE></BLOCKQUOTE></BLOCKQUOTE><PRE wrap=3D""><!---->

</PRE></BLOCKQUOTE><BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_004C_01C8655D.84E2D040--
Re: EMF C++ runtime support? [message #416464 is a reply to message #416463] Sat, 02 February 2008 07:25 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040504070403060905010802
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Reinhold,

Long ago, when I developed using C++, I learned about GCs for C++:
http://www.hpl.hp.com/personal/Hans_Boehm/gc/

May be it's appropriate for you...
Otherwise:
http://www.google.de/search?client=firefox-a&rls=org.moz illa%3Ade%3Aofficial&channel=s&hl=de&q=C%2B%2B+g arbage+collector&meta=lr%3Dlang_en&btnG=Google-Suche

Regards,
Eike Stepper
----
http://wiki.eclipse.org/CDO
http://wiki.eclipse.org/Net4j



Reinhold Bihler schrieb:
> Jose,
>
> C++ code generation and runtime support for EMF would be very cool! In
> the company
> I am working for we use C++, Java and C# for the development of our
> products. There is
> often the need to exchange modeled data between software components
> written in
> different languages. That was one reason why I started the EMF4Net
> project Ed mentioned
> (see also www.emf4net.org <http://www.emf4net.org>
> and wiki.eclipse.org/EMF4Net_Proposal
> <http://wiki.eclipse.org/EMF4Net_Proposal> for more information)
> which basically tries to translate EMF's Java runtime to C#.
>
> Translating EMF's runtime to C++ I see at least the following challenges:
> - C++ lacks the concept of a garbage collector for automatic memory
> management. This
> could be solved by using a smart pointer concept (see e.g.
> http://www.boost.org/libs/smart_ptr/smart_ptr.htm )


> - C++ lacks imho a "real" standard library. I know there is the STL
> but in comparison to the
> Java SDK API or the ..Net SDK libraries the provided functionality
> is very limited. The EMF
> runtime uses different list and map implementations. This is done
> by extending basic list and
> map implementations. I am not sure how this could be done by
> extending the STL list and map
> implementations (I am by no means a C++ guru but guess a real guru
> would find a way ;-).
> Probably there are open source C++ libraries that could help to
> overcome C++ lack of standard
> libraries. Apache has some very good C++ libraries like the C++
> implementation of Xerces
> and there is the boost project (http://www.boost.org/).
>
> - <rant on>In the C/C++ world every compiler seems to follow its own
> standard so providing
> a portable C++ library is a challenge on its own</rant off>.
> However, for a first step a
> implementation for a wide spread compiler like gcc, Intel's or
> Microsoft's C++ compilers
> would do. The libary could then be ported to other compilers later on.
>
> The C++ code generation part is not a real problem as the EMF code
> generation and Java
> code templates can be extended and modified easily.
>
> So my conclusion is that a C++ implementation of EMF's runtime could
> be done especially as
> the eclipse community and the EMF guys in special are very helpful.
> And there is also the
> eclipse CDT project which might be used to develop and integrate a
> EMF4C++ implementation.
>
> It is definitively a challenge but more a matter of the willingness to
> invest real efforts. It would
> make a cool sub project to EMF and a wonderful contribution to the
> community. Hint, hint.. ;-)
>
> Best regards,
>
> Reinhold
>
> "Ed Merks" <merks@ca.ibm.com <mailto:merks@ca.ibm.com>> wrote in
> message news:fnvk0a$7oe$1@build.eclipse.org...
> Jose,
>
> The EMF4Net guys did it for C# but that's a lot easier given how
> much C# is like Java:
> <http://www.eclipse.org/modeling/emft/?project=emf4net>
>
> http://www.eclipse.org/modeling/emft/?project=emf4net
>
> I hope someone response to you query as well. I'd be very interested!
>
>
> Jose Hernandez wrote:
>> Thanks Ed.
>>
>> I will be interested to know if anyone reading this thread can offer any
>> hints as to how one might go about creating an C++ EMF runtime.
>>
>> Jose
>>
>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>> news:fnvdsr$nga$1@build.eclipse.org...
>>
>>> I'm not aware of specifics, but I do recall someone telling me a few years
>>> back about their organizations's effort in this regard.
>>>
>>> Jose Hernandez wrote:
>>>
>>>> Does anyone know if there is any such thing as a version of the EMF
>>>> runtime for C++?
>>>>
>>
>>
>>
>

--------------040504070403060905010802
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Reinhold,<br>
<br>
Long ago, when I developed using C++, I learned about GCs for C++:<br>
<a class="moz-txt-link-freetext" href="http://www.hpl.hp.com/personal/Hans_Boehm/gc/">http://www.hpl.hp.com/personal/Hans_Boehm/gc/</a><br>
<br>
May be it's appropriate for you...<br>
Otherwise:
<a class="moz-txt-link-freetext" href=" http://www.google.de/search?client=firefox-a&rls=org.moz illa%3Ade%3Aofficial&channel=s&hl=de&q=C%2B%2B+g arbage+collector&meta=lr%3Dlang_en&btnG=Google-Suche">http://www.google..de/search?client=firefox-a&amp ;rls=org.mozilla%3Ade%3Aofficial&amp;channel=s&amp;h l=de&amp;q=C%2B%2B+garbage+collector&amp;meta=lr%3Dl ang_en&amp;btnG=Google-Suche </a><br>
<br>
Regards,<br>
Eike Stepper<br>
----<br>
<a class="moz-txt-link-freetext" href="http://wiki.eclipse.org/CDO">http://wiki.eclipse.org/CDO</a><br>
<a class="moz-txt-link-freetext" href="http://wiki.eclipse.org/Net4j">http://wiki.eclipse.org/Net4j</a><br>
<br>
<br>
<br>
Reinhold Bihler schrieb:
<blockquote cite="mid:fo0rvt$k18$1@build.eclipse.org" type="cite">
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<meta content="MSHTML 6.00.2900.3243" name="GENERATOR">
<style></style>
<div><font face="Arial" size="2">Jose,</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2">C++ code generation and runtime
support for EMF would be very cool! </font><font face="Arial" size="2">In
the company</font></div>
<div><font face="Arial" size="2">I am working for we use C++, Java
and C# for the development of our products. There is</font></div>
<div><font face="Arial" size="2">often the need to exchange modeled
data between software components written in</font></div>
<div><font face="Arial" size="2">different languages. That was one
reason why I started the EMF4Net project Ed mentioned</font></div>
<div><font face="Arial" size="2">(see also <a moz-do-not-send="true"
href="http://www.emf4net.org">www.emf4net.org</a> and&nbsp;<a
moz-do-not-send="true" href="http://wiki.eclipse.org/EMF4Net_Proposal">wiki.eclipse.org/EMF4Net_Proposal</a>&nbsp;for
more information)</font></div>
<div><font face="Arial" size="2">which basically tries to translate
EMF's </font><font face="Arial" size="2">Java runtime to C#.</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2">Translating EMF's runtime to C++ I
see at least the following challenges:<br>
</font></div>
<div><font face="Arial" size="2">-&nbsp;C++ lacks the concept of a garbage
collector for automatic memory management. This<br>
&nbsp;&nbsp;&nbsp; could be solved by using a smart pointer&nbsp;</font><font face="Arial"
size="2">concept (see e.g. <a moz-do-not-send="true"
href="http://www.boost.org/libs/smart_ptr/smart_ptr.htm">http://www.boost.org/libs/smart_ptr/smart_ptr.htm</a>&nbsp;)<br>
</font></div>
</blockquote>
<br>
<br>
<blockquote cite="mid:fo0rvt$k18$1@build.eclipse.org" type="cite">
<div><font face="Arial" size="2">- C++ lacks imho a "real" standard
library. I know there is the STL but in comparison to the</font></div>
<div><font face="Arial" size="2">&nbsp;&nbsp;&nbsp; Java SDK API or the ..Net
SDK&nbsp;libraries the provided functionality is very limited. The EMF</font></div>
<div><font face="Arial" size="2">&nbsp;&nbsp;&nbsp; runtime&nbsp;</font><font face="Arial"
size="2">uses different list and map implementations. This is done by
extending basic list and </font></div>
<div><font face="Arial" size="2">&nbsp;&nbsp;&nbsp; map&nbsp;</font><font face="Arial"
size="2">implementations. I am not sure how this could be done by
extending the STL list and map</font></div>
<div><font face="Arial" size="2">&nbsp;&nbsp;&nbsp; implementations (I am by no
means a C++ guru but guess a real guru would find a way ;-).</font></div>
<div><font face="Arial" size="2">&nbsp;&nbsp;&nbsp; Probably there are open source
C++ libraries that could help to overcome C++ lack of standard</font></div>
<div><font face="Arial" size="2">&nbsp;&nbsp;&nbsp; libraries. Apache has some very
good C++ libraries like the C++ implementation of Xerces<br>
&nbsp;&nbsp;&nbsp; and there is the boost project (<a moz-do-not-send="true"
href="http://www.boost.org/">http://www.boost.org/</a>). </font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2">-&nbsp;&lt;rant on&gt;In the C/C++ world
every compiler seems to follow its own standard so providing</font></div>
<div><font face="Arial" size="2">&nbsp;&nbsp;&nbsp; a portable C++ library is a
challenge on its own&lt;/rant off&gt;. However, for a first step a</font></div>
<div><font face="Arial" size="2">&nbsp;&nbsp;&nbsp; implementation&nbsp;</font><font
face="Arial" size="2">for a wide spread compiler like gcc, Intel's or
Microsoft's C++ compilers<br>
&nbsp;&nbsp;&nbsp; would do. The libary could then be ported to other compilers later
on.</font></div>
<div><font face="Arial" size="2">&nbsp;&nbsp;&nbsp; </font></div>
<div><font face="Arial" size="2">The C++ code generation part is not
a real problem as the&nbsp;EMF code generation and Java</font></div>
<div><font face="Arial" size="2">code templates can be&nbsp;</font><font
face="Arial" size="2">extended and modified easily.</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2">So my conclusion is that a C++
implementation of EMF's runtime could be done especially as</font></div>
<div><font face="Arial" size="2">the </font><font face="Arial"
size="2">eclipse community and the EMF guys in special are very
helpful. And there is also the<br>
eclipse CDT project which might be used to develop and integrate a
EMF4C++ implementation.</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2">It is definitively </font><font
face="Arial" size="2">a challenge </font><font face="Arial" size="2">but
more a matter of the willingness to invest real efforts. It would<br>
make a cool sub project to </font><font face="Arial" size="2">EMF and
a wonderful contribution to the community. Hint, hint.. ;-)</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2">Best regards,</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2">Reinhold</font></div>
<blockquote
style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div>"Ed Merks" &lt;<a moz-do-not-send="true"
href="mailto:merks@ca.ibm.com">merks@ca.ibm.com</a>&gt; wrote in
message <a moz-do-not-send="true"
href="news:fnvk0a$7oe$1@build.eclipse.org">news:fnvk0a$7oe$1@build.eclipse.org</a>...</div>
Jose,<br>
<br>
The EMF4Net guys did it for C# but that's a lot easier given how much
C# is like Java:<a moz-do-not-send="true"
href="http://www.eclipse.org/modeling/emft/?project=emf4net"><br>
</a>
<blockquote><a moz-do-not-send="true"
href="http://www.eclipse.org/modeling/emft/?project=emf4net">http://www.eclipse.org/modeling/emft/?project=emf4net</a><br>
</blockquote>
I hope someone response to you query as well.&nbsp; I'd be very interested!<br>
<br>
<br>
Jose Hernandez wrote:
<blockquote cite="mid:fnvhjv$o6n$1@build.eclipse.org" type="cite">
<pre wrap="">Thanks Ed.

I will be interested to know if anyone reading this thread can offer any
hints as to how one might go about creating an C++ EMF runtime.

Jose

"Ed Merks" <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</a> wrote in message
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="news:fnvdsr$nga$1@build.eclipse.org">news:fnvdsr$nga$1@build.eclipse.org</a>...
</pre>
<blockquote type="cite">
<pre wrap="">I'm not aware of specifics, but I do recall someone telling me a few years
back about their organizations's effort in this regard.

Jose Hernandez wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Does anyone know if there is any such thing as a version of the EMF
runtime for C++?
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->

</pre>
</blockquote>
<br>
</blockquote>
</blockquote>
</body>
</html>

--------------040504070403060905010802--


Re: EMF C++ runtime support? [message #416476 is a reply to message #416463] Tue, 05 February 2008 00:39 Go to previous messageGo to next message
Jose Hernandez is currently offline Jose HernandezFriend
Messages: 46
Registered: July 2009
Member
Hi Reinhold,

Your EMF for .net project looks interesting. I must admit your that your
list of challenges is not what I expected. I thought that the real
complexity in a multi-platform EMF system would be in the code that binds
all these implementations together rather than the C++ specific issues that
you mentioned.

Coming to Java from the C++ world, I am not inclined to think the issues
that you mentioned are insurmountable but as you well point out, the
difficulty often lies in the functionally that has no direct correspondence
between Java and C++.

I worked for a number of years on cross platform Solaris/Windows products
written in C and C++ and in my personal experience C++ portability isn't a
real worry once you understand the limitations of the compilers you are
working with. I don't think it would be particularly difficult or
complicated to extend the STL map and list templates to include EMF support.
Introspection might be an issue though.

I guess I will need to take a look at your EMF for .net project to see what
is involved.

Thank you all for your replies.

Regards,
Jose

-----

"Reinhold Bihler" <reinhold.bihler@gmx.de> wrote in message
news:fo0rvt$k18$1@build.eclipse.org...
Jose,

C++ code generation and runtime support for EMF would be very cool! In the
company
I am working for we use C++, Java and C# for the development of our
products. There is
often the need to exchange modeled data between software components written
in
different languages. That was one reason why I started the EMF4Net project
Ed mentioned
(see also www.emf4net.org and wiki.eclipse.org/EMF4Net_Proposal for more
information)
which basically tries to translate EMF's Java runtime to C#.

Translating EMF's runtime to C++ I see at least the following challenges:

- C++ lacks the concept of a garbage collector for automatic memory
management. This
could be solved by using a smart pointer concept (see e.g.
http://www.boost.org/libs/smart_ptr/smart_ptr.htm )

- C++ lacks imho a "real" standard library. I know there is the STL but in
comparison to the
Java SDK API or the .Net SDK libraries the provided functionality is
very limited. The EMF
runtime uses different list and map implementations. This is done by
extending basic list and
map implementations. I am not sure how this could be done by extending
the STL list and map
implementations (I am by no means a C++ guru but guess a real guru would
find a way ;-).
Probably there are open source C++ libraries that could help to overcome
C++ lack of standard
libraries. Apache has some very good C++ libraries like the C++
implementation of Xerces
and there is the boost project (http://www.boost.org/).

- <rant on>In the C/C++ world every compiler seems to follow its own
standard so providing
a portable C++ library is a challenge on its own</rant off>. However,
for a first step a
implementation for a wide spread compiler like gcc, Intel's or
Microsoft's C++ compilers
would do. The libary could then be ported to other compilers later on.

The C++ code generation part is not a real problem as the EMF code
generation and Java
code templates can be extended and modified easily.

So my conclusion is that a C++ implementation of EMF's runtime could be done
especially as
the eclipse community and the EMF guys in special are very helpful. And
there is also the
eclipse CDT project which might be used to develop and integrate a EMF4C++
implementation.

It is definitively a challenge but more a matter of the willingness to
invest real efforts. It would
make a cool sub project to EMF and a wonderful contribution to the
community. Hint, hint.. ;-)

Best regards,

Reinhold
"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fnvk0a$7oe$1@build.eclipse.org...
Jose,

The EMF4Net guys did it for C# but that's a lot easier given how much C# is
like Java:

http://www.eclipse.org/modeling/emft/?project=emf4net

I hope someone response to you query as well. I'd be very interested!


Jose Hernandez wrote:
Thanks Ed.

I will be interested to know if anyone reading this thread can offer any
hints as to how one might go about creating an C++ EMF runtime.

Jose

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fnvdsr$nga$1@build.eclipse.org...

I'm not aware of specifics, but I do recall someone telling me a few years
back about their organizations's effort in this regard.

Jose Hernandez wrote:

Does anyone know if there is any such thing as a version of the EMF
runtime for C++?
Re: EMF C++ runtime support? [message #416482 is a reply to message #416463] Tue, 05 February 2008 10:00 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
Reinhold Bihler wrote:
> Jose,
>
> C++ code generation and runtime support for EMF would be very cool! In
> the company

I definitely agree! :-)

> Translating EMF's runtime to C++ I see at least the following challenges:
> - C++ lacks the concept of a garbage collector for automatic memory
> management. This
> could be solved by using a smart pointer concept (see e.g.
> http://www.boost.org/libs/smart_ptr/smart_ptr.htm )

I think using boost shared pointers would be a nice solution, provided
there are no cycles in pointer relations, which, as far as I remember,
are not handled by shared pointers

> - C++ lacks imho a "real" standard library. I know there is the STL but
> in comparison to the
> Java SDK API or the .Net SDK libraries the provided functionality is
> very limited. The EMF
> runtime uses different list and map implementations. This is done by
> extending basic list and
> map implementations. I am not sure how this could be done by
> extending the STL list and map
> implementations (I am by no means a C++ guru but guess a real guru
> would find a way ;-).
> Probably there are open source C++ libraries that could help to
> overcome C++ lack of standard

I think that the stl would be enough, and one could extend stl classes...

cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


Re: EMF C++ runtime support? [message #416615 is a reply to message #416476] Fri, 08 February 2008 02:17 Go to previous messageGo to next message
Reinhold Bihler is currently offline Reinhold BihlerFriend
Messages: 64
Registered: July 2009
Member
Jose,

I am coming from the Java world and now have the "pleasure" to lead
the development of an old C/C++ product supporting 4 operating systems,
some ancient compilers (one of them does not even support STL
Strings properly), soon have to move to 64bit OS/compilers... so my
opinion about platform independent C++ development might be biased.

However, if you don't see a problem with the points mentioned I don't
see a show-stopper issue for a C++ translation of the EMF runtime
(for modern C++ compilers) either. The biggest challenge might be to
get a good understanding about how the EMF runtime works internally
For the translation to C# I can often use a very syntactical
(pre-)translation
approach (using regular expresion to translate common Java statements
into equivalent C# statements) . For C++ I would guess the translater should
use a more semantical approach. As EMF is open source, well documented
(the EMF book helps a lot) and the EMF guys are very responsive this is
more a matter of time and effort.

A few hints:

The EMF runtime comprises the following plugins/components:
- org.eclipse.emf.ecore
- org.eclipse.emf.common
- org.eclipse.emf.ecore.xmi and
- org.eclipse.emf.ecore.change

org.eclipse.emf.ecore.xmi implements the XML/XMI (de-) serialisitaion
functionality so this can be skipped until this functionality is needed.
org.eclipse.emf.ecore.change is also not to important for first steps.

org.eclipse.emf.ecore:

EMF was used to "bootstrap"/generate code for its own implementation.
org.eclipse.emf.ecore contains a lot of code that is generated by EMF
itself.
(see the Ecore.ecore model file in the org.eclipse.emf.ecore plugin:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org .eclipse.emf/plugins/org.eclipse.emf.ecore/model/?root=Model ing_Project )
I exploited this by first adjusting the EMF model code generation JET
templates
(I first started using dynamic templates and copies of the EMF java JET
templates)
to produce proper C# code from ecore models. I used this C# code generation
to
generate/translate a big part of the code in the org.eclipse.emf.ecore
plugin
(I ate my own dog food).

One needs to decide how to map basic types (see:
http://www.emf4net.org/emf4net/Translation/Types/tabid/60/De fault.aspx )
However, sometimes a fixed mapping seems inappropriate. E.g. a Java byte
corresponds to a C# sbyte (the type byte is unsigned in C# but signed in
Java).
However, depending on the intend EByteArray could be mapped to C# sbyte[]
or byte[]. For C++ a EString could be mapped to to std:string or to wstring
or
some kind of unicode string... Therefore I decidet to not harde code the
type
maping in the JET templates but try to make it configurable.

Write down translation decisions and translate consistently:
(see: http://www.emf4net.org/emf4net/Translation/tabid/59/Default. aspx ,
http://www.emf4net.org/emf4net/Translation/SDKMethods/tabid/ 61/Default.aspx
,
http://www.emf4net.org/emf4net/Translation/Classes/tabid/62/ Default.aspx and
http://www.emf4net.org/emf4net/Translation/Exceptions/tabid/ 63/Default.aspx)
I often encountered a situation where I was not sure how to translate a
certain
language construct. So I had to decide for one way under uncertainty. If
later on
I recognize that the decision was wrong I try to correct/re-translate all
occurences
of the wrong translation decision.

Hope this helps a bit.

If you have further questions don't hesitate to ask them. EMF for C++
would be very cool and would definitively make a nice open source project
;-)

Best regards,

Reinhold


"Jose Hernandez" <jose.hernandez@andrew.com> wrote in message
news:fo8b91$o40$1@build.eclipse.org...
> Hi Reinhold,
>
> Your EMF for .net project looks interesting. I must admit your that your
> list of challenges is not what I expected. I thought that the real
> complexity in a multi-platform EMF system would be in the code that binds
> all these implementations together rather than the C++ specific issues
> that you mentioned.
>
> Coming to Java from the C++ world, I am not inclined to think the issues
> that you mentioned are insurmountable but as you well point out, the
> difficulty often lies in the functionally that has no direct
> correspondence between Java and C++.
>
> I worked for a number of years on cross platform Solaris/Windows products
> written in C and C++ and in my personal experience C++ portability isn't a
> real worry once you understand the limitations of the compilers you are
> working with. I don't think it would be particularly difficult or
> complicated to extend the STL map and list templates to include EMF
> support. Introspection might be an issue though.
>
> I guess I will need to take a look at your EMF for .net project to see
> what is involved.
>
> Thank you all for your replies.
>
> Regards,
> Jose
>
> -----
>
> "Reinhold Bihler" <reinhold.bihler@gmx.de> wrote in message
> news:fo0rvt$k18$1@build.eclipse.org...
> Jose,
>
> C++ code generation and runtime support for EMF would be very cool! In the
> company
> I am working for we use C++, Java and C# for the development of our
> products. There is
> often the need to exchange modeled data between software components
> written in
> different languages. That was one reason why I started the EMF4Net project
> Ed mentioned
> (see also www.emf4net.org and wiki.eclipse.org/EMF4Net_Proposal for more
> information)
> which basically tries to translate EMF's Java runtime to C#.
>
> Translating EMF's runtime to C++ I see at least the following challenges:
>
> - C++ lacks the concept of a garbage collector for automatic memory
> management. This
> could be solved by using a smart pointer concept (see e.g.
> http://www.boost.org/libs/smart_ptr/smart_ptr.htm )
>
> - C++ lacks imho a "real" standard library. I know there is the STL but in
> comparison to the
> Java SDK API or the .Net SDK libraries the provided functionality is
> very limited. The EMF
> runtime uses different list and map implementations. This is done by
> extending basic list and
> map implementations. I am not sure how this could be done by extending
> the STL list and map
> implementations (I am by no means a C++ guru but guess a real guru
> would find a way ;-).
> Probably there are open source C++ libraries that could help to
> overcome C++ lack of standard
> libraries. Apache has some very good C++ libraries like the C++
> implementation of Xerces
> and there is the boost project (http://www.boost.org/).
>
> - <rant on>In the C/C++ world every compiler seems to follow its own
> standard so providing
> a portable C++ library is a challenge on its own</rant off>. However,
> for a first step a
> implementation for a wide spread compiler like gcc, Intel's or
> Microsoft's C++ compilers
> would do. The libary could then be ported to other compilers later on.
>
> The C++ code generation part is not a real problem as the EMF code
> generation and Java
> code templates can be extended and modified easily.
>
> So my conclusion is that a C++ implementation of EMF's runtime could be
> done especially as
> the eclipse community and the EMF guys in special are very helpful. And
> there is also the
> eclipse CDT project which might be used to develop and integrate a EMF4C++
> implementation.
>
> It is definitively a challenge but more a matter of the willingness to
> invest real efforts. It would
> make a cool sub project to EMF and a wonderful contribution to the
> community. Hint, hint.. ;-)
>
> Best regards,
>
> Reinhold
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:fnvk0a$7oe$1@build.eclipse.org...
> Jose,
>
> The EMF4Net guys did it for C# but that's a lot easier given how much C#
> is like Java:
>
> http://www.eclipse.org/modeling/emft/?project=emf4net
>
> I hope someone response to you query as well. I'd be very interested!
>
>
> Jose Hernandez wrote:
> Thanks Ed.
>
> I will be interested to know if anyone reading this thread can offer any
> hints as to how one might go about creating an C++ EMF runtime.
>
> Jose
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:fnvdsr$nga$1@build.eclipse.org...
>
> I'm not aware of specifics, but I do recall someone telling me a few years
> back about their organizations's effort in this regard.
>
> Jose Hernandez wrote:
>
> Does anyone know if there is any such thing as a version of the EMF
> runtime for C++?
>
>
>
>
>
Re: EMF C++ runtime support? [message #416620 is a reply to message #416615] Fri, 08 February 2008 12:01 Go to previous message
Jose Hernandez is currently offline Jose HernandezFriend
Messages: 46
Registered: July 2009
Member
Reinhold,

Thanks for all the advice.

Regards,
Jose

"Reinhold Bihler" <reinhold.bihler@gmx.de> wrote in message
news:foge38$ood$1@build.eclipse.org...
> Jose,
>
> I am coming from the Java world and now have the "pleasure" to lead
> the development of an old C/C++ product supporting 4 operating systems,
> some ancient compilers (one of them does not even support STL
> Strings properly), soon have to move to 64bit OS/compilers... so my
> opinion about platform independent C++ development might be biased.
>
> However, if you don't see a problem with the points mentioned I don't
> see a show-stopper issue for a C++ translation of the EMF runtime
> (for modern C++ compilers) either. The biggest challenge might be to
> get a good understanding about how the EMF runtime works internally
> For the translation to C# I can often use a very syntactical
> (pre-)translation
> approach (using regular expresion to translate common Java statements
> into equivalent C# statements) . For C++ I would guess the translater
> should
> use a more semantical approach. As EMF is open source, well documented
> (the EMF book helps a lot) and the EMF guys are very responsive this is
> more a matter of time and effort.
>
> A few hints:
>
> The EMF runtime comprises the following plugins/components:
> - org.eclipse.emf.ecore
> - org.eclipse.emf.common
> - org.eclipse.emf.ecore.xmi and
> - org.eclipse.emf.ecore.change
>
> org.eclipse.emf.ecore.xmi implements the XML/XMI (de-) serialisitaion
> functionality so this can be skipped until this functionality is needed.
> org.eclipse.emf.ecore.change is also not to important for first steps.
>
> org.eclipse.emf.ecore:
>
> EMF was used to "bootstrap"/generate code for its own implementation.
> org.eclipse.emf.ecore contains a lot of code that is generated by EMF
> itself.
> (see the Ecore.ecore model file in the org.eclipse.emf.ecore plugin:
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org .eclipse.emf/plugins/org.eclipse.emf.ecore/model/?root=Model ing_Project )
> I exploited this by first adjusting the EMF model code generation JET
> templates
> (I first started using dynamic templates and copies of the EMF java JET
> templates)
> to produce proper C# code from ecore models. I used this C# code
> generation to
> generate/translate a big part of the code in the org.eclipse.emf.ecore
> plugin
> (I ate my own dog food).
>
> One needs to decide how to map basic types (see:
> http://www.emf4net.org/emf4net/Translation/Types/tabid/60/De fault.aspx )
> However, sometimes a fixed mapping seems inappropriate. E.g. a Java byte
> corresponds to a C# sbyte (the type byte is unsigned in C# but signed in
> Java).
> However, depending on the intend EByteArray could be mapped to C# sbyte[]
> or byte[]. For C++ a EString could be mapped to to std:string or to
> wstring or
> some kind of unicode string... Therefore I decidet to not harde code the
> type
> maping in the JET templates but try to make it configurable.
>
> Write down translation decisions and translate consistently:
> (see: http://www.emf4net.org/emf4net/Translation/tabid/59/Default. aspx ,
> http://www.emf4net.org/emf4net/Translation/SDKMethods/tabid/ 61/Default.aspx ,
> http://www.emf4net.org/emf4net/Translation/Classes/tabid/62/ Default.aspx
> and
> http://www.emf4net.org/emf4net/Translation/Exceptions/tabid/ 63/Default.aspx)
> I often encountered a situation where I was not sure how to translate a
> certain
> language construct. So I had to decide for one way under uncertainty. If
> later on
> I recognize that the decision was wrong I try to correct/re-translate all
> occurences
> of the wrong translation decision.
>
> Hope this helps a bit.
>
> If you have further questions don't hesitate to ask them. EMF for C++
> would be very cool and would definitively make a nice open source project
> ;-)
>
> Best regards,
>
> Reinhold
>
>
> "Jose Hernandez" <jose.hernandez@andrew.com> wrote in message
> news:fo8b91$o40$1@build.eclipse.org...
>> Hi Reinhold,
>>
>> Your EMF for .net project looks interesting. I must admit your that your
>> list of challenges is not what I expected. I thought that the real
>> complexity in a multi-platform EMF system would be in the code that binds
>> all these implementations together rather than the C++ specific issues
>> that you mentioned.
>>
>> Coming to Java from the C++ world, I am not inclined to think the issues
>> that you mentioned are insurmountable but as you well point out, the
>> difficulty often lies in the functionally that has no direct
>> correspondence between Java and C++.
>>
>> I worked for a number of years on cross platform Solaris/Windows products
>> written in C and C++ and in my personal experience C++ portability isn't
>> a real worry once you understand the limitations of the compilers you are
>> working with. I don't think it would be particularly difficult or
>> complicated to extend the STL map and list templates to include EMF
>> support. Introspection might be an issue though.
>>
>> I guess I will need to take a look at your EMF for .net project to see
>> what is involved.
>>
>> Thank you all for your replies.
>>
>> Regards,
>> Jose
>>
>> -----
>>
>> "Reinhold Bihler" <reinhold.bihler@gmx.de> wrote in message
>> news:fo0rvt$k18$1@build.eclipse.org...
>> Jose,
>>
>> C++ code generation and runtime support for EMF would be very cool! In
>> the company
>> I am working for we use C++, Java and C# for the development of our
>> products. There is
>> often the need to exchange modeled data between software components
>> written in
>> different languages. That was one reason why I started the EMF4Net
>> project Ed mentioned
>> (see also www.emf4net.org and wiki.eclipse.org/EMF4Net_Proposal for more
>> information)
>> which basically tries to translate EMF's Java runtime to C#.
>>
>> Translating EMF's runtime to C++ I see at least the following challenges:
>>
>> - C++ lacks the concept of a garbage collector for automatic memory
>> management. This
>> could be solved by using a smart pointer concept (see e.g.
>> http://www.boost.org/libs/smart_ptr/smart_ptr.htm )
>>
>> - C++ lacks imho a "real" standard library. I know there is the STL but
>> in comparison to the
>> Java SDK API or the .Net SDK libraries the provided functionality is
>> very limited. The EMF
>> runtime uses different list and map implementations. This is done by
>> extending basic list and
>> map implementations. I am not sure how this could be done by extending
>> the STL list and map
>> implementations (I am by no means a C++ guru but guess a real guru
>> would find a way ;-).
>> Probably there are open source C++ libraries that could help to
>> overcome C++ lack of standard
>> libraries. Apache has some very good C++ libraries like the C++
>> implementation of Xerces
>> and there is the boost project (http://www.boost.org/).
>>
>> - <rant on>In the C/C++ world every compiler seems to follow its own
>> standard so providing
>> a portable C++ library is a challenge on its own</rant off>. However,
>> for a first step a
>> implementation for a wide spread compiler like gcc, Intel's or
>> Microsoft's C++ compilers
>> would do. The libary could then be ported to other compilers later on.
>>
>> The C++ code generation part is not a real problem as the EMF code
>> generation and Java
>> code templates can be extended and modified easily.
>>
>> So my conclusion is that a C++ implementation of EMF's runtime could be
>> done especially as
>> the eclipse community and the EMF guys in special are very helpful. And
>> there is also the
>> eclipse CDT project which might be used to develop and integrate a
>> EMF4C++ implementation.
>>
>> It is definitively a challenge but more a matter of the willingness to
>> invest real efforts. It would
>> make a cool sub project to EMF and a wonderful contribution to the
>> community. Hint, hint.. ;-)
>>
>> Best regards,
>>
>> Reinhold
>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>> news:fnvk0a$7oe$1@build.eclipse.org...
>> Jose,
>>
>> The EMF4Net guys did it for C# but that's a lot easier given how much C#
>> is like Java:
>>
>> http://www.eclipse.org/modeling/emft/?project=emf4net
>>
>> I hope someone response to you query as well. I'd be very interested!
>>
>>
>> Jose Hernandez wrote:
>> Thanks Ed.
>>
>> I will be interested to know if anyone reading this thread can offer any
>> hints as to how one might go about creating an C++ EMF runtime.
>>
>> Jose
>>
>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>> news:fnvdsr$nga$1@build.eclipse.org...
>>
>> I'm not aware of specifics, but I do recall someone telling me a few
>> years
>> back about their organizations's effort in this regard.
>>
>> Jose Hernandez wrote:
>>
>> Does anyone know if there is any such thing as a version of the EMF
>> runtime for C++?
>>
>>
>>
>>
>>
>
>
Previous Topic:Referencing model elements (generated editor vs. editor on the fly)
Next Topic:Creating multiple (transactional) editing domains on the same resourceset
Goto Forum:
  


Current Time: Tue Apr 23 08:00:24 GMT 2024

Powered by FUDForum. Page generated in 0.03009 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top