Skip to content

Commit

Permalink
Actual restriction should be normative.
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson committed Sep 2, 2022
1 parent adc0d48 commit 94cb645
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chapters/annotations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2058,6 +2058,9 @@ \subsection{Protection of Classes}\label{protection-of-classes}
The \lstinline!access! annotation holds for the respective class and all classes that are hierarchically on a lower level, unless overridden by a \lstinline!Protection! annotation with \lstinline!access!.
Overriding \lstinline!access=Access.hide! or \lstinline!access=Access.packageDuplicate! has no effect.

Classes should not use other classes in ways that contradict this protection.
For instance a class with \lstinline!Access.hide! should not be used in the diagram layer of a class with \lstinline!Access.diagram!, and there should not be hyperlinks to classes with \lstinline!Access.icon! (from classes with visible documentation).

\begin{example}
If the annotation is given on the top level of a package and at no other class in this package, then the \lstinline!access! annotation holds for all classes in this package.
\end{example}
Expand All @@ -2071,9 +2074,6 @@ \subsection{Protection of Classes}\label{protection-of-classes}
\item For \lstinline!Access.nonPackageText! all public and protected variables can be stored in a result file, because all variables can be inspected in the class.
\end{itemize}

Classes should not use other classes in ways that contradict this protection.
For instance a class with \lstinline!Access.hide! should not be used in the diagram layer of a class with \lstinline!Access.diagram!, and there should not be hyperlinks to classes with \lstinline!Access.icon! (from classes with visible documentation).

\begin{lstlisting}[language=modelica]
package CommercialFluid // Access icon, documentation, diagram
package Examples // Access icon, documentation, diagram
Expand Down

0 comments on commit 94cb645

Please sign in to comment.