[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: EMF C++ runtime support?

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@xxxxxxxxxx> wrote in message news:fnvk0a$7oe$1@xxxxxxxxxxxxxxxxx...
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@xxxxxxxxxx> wrote in message 
news:fnvdsr$nga$1@xxxxxxxxxxxxxxxxx...
  
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++?