Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: Disabling automatic generation of #include of parent package
Topic Summary:
Created On: 26-Mar-2008 15:08
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 26-Mar-2008 15:08
User is offline View Users Profile Print this message


Dan McNeill

Posts: 10
Joined: 1-Feb-2007

Hi,

I've got a package that just has some definitions in it, and it is getting an auto-generated #include of its parent package placed in its .h file (which it doesn't need). This is causing me issues with circular dependencies.

Does anyone know how to disable this? I've tried various likely-looking properties but to no avail.

Thanks,
Dan
Report this to a Moderator Report this to a Moderator
 6-Apr-2008 16:44
User is offline View Users Profile Print this message


Dan McNeill

Posts: 10
Joined: 1-Feb-2007

I've come up with a workaround, if anyone else has the same problem, but first I'll describe the issue in a little more detail:

- PackageA contains a struct MyStruct, which gets generated in its own source file "MyStruct.h"
- A toString() function is added to PackageA which works on the struct. This causes generation of the files "PackageA.h" and "PackageA.cc" containing the function. The header file gets a "#include MyStruct.h" as this is where the struct is defined.
- MyStruct.h automatically gets a "#include PackageA.h" as it is its parent package...

...so now you have a circular dependency, with PackageA.h including MyStruct.h, and MyStruct.h including PackageA.h.

I've noticed that MyPackage.h/.cc will only be generated if there is a need for them, so the #include in MyStruct.h will only be generated in this case.

The workaround I've come up with is to have a dummy package in between, so that MyStruct is in a subpackage of PackageA. So long as this dummy package does nothing, MyStruct.h will not get a #include on it (or its parent) so there is no problem.

However, this is hardly an ideal solution!
Report this to a Moderator Report this to a Moderator
 16-May-2008 10:23
User is offline View Users Profile Print this message


Simon Morrish

Posts: 127
Joined: 17-May-2005

Hi Dan

I'm not too familiar with RiC, but I think that turning off the following property should have the desired effect:

CG:Class:ImplicitDependencyToPackage

Although the property is named for classes, I think it will apply to structs as well. Let me know if it works.

best regards,
Simon

-------------------------
Simon Morrish
simon.morrish@eu.panasonic.com
http://panasonic.co.uk
Panasonic ideas for life
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 1 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.