\documentclass{article}

\author{
  Documentation automatically generated by\\
  \\
  \textbf{\TeX -Reporter}\\
  written by Bert Sch\"onw\"alder, 1996}
\title{Link}
\date{July 14, 1996}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Definitions for Class reports
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Class
\newcommand{\stBeginClass}[1]{\section{Class: \emph{#1}}}
\newcommand{\stEndClass}[1]{}

% MetaClass
\newcommand{\stBeginMetaClass}[1]{\section{Metaclass: \emph{#1}}}
\newcommand{\stEndMetaClass}[1]{}

% Class Parameters
\newcommand{\stBeginClassParameters}[1]{\begin{flushleft}\begin{description}}
\newcommand{\stEndClassParameters}[1]{\end{description}\end{flushleft}}

%Class Parameter: Super class, Category, Comment
\newcommand{\stClassParameterSuper}[1]{\item[Super class:] #1}
\newcommand{\stClassParameterCategory}[1]{\item[Category:] #1}
\newcommand{\stClassParameterComment}[1]{\item[Comment:] #1}

%Class Parameter: Instance variables
\newcommand{\stBeginClassParameterInstVars}{\item[Instance variables:]}
  \newcommand{\stClassParameterInstVar}[1]{#1}
  \newcommand{\stClassParameterInstVarSep}{, }
\newcommand{\stEndClassParameterInstVars}{}

%Class Parameter: Class variables
\newcommand{\stBeginClassParameterClassVars}{\item[Class variables:]}
  \newcommand{\stClassParameterClassVar}[1]{#1}
  \newcommand{\stClassParameterClassVarSep}{, }
\newcommand{\stEndClassParameterClassVars}{}

%Class Parameter: Pool dictionaries
\newcommand{\stBeginClassParameterPoolDicts}{\item[Pool dictionaries:]}
  \newcommand{\stClassParameterPoolDict}[1]{#1}
  \newcommand{\stClassParameterPoolDictSep}{, }
\newcommand{\stEndClassParameterPoolDicts}{}

%MetaClass: Instance variables
\newcommand{\stBeginMetaClassInstVars}{\begin{description}\item[Instance variables:]}
  \newcommand{\stMetaClassInstVar}[1]{#1}
  \newcommand{\stMetaClassInstVarSep}{, }
\newcommand{\stEndMetaClassInstVars}{\end{description}}

% Class Protocols
\newcommand{\stBeginClassProtocols}[1]{}
\newcommand{\stEndClassProtocols}[1]{}

% Protocol
\newcommand{\stBeginProtocol}[1]{\subsection{Protocol: \emph{#1}}}
\newcommand{\stEndProtocol}[1]{}

% Method
\newcommand{\stBeginMethod}[1]{\subsubsection{Method \emph{#1}}\begin{flushleft}}
\newcommand{\stEndMethod}[1]{\end{flushleft}}

% Unknown Characters
\newcommand{\stUnknown}[1]{\texttt{\symbol{#1}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Definitions for Smalltalk source formatting
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\TAB}{\hspace*{0.5cm}}
\newcommand{\CR}{\par}
\newcommand{\CRCR}{\vspace*{0.4cm}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Definitions for Smalltalk source highlighting
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Variables: ARGuments, TEMporary, INStance, CLAss, and GLObal ones
\newcommand{\ARG}[1]{\textbf{#1}}
\newcommand{\TEM}[1]{\textbf{#1}}
\newcommand{\INS}[1]{\textbf{#1}}
\newcommand{\CLA}[1]{\textbf{#1}}
\newcommand{\GLO}[1]{\textbf{#1}}

% Literals: NUMbers, literal ARRays, STRings, SYMbols, CHAracters, and CONstants
\newcommand{\NUM}[1]{\texttt{#1}}
\newcommand{\ARR}[1]{\texttt{#1}}
\newcommand{\STR}[1]{\texttt{#1}}
\newcommand{\SYM}[1]{\texttt{#1}}
\newcommand{\CHA}[1]{\texttt{#1}}
\newcommand{\CON}[1]{\texttt{#1}}

%Misc: COMments, METhod comments, method SELectors, and PRImitives
\newcommand{\COM}[1]{\textit{#1}}
\newcommand{\MET}[1]{\textit{\textbf{#1}}}
\newcommand{\SEL}[1]{\textsf{\textbf{#1}}}
\newcommand{\PRI}[1]{\textsf{#1}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document start
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Class: Link
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\stBeginClass{Link}
  \stBeginClassParameters{Link}
    \stClassParameterSuper{Object}
    \stClassParameterCategory{Collections-Support}
    \stBeginClassParameterInstVars
      \stClassParameterInstVar{nextLink}
    \stEndClassParameterInstVars
    \stClassParameterComment{Class Link represents a simple record of a pointer to another Link.\CR
    \CRCR
    Instance Variables:\CR
    \TAB nextLink\TAB $<$Link$>$ a pointer referencing the next Link in the chain}
  \stEndClassParameters{Link}
  \stBeginClassProtocols{Link}

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % Protokol: Link>accessing
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \stBeginProtocol{accessing}

      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      % Method: Link nextLink
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

      \stBeginMethod{nextLink}
        \SEL{nextLink}\CR
        \TAB \MET{\stUnknown{34}Answer the Link to which the receiver points.\stUnknown{34}}\CR
        \CRCR
        \TAB \stUnknown{94}\INS{nextLink}
      \stEndMethod{nextLink}

      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      % Method: Link nextLink:
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

      \stBeginMethod{nextLink:}
        \SEL{nextLink:} \ARG{aLink} \CR
        \TAB \MET{\stUnknown{34}Store the argument as the Link to which the receiver refers.\stUnknown{34}}\CR
        \CRCR
        \TAB \stUnknown{94}\INS{nextLink} := \ARG{aLink}
      \stEndMethod{nextLink:}
    \stEndProtocol{accessing}
  \stEndClassProtocols{Link}
  \stBeginMetaClass{Link class}
    \stBeginClassProtocols{Link class}

      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      % Protokol: Link class>instance creation
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

      \stBeginProtocol{instance creation}

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        % Method: Link class nextLink:
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

        \stBeginMethod{nextLink:}
          \SEL{nextLink:} \ARG{aLink} \CR
          \TAB \MET{\stUnknown{34}Answer a new instance of the receiver referring to the argument, aLink.\stUnknown{34}}\CR
          \CRCR
          \TAB \stUnknown{94}\INS{self} new\CR
          \TAB \TAB nextLink: \ARG{aLink};\CR
          \TAB \TAB yourself
        \stEndMethod{nextLink:}
      \stEndProtocol{instance creation}
    \stEndClassProtocols{Link class}
  \stEndMetaClass{Link class}
\stEndClass{Link}
\end{document}
