Oovcde Index

OOV Class Relations

Standard UML does not show all of the relations that can occur between classes. Since they are not shown, it may be difficult to find all related classes. There are also many important relation attributes that are not shown, that visually can used to quickly identify errors.

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.

OOV Symbols

The OOV symbols are used to show some of these other relationships, and to show extra information about relationships.

OOV Relation Symbols

The function body replationship symbol is simply a circle.
The movie created by this junky studio is so bad that it is never distributed. The movie is instantiated and destructed in the createJunkyMovie method, but never used in an interface.


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>


OOV Relation Attribute Symbols

An important relationship in C++ is the "const" relationship. A class that does not modify another external class is shown as a V shape.
A movie star may watch a released movie, but does not modify the movie, but when a movie star is performing in a movie, they do modify the movie.


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.


Combinations

The Oovcde program draws class diagrams from C++ source code. The Oovcde program does not draw multiple instances of a class when there are multiple relations to the same class. It also does not draw multiple relationship lines. Instead, many of the symbols are drawn on a single line. For example, if a class has both an aggregation relation and a function parameter relation to another class, both symbols are drawn.

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/CompFunc BodyFunc ParamExternal Modify / Body(encapsulated) Modify
NoneNoneNoneN / N
Non-refNoneNoneN / Y
Ref constNoneNoneN / N
Ref non-constNoneNoneY / Y
NoneNon-refNoneN / Y
Non-refNon-refNoneN / Y
Ref constNon-refNoneN / Y
Ref non-constNon-refNoneY / Y
NoneNoneNon-ref
Non-refNoneNon-ref
Ref constNoneNon-ref
Ref non-constNoneNon-ref
NoneNon-refNon-ref
Non-refNon-refNon-ref
Ref constNon-refNon-ref
Ref non-constNon-refNon-ref
NoneNoneRef const
Non-refNoneRef const
Ref constNoneRef const
Ref non-constNoneRef const
NoneNon-refRef const
Non-refNon-refRef const
Ref constNon-refRef const
Ref non-constNon-refRef const
NoneNoneRef non-const
Non-refNoneRef non-const
Ref constNoneRef non-const
Ref non-constNoneRef non-const
NoneNon-refRef non-const
Non-refNon-refRef non-const
Ref constNon-refRef non-const
Ref non-constNon-refRef non-const