diff --git a/chapters/annotations.tex b/chapters/annotations.tex index 0ef30f50b..abd2db044 100644 --- a/chapters/annotations.tex +++ b/chapters/annotations.tex @@ -520,11 +520,12 @@ \subsection{Single Use of Class}\label{annotation-for-single-use-of-class}\label For state machines it is useful to have single instances of local classes. This can be done using: \begin{lstlisting}[language=modelica] -Boolean singleInstance = true; +Boolean singleInstance; \end{lstlisting} -The annotation \fmtannotationindex{singleInstance} in a class indicates that there should only be one component instance of the class, and it should be in the same scope as the class is defined. +The annotation \fmtannotationindex{singleInstance} if \lstinline!true! in a class indicates that there should only be one component instance of the class, and it should be in the same scope as the class is defined. The intent is to remove the class when the component is removed and to prevent duplication of the component. +If \lstinline!false! it has no impact. \subsection{Connection Restrictions}\label{connection-restrictions} @@ -1264,11 +1265,11 @@ \section{Graphical User Interface}\label{annotations-for-the-graphical-user-inte The $\mathit{view}$ is a \lstinline!String! literal where \lstinline!"info"! means class documentation (``information''), \lstinline!"diagram"! means diagram view, \lstinline!"icon"! means icon view, and \lstinline!"text"! means Modelica source code (``text''). \begin{lstlisting} -Boolean DocumentationClass = true; +Boolean DocumentationClass; \end{lstlisting}% \annotationindex{DocumentationClass} -Only allowed as class annotation on any kind of class and implies that this class and all classes within it are treated as having the annotation \lstinline!preferredView = "info"!. +Only allowed as class annotation on any kind of class and if set to \lstinline!true! implies that this class and all classes within it are treated as having the annotation \lstinline!preferredView = "info"!. If the annotation \lstinline!preferredView! is explicitly set for a class, it has precedence over a \lstinline!DocumentationClass! annotation. \begin{nonnormative}