Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Problem with Template class and Code generation
Problem with Template class and Code generation [message #1737171] Wed, 06 July 2016 08:32 Go to next message
Luca Agrippino is currently offline Luca AgrippinoFriend
Messages: 2
Registered: July 2016
Junior Member
Hello to All!
I attemp to use Papyrus (Mars.2 Release (4.5.2)) to model a software framework in UML.
At this moment, i need to model a class with template. I have read this article:
https://www.eclipse.org/articles/article.php?file=Article-Defining-Generics-with-UML-Templates/index.html

I'm able to make a template class, but i have some problem where i try to use this template class, in particular the code generated doesn't compile.

This is my model and from this i want to generate a c++ working code:
index.php/fa/26404/0/

If I generate the code from this diagram, the code doesn't compile.
Is correct to modelling this classes in this way?
Someone can help me to understand how I generate the code correctly from this model?

I attach a Papyrus project that contain the model.
Re: Problem with Template class and Code generation [message #1737331 is a reply to message #1737171] Thu, 07 July 2016 11:01 Go to previous message
Luca Agrippino is currently offline Luca AgrippinoFriend
Messages: 2
Registered: July 2016
Junior Member
I have found two others problem. one is on the use of the containment link as show in the next image:
index.php/fa/26413/0/

I am expecting that the Class2 is a part of the Class3, but the class Class2 is ignored from the code generator.

The other problem is this code line:
#include "RootElement/Pkg_RootElement.h"


but this file isn't generated by the code generator, so i need to comment this line in all the files "Pkg_namePackage.h". Otherwise the code doesn't compile.

Someone can tell me where i'm wrong, and how i can resolve this problems?
Any help or documentations is very appreciate, thank.
Previous Topic:mingw: undefined reference to `WinMain@16'
Next Topic:Installing cdtdebug.sh script
Goto Forum:
  


Current Time: Tue Mar 19 06:16:34 GMT 2024

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

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

Back to the top