Skip to content

Commit

Permalink
Clarify convertClassIf (modelica#2533)
Browse files Browse the repository at this point in the history
Clarify literal values for convertClassIf (string and enumeration), and that Integer and Boolean is also allosed.
Closes modelica#2451
  • Loading branch information
HansOlsson committed Mar 17, 2020
1 parent 22a2766 commit 7bf492e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions chapters/annotations.tex
Expand Up @@ -1566,6 +1566,12 @@ \subsubsection{Conversion rules}\doublelabel{conversion-rules}
These are considered before \lstinline!convertClass! and \lstinline!convertMessage! for the same
\lstinline!OldClass!.

The old element should be of a \lstinline!Boolean!, \lstinline!Integer!, \lstinline!String!, or enumeration
type and the match is based on the literal value of the modifier.
For string elements the value argument to \lstinline!convertClassIf! shall be up-quoted, e.g. \lstinline!"\"My String\""!,
and for enumeration literals only the enumeration literal part of the old value matters, e.g., \lstinline!red!
for \lstinline!"Colors.red"!.

\paragraph*{convertElement("OldClass", "OldName", "NewName")}\doublelabel{convertelementoldclassoldnamenewname}

In \lstinline!OldClass! convert element \lstinline!OldName! to \lstinline!NewName!.
Expand Down

0 comments on commit 7bf492e

Please sign in to comment.