Skip to content

Commit

Permalink
Clean up table of inheritance rules
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Sep 22, 2020
1 parent 19969aa commit cd4a78a
Showing 1 changed file with 29 additions and 30 deletions.
59 changes: 29 additions & 30 deletions chapters/inheritance.tex
Expand Up @@ -145,51 +145,50 @@ \subsection{Restrictions on the Kind of Base Class}\label{restrictions-on-the-ki
can be used in an extends clause of another kind of specialized class
(the grey cells mark the few exceptional cases, where a specialized
class can be derived from a specialized class of another kind):

% LaTeXML does not handle resizebox. So don't use it for HTML

\begin{table}[H]
% latexml does not like resizebox
\ifpdf\resizebox{\textwidth}{!}{\else\fi%

\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|}
% The PDF contains an excessive amount of vertical space here, but it seems like a bad idea to try to make it go away
% by adding LaTeX spacing commands that will cause problems later when things move around.
\begin{center}
% LaTeXML does not handle resizebox, so don't use it for HTML.
\ifpdf\resizebox{\textwidth}{!}{\else\fi%
\begin{tabular}{|c||c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
& \multicolumn{12}{c|}{\tablehead{Base Class}} \\
\hline
\tablehead{Derived} & \multirow{2}{*}{package} & \multirow{2}{*}{operator} & \multirow{2}{*}{function} & operator & \multirow{2}{*}{type} & \multirow{2}{*}{record} & operator & expandable & \multirow{2}{*}{connector} & \multirow{2}{*}{block} & \multirow{2}{*}{model} & \multirow{2}{*}{class} \\
\tablehead{Class} & & & & function & & & record & connector & & & & \\
\hline
package & yes & & & & & & & & & & & \cellcolor{lightgray}yes \\
\tablehead{Derived} & \multirow{2}{*}{\lstinline!package!} & \multirow{2}{*}{\lstinline!operator!} & \multirow{2}{*}{\lstinline!function!} & \lstinline!operator! & \multirow{2}{*}{\lstinline!type!} & \multirow{2}{*}{\lstinline!record!} & \lstinline!operator! & \lstinline!expandable! & \multirow{2}{*}{\lstinline!connector!} & \multirow{2}{*}{\lstinline!block!} & \multirow{2}{*}{\lstinline!model!} & \multirow{2}{*}{\lstinline!class!} \\
\tablehead{Class} & & & & \lstinline!function! & & & \lstinline!record! & \lstinline!connector! & & & & \\
\hline
\hline
\lstinline!package! & yes & & & & & & & & & & & \cellcolor{lightgray}yes \\
\hline
operator & & yes & & & & & & & & & & \cellcolor{lightgray}yes \\
\lstinline!operator! & & yes & & & & & & & & & & \cellcolor{lightgray}yes \\
\hline
function & & & yes & & & & & & & & & \cellcolor{lightgray}yes \\
\lstinline!function! & & & yes & & & & & & & & & \cellcolor{lightgray}yes \\
\hline
operator & & & \cellcolor{lightgray} & \multirow{2}{*}{yes} & & & & & & & & \cellcolor{lightgray} \\
function & & & \multirow{-2}{*}{\cellcolor{lightgray}yes} & & & & & & & & & \multirow{-2}{*}{\cellcolor{lightgray}yes} \\
\lstinline!operator! & & & \cellcolor{lightgray} & \multirow{2}{*}{yes} & & & & & & & & \cellcolor{lightgray} \\
\lstinline!function! & & & \multirow{-2}{*}{\cellcolor{lightgray}yes} & & & & & & & & & \multirow{-2}{*}{\cellcolor{lightgray}yes} \\
\hline
type & & & & & yes & & & & & & & \cellcolor{lightgray}yes \\
\lstinline!type! & & & & & yes & & & & & & & \cellcolor{lightgray}yes \\
\hline
record & & & & & & yes & & & & & & \cellcolor{lightgray}yes \\
\lstinline!record! & & & & & & yes & & & & & & \cellcolor{lightgray}yes \\
\hline
operator & & & & & & & \multirow{2}{*}{yes} & & & & & \cellcolor{lightgray} \\
record & & & & & & & & & & & & \multirow{-2}{*}{\cellcolor{lightgray}yes} \\
\lstinline!operator! & & & & & & & \multirow{2}{*}{yes} & & & & & \cellcolor{lightgray} \\
\lstinline!record! & & & & & & & & & & & & \multirow{-2}{*}{\cellcolor{lightgray}yes} \\
\hline
expandable & & & & & & & & \multirow{2}{*}{yes} & & & & \cellcolor{lightgray} \\
connector & & & & & & & & & & & & \multirow{-2}{*}{\cellcolor{lightgray}yes} \\
\lstinline!expandable! & & & & & & & & \multirow{2}{*}{yes} & & & & \cellcolor{lightgray} \\
\lstinline!connector! & & & & & & & & & & & & \multirow{-2}{*}{\cellcolor{lightgray}yes} \\
\hline
connector & & & & & \cellcolor{lightgray}yes & \cellcolor{lightgray}yes & \cellcolor{lightgray}yes & & yes & & & \cellcolor{lightgray}yes \\
\lstinline!connector! & & & & & \cellcolor{lightgray}yes & \cellcolor{lightgray}yes & \cellcolor{lightgray}yes & & yes & & & \cellcolor{lightgray}yes \\
\hline
block & & & & & & \cellcolor{lightgray}yes & & & & yes & & \cellcolor{lightgray}yes \\
\lstinline!block! & & & & & & \cellcolor{lightgray}yes & & & & yes & & \cellcolor{lightgray}yes \\
\hline
model & & & & & & \cellcolor{lightgray}yes & & & & \cellcolor{lightgray}yes & yes & \cellcolor{lightgray}yes \\
\lstinline!model! & & & & & & \cellcolor{lightgray}yes & & & & \cellcolor{lightgray}yes & yes & \cellcolor{lightgray}yes \\
\hline
class & & & & & & & & & & & & yes \\
\lstinline!class! & & & & & & & & & & & & yes \\
\hline
\end{tabular}
% close resizebox
\ifpdf}\else\fi%
\end{table}
\end{tabular}
% Close resizebox.
\ifpdf}\else\fi%
\end{center}

If a derived class is inherited from another type of specialized class,
then the result is a specialized class of the derived class type.
Expand Down

0 comments on commit cd4a78a

Please sign in to comment.