User:Emre/tb/architecture/diagrams/legend

From MozillaWiki
Jump to: navigation, search

Legend

Elements used in Class Diagrams

  • Class

    With or without <<interface>> and <<active>> stereotypes;

    • an interface class can be an XPCOM interface or an abstract C++ class exposing public methods
    • an active class has instances, each of which executes and controls its own thread of control

  • Dependency

    Depicted as a simple dashed arrow. With classes, dependency exist for following reasons;

    • one class sends a message to another
    • one class has another as part of its data (e.g. attribute)
    • one class mentions another as a parameter to an operation

  • Association

    Depicted as a solid line between classes, sometimes with its multiplicity, and target name. Used for classes contained by another class as an attribute/property.

  • Inheritance

    Depicted as solid arrow with triangle head.

  • Realization

    Depicted as dashed arrow with triangle head. Used for classes that implement an interface.

Elements used in Sequence Diagrams

  • Class

    With or without <<interface>> and <<active>> stereotypes;

    • an interface class can be an XPCOM interface or an abstract C++ class exposing public methods
    • an active class has instances, each of which executes and controls its own thread of control

  • Lifeline

    Dashed line to show the timing of the message calls.

  • Activation bar

    Depicted as a rectangle on top of lifeline or another activation bar. It corresponds to one of the class' methods being on the stack.

  • Message call

    Depicted as a solid arrow. Corresponds a method call on the given class.


Other Considerations

  • I omit nsISupports interface in diagrams unless there is a good reason to show
  • I don't repeat dependencies carried from interface implementations
  • Almost all basic types are omitted (i.e. ACString, AString etc.)
  • I show only significant method calls in sequence diagrams