Component diagram#

We will now build step by step the picture seen in home page to understand the behavior of each used command.

Definition of the components#

There are 6 components A, D, E, F, G and H, and 2 sub-components of A: B and C.

\begin{umlcomponent}{A}
\umlbasiccomponent{B}
\umlbasiccomponent[y=-3]{C}
\end{umlcomponent}
\umlbasiccomponent[x=-10, y=1]{D}
\umlbasiccomponent[x=3, y=-7.5]{E}
\umlbasiccomponent[x=-2, y=-9]{F}
\umlbasiccomponent[x=-7, y=-8]{G}
\umlbasiccomponent[x=-7, y=-11]{H}

Figure made with TikZ

Figure made with TikZ

Definition of the interfaces#

We define a required interface for the component B, and a provided interface for the component C. We prepare the delegate connector by setting the padding.

\begin{umlcomponent}{A}
\umlbasiccomponent{B}
\umlbasiccomponent[y=-3]{C}

\umlrequiredinterface[interface=C-interface]{C}
\umlprovidedinterface[interface=B-interface, with port, distance=3cm, padding=2.5cm]{B}
\end{umlcomponent}
\umlbasiccomponent[x=-10, y=1]{D}
\umlbasiccomponent[x=3, y=-7.5]{E}
\umlbasiccomponent[x=-2, y=-9]{F}
\umlbasiccomponent[x=-7, y=-8]{G}
\umlbasiccomponent[x=-7, y=-11]{H}

Figure made with TikZ

Figure made with TikZ

Definition of the connectors#

We define 5 assembly connectors and 1 delegate connector.

\begin{umlcomponent}{A}
\umlbasiccomponent{B}
\umlbasiccomponent[y=-3]{C}

\umlrequiredinterface[interface=C-interface]{C}
\umlprovidedinterface[interface=B-interface, with port, distance=3cm, padding=2.5cm]{B}
\end{umlcomponent}
\umlbasiccomponent[x=-10, y=1]{D}
\umlbasiccomponent[x=3, y=-7.5]{E}
\umlbasiccomponent[x=-2, y=-9]{F}
\umlbasiccomponent[x=-7, y=-8]{G}
\umlbasiccomponent[x=-7, y=-11]{H}

\umlassemblyconnector[interface=DA, with port, name=toto]{D}{A}
\umldelegateconnector{A-west-port}{B-west-interface}
\umlVHVassemblyconnector[interface=AE, with port]{A}{E}
\umlHVHassemblyconnector[interface=EF, with port, first arm]{E}{F}
\umlHVHassemblyconnector[interface=GHF, name=GHF, with port, arm2=-2cm, last arm]{G}{F}
\umlport{H}{east}
\draw[tikzuml connection start] (H-east-port) -| (GHF-4);

Figure made with TikZ

Figure made with TikZ

Definition of the notes#

We add notes to explain the node names.

\begin{umlcomponent}{A}
\umlbasiccomponent{B}
\umlbasiccomponent[y=-3]{C}

\umlrequiredinterface[interface=C-interface]{C}
\umlprovidedinterface[interface=B-interface, with port, distance=3cm, padding=2.5cm]{B}
\end{umlcomponent}
\umlbasiccomponent[x=-10, y=1]{D}
\umlbasiccomponent[x=3, y=-7.5]{E}
\umlbasiccomponent[x=-2, y=-9]{F}
\umlbasiccomponent[x=-7, y=-8]{G}
\umlbasiccomponent[x=-7, y=-11]{H}

\umlassemblyconnector[interface=DA, with port, name=toto]{D}{A}
\umldelegateconnector{A-west-port}{B-west-interface}
\umlVHVassemblyconnector[interface=AE, with port]{A}{E}
\umlHVHassemblyconnector[interface=EF, with port, first arm]{E}{F}
\umlHVHassemblyconnector[interface=GHF, name=GHF, with port, arm2=-2cm, last arm]{G}{F}
\umlport{H}{east}
\draw[tikzuml connection start] (H-east-port) -| (GHF-4);

\umlnote[x=-4, y=4, width=14ex]{B-west-interface}{I am the node named B-west-interface}
\umlnote[x=2, y=4, width=14ex]{C-east-interface}{I am the node named C-east-interface}
\umlnote[x=-8.5, y=-2, width=14ex]{toto-interface}{I am the node named toto-interface}
\umlnote[x=-5.5, y=-4.5, width=14ex]{A-south-port}{I am the node named A-south-port}
\umlnote[x=2, y=-11, width=14ex]{F-east-port}{I am the node named F-east-port}

Figure made with TikZ

Figure made with TikZ