![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
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 |
![]() |
![]()
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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! |
|
![]() |
|
![]() |
|
Hi Dan
I'm not too familiar with RiC, but I think that turning off the following property should have the desired effect: 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 |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.