Use
the Dependencies list on the Mapping tab
to set IBM® Rational® Rhapsody® to
create dependencies from the include files during reverse engineering.
This means that #include between files can create
dependencies between the component files and between classes. In addition,
forward declarations of elements (variables, functions, classes, and
so on) will create dependencies from the component file to the element.
About this task
The possible
values
are:
- ComponentOnly means to create
dependencies
between component files, but not between model classes
- None means do not create dependencies on
reverse engineering
- PackageAndComponent means
to create dependencies
between model classes and component files
- PackageOnly means
to create dependencies
between model classes, but not between component files
- SmartPackageAndComponent means to create
only necessary dependencies to reflect the code
Note: The
values for Dependencies are all that are available in the current
product version. Note the following information:
Not all these values will appear for every language of Rational Rhapsody.
For example, all the above values might be available for IBM Rational Rhapsody Developer for C++,
but only two might be available for IBM Rational Rhapsody Developer for Java.
You can set the default for Dependencies in the <lang>_ReverseEngineering::ImplementationTrait::
CreateDependencies property. You might notice in the property
definition that there is a DependenciesOnly value,
but it does not appear in the Dependencies list. This value
is only for compatibility with earlier version purposes and you cannot
set this value directly. In a case where you might have an old model
that uses DependenciesOnly, the current product automatically
sets the value to PackageOnly.
The list of values and compatibility with earlier version behavior
are different among the languages.
This
operation is successful if the reverse
engineering utility analyzes both the included file and the source;
and the source and included files contain class declarations for creating
the dependencies between them. If there is not enough information,
the includes are not converted into dependencies. This can happen
in the following cases:
- The include file
was not found, or is not in the
scope of the settings on the Input tab.
- A class is not defined in the include file or source
file, so the dependency could not be created.
If
the dependency is not created successfully, the include files
that were not converted to dependencies are imported to the <lang>_CG::Class::SpecIncludes or <lang>_CG::Class::ImpIncludes properties
so you do not have to re-create them manually. If the include file
is in the specification file, the information is imported to the SpecIncludes property;
if it is in the implementation file, the information is imported to
the ImpIncludes property.
If a file contains several classes, include information is imported
for all the classes in the file.