Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » C++ Code Generation and Documentation(Question about generating models that play nice with both C++ codegen and gendoc.)
C++ Code Generation and Documentation [message #1765244] Wed, 07 June 2017 19:19 Go to next message
Scott Jackson is currently offline Scott JacksonFriend
Messages: 1
Registered: June 2017
Junior Member
I'm trying to create a model that I can use both for C++ code generation and with GenDoc to produce some nice design documentation. I have a couple of questions about code/documentation generation:

1. I've named some of my packages and components things that look nice in prose but end up generating illegal code. For example, naming a package in my model tree as "User Interface" or "Base Thread" look fine in generated documentation but generate illegal names for C++ namespaces. Is there a way to override the name created during code generation OR override the name used in gendoc?

2. It looks like my C++ classes aren't getting generated correctly. For example I made a template class with some public methods and private member variables. The generated code: a) doesn't declare those private member variables anywhere and b) puts all the template functions in a .cpp instead of a header. In fact, NO class declarations appear anywhere in the header file; only an enum declaration. What am I doing wrong?

3. Is it possible to have the code generation utility generate a new .h/.cpp pair for each class? That is, I have a class diagram with several classes but I want them all to be generated in separate code files.

Thank you!

Re: C++ Code Generation and Documentation [message #1765594 is a reply to message #1765244] Mon, 12 June 2017 15:45 Go to previous message
Ansgar Radermacher is currently offline Ansgar RadermacherFriend
Messages: 163
Registered: March 2011
Location: Paris Saclay, France
Senior Member
1. We had a functionality that modifies identifiers, e.g. replaces spaces by underscores. But this code is currently not active.

2. Can you please say more clearly how your class looks like. Does it have a template signature in UML? We have some template classes for instance in the OSAL library (you can find it when you do import registered package)

3. The code generator currently produces a specific .h/.cpp for each class. So either I don't understand the question or you are maybe using a different code generator (are you using Papyrus SW designer,
Previous Topic:Maven repository for Papyrus
Next Topic:Copy/Paste element and resize
Goto Forum:

Current Time: Tue Oct 23 22:39:25 GMT 2018

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

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

Back to the top