Skip to content

Commit

Permalink
Elaborate on the inheritance of figures
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Jun 18, 2020
1 parent f5b0e3a commit ef6ad4c
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions chapters/annotations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,13 @@ \subsection{Annotations for Figures}\doublelabel{annotations-for-figures}
described in \autoref{variable-replacements}, can be used in the
\lstinline!title! of \lstinline!Figure! and \lstinline!Plot!.

The \lstinline!identifier! in \lstinline!Figure! and \lstinline!Plot! is an
optional \lstinline!String! identifier, and is intended to identify the
\lstinline!Figure! and \lstinline!Plot! for programmatic access. A
\lstinline!Figure! must be uniquely identified by its \lstinline!identifier! and
containing class. This means that a \lstinline!Figure! \lstinline!identifier!
must be unique among all \lstinline!Figure! annotations within the same
\lstinline!figures! annotation as well as among all \lstinline!figures!
annotations from inherited classes. A \lstinline!Plot! \lstinline!identifier!
on the other hand is only required to be unique among the \lstinline!plots! in
the the same \lstinline!Figure! annotation.
The \lstinline!identifier! in \lstinline!Figure! and \lstinline!Plot! is an optional \lstinline!String! identifier, and is intended to identify the
\lstinline!Figure! and \lstinline!Plot! for programmatic access. The \lstinline!figures! annotation is inherited in the sense that each class has
a collection of figures comprised by the contents of the \lstinline!figures! annotation in the class itself, as well the \lstinline!figures! annotations
from any base classes. A \lstinline!Figure! must be uniquely identified by its \lstinline!identifier! and a class having it in its collection. This
means that a \lstinline!Figure! \lstinline!identifier! must be unique among all \lstinline!Figure! annotations within the same \lstinline!figures!
annotation as well as among all \lstinline!figures! annotations from inherited classes. A \lstinline!Plot! \lstinline!identifier! on the other hand
is only required to be unique among the \lstinline!plots! in the the same \lstinline!Figure! annotation.

\begin{nonnormative}
For \lstinline!Figure!, this makes it possible to reference the plot from a
Expand All @@ -131,6 +128,11 @@ \subsection{Annotations for Figures}\doublelabel{annotations-for-figures}
the \lstinline!Figure! contains more than one \lstinline!Plot!.
\end{nonnormative}

% henrikt-ma 2020-06: Once there is Modelica URI support for referring to a figure in the collection of a class, it will be easier to explain
% the following statement...
Even though a \lstinline!Figure! annotation can be shared through inheritance between classes in a class hierarchy, note that each simulated class provides
its own data to be displayed in the figure.

Every \lstinline!Plot! has an automatically generated \emph{label} which is
required to be shown as soon as at least one \lstinline!Plot! in the
\lstinline!Figure! has an \lstinline!identifier!. A tool is free to choose both
Expand Down

0 comments on commit ef6ad4c

Please sign in to comment.