Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » C++ codegen for classes derived from external class
C++ codegen for classes derived from external class [message #1764146] Thu, 25 May 2017 20:05 Go to next message
Stephen Blackwell is currently offline Stephen BlackwellFriend
Messages: 117
Registered: March 2014
Senior Member
Say I have 2 classes, A & B where B is derived from A.
Class A is an external class and I don't want to generate code for it. I include the appropriate .h file for its definition.

Assume that I have applied the C/C++ profile.

I apply the External stereotype to class A and generate the code. The class B .h file looks like this

class B : public A {
...

which is fine except code for class A is generated. OK, so now I add the NoCodeGen stereotype to class A, save, clean and regenerate.

Now, no code is generated for class A as expected but the definition of class B is now

class B {
...

which of course is not what I want.

Is this a bug or is there another way to do this?

Steve
Re: C++ codegen for classes derived from external class [message #1764240 is a reply to message #1764146] Sat, 27 May 2017 06:03 Go to previous messageGo to next message
Ansgar Radermacher is currently offline Ansgar RadermacherFriend
Messages: 141
Registered: March 2011
Location: Paris Saclay, France
Senior Member
I cannot reproduce this behaviour. If a class has the <<External>> stereotype, no code is generated for it. Did you use release 1.0.4? (which is online since end of last week, but it did not announce it yet, since the website is still 1.0.3).
Re: C++ codegen for classes derived from external class [message #1764581 is a reply to message #1764240] Wed, 31 May 2017 13:06 Go to previous message
Stephen Blackwell is currently offline Stephen BlackwellFriend
Messages: 117
Registered: March 2014
Senior Member
Well, that is strange. I cannot repeat the problem myself this week. I did it multiple times last week. I don't know what is different.
I am running 1.0.3 with a nightly snapshot so that it 2.0.3.201703080851.
Previous Topic:C++ function parameter types reset to <Undefined> on every save
Next Topic:InstanceSpecification drawing help
Goto Forum:
  


Current Time: Tue Jul 17 17:39:34 GMT 2018

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

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

Back to the top