Creating relationships between C/C++ elements in domain modeling
class diagrams
Relationships identify the semantic ties that exist between
C/C++ elements. To add relationships to a C/C++ class diagram, you
must work in the diagram editor. You cannot specify relationships
in the Project Explorer view.
Including only header file names in #include statements for relationships in C/C++ domain modeling class diagrams
By default, when you create a relationship between two
C/C++ classes in projects in your workspace, an #include directive
statement is generated with a relative path to the header file of
the target class. However, you can set a preference to suppress the
path to the header file so that only the header file name appears
in the #include statement. These settings affect only new relationships
that you create and do not affect any existing relationships.
Creating usage relationships between C/C++ elements
You can add a usage relationship between a C/C++ header
file (which has .h has a file name extension) and a CPP class file
(which has .cpp as a file name extension) in a domain modeling class
diagram, and add #includes to the code.