How to control the style of include statements in Rational Rhapsody
How do you control the style of #include statements in IBM Rational Rhapsody?
Style of #include statements for internal and external elements needs to controlled.
The style of #include statements in a file can be controlled in Rational Rhapsody by using the property CPP_CG::Dependency::IncludeStyle
This property helps you control the style of a specific dependency, or the entire configuration, component and project.
In order to set the style for include files that are synthesized based on associations between model elements (for example, setting the type of some attribute to a class), you can add a «Usage» dependency between the elements and set this property to the appropriate value.
The possible values are as follows:
- Default - Use angle brackets for include statements for external elements, and quotes for include statements for other elements.
- Quotes - Enclose include files in quotation marks.
Example: #include "A.h"
When a compiler encounters an include file in quotes, it searches for the file in both the current directory and the directories specified in the include path. Note that the specific algorithm used is compiler-dependent
- AngledBrackets - Enclose include files in angle brackets. For example:
Example: #include A.h
When a compiler encounters an include file in angle brackets, it searches for the file only in the directories specified in the include path.
If you set the property to AngledBrackets at the configuration level, you must also change the CG:: File::IncludeScheme property to RelativeToConfiguration to ensure successful compilation
More support for:
Software version: 7.5.2, 188.8.131.52, 7.5.3, 184.108.40.206, 220.127.116.11, 7.6, 18.104.22.168, 7.6.1, 22.214.171.124
Operating system(s): Windows
Reference #: 1589210
Modified date: 29 March 2012