For example, a class could be instantiated in a function or method of another class. Typically these relations could be shown as an association or dependency, but many times are not shown on typical UML diagrams.
Another example is a method that takes an argument that is a reference to a class, and these also are not shown.
In C++, there are other examples such as when a template is passed a class as an argument to create a bound element. The bound element has a template binding association, but the associations to the template parameters are often not shown.
The function parameter replationship symbol is two different sized circles.
The symbol represents the function body with an argument.
An actor may perform some method acting within a scene of a movie, but the
actor does not own the movie. The movie is used as a parameter in the
performInScene method.
In UML diagrams, the relationship to a template is shown, but the relationship
to a template argument is typically not shown. There are no new Oov symbols
to show this relationship since the template specification in the class name
is clear.
The IdentityDisplayer template adds the displayIdentity function to the
Universe::Star class.
Typedefs are usually not shown in UML diagrams. The meaning of a template is
the same as inheritance with no new attributes or methods.
The Universe::DisplayStar is a new name for
IdentityDisplayer<Universe::Star>
Another important relationship is the visibility of members and inheritance.
This is shown as nested circles. Unfilled circles are public, filled are
private, and partially filled are protected.
Released movies are public, bad movies are private, and future good movies
are protected.
If a class has both a function body and function parameter relation, only the function parameter relation is shown, since that is the more accessible interface.
If a class has both a const and non-const relation, then the const symbol will not be displayed. If a class has both function body variables and function arguments, then the const symbol is shown if all arguments to the class are const. Maybe it is better to change to a symbol that means "modify the external class". Change the const arrow direction to point to the modified class. Any class that has a non-const reference as either aggregation or func parameter will do the modification.
Aggregation/Comp | Func Body | Func Param | External Modify / Body(encapsulated) Modify |
None | None | None | N / N |
Non-ref | None | None | N / Y |
Ref const | None | None | N / N |
Ref non-const | None | None | Y / Y |
None | Non-ref | None | N / Y |
Non-ref | Non-ref | None | N / Y |
Ref const | Non-ref | None | N / Y |
Ref non-const | Non-ref | None | Y / Y |
None | None | Non-ref | |
Non-ref | None | Non-ref | |
Ref const | None | Non-ref | |
Ref non-const | None | Non-ref | |
None | Non-ref | Non-ref | |
Non-ref | Non-ref | Non-ref | |
Ref const | Non-ref | Non-ref | |
Ref non-const | Non-ref | Non-ref | |
None | None | Ref const | |
Non-ref | None | Ref const | |
Ref const | None | Ref const | |
Ref non-const | None | Ref const | |
None | Non-ref | Ref const | |
Non-ref | Non-ref | Ref const | |
Ref const | Non-ref | Ref const | |
Ref non-const | Non-ref | Ref const | |
None | None | Ref non-const | |
Non-ref | None | Ref non-const | |
Ref const | None | Ref non-const | |
Ref non-const | None | Ref non-const | |
None | Non-ref | Ref non-const | |
Non-ref | Non-ref | Ref non-const | |
Ref const | Non-ref | Ref non-const | |
Ref non-const | Non-ref | Ref non-const |