\section{components}

\subsection{Registry}\label{subsec:registry}\index{registry|textbf}

\textit{registeries}\index{registry} was added to \nova to better support multiple
implementations of different \nova components.  Each extension module only needs
to \textit{register} their own implementations (and export any \textit{ids}\index{registry!id}.
Each component in \nova defines a separate \textit{registery}\index{registry}.

The macro \textit{defregistry}\index{defregistry|textbf} \code{wvu-lib:defregistry} 
declares a new registry. \textit{defregistry} requires two 
parameters: \textit{name} and \textit{type}.  \textit{name} is the name 
of the registry and is used in function names generated by \textit{defregistry}.  
\textit{type} is the object type that is to be registered in the generated registry.
There is also one \textit{key} parameter: \textit{export}.
If \textit{export} is not \textit{nil}, functions created by \textit{defregistry}
will be exported.

\textit{defregistry}\index{defregistry} generates one \textit{defvar} and five functions.
The \textit{defvar} generate by \textit{defregistry} is of the form: ``\textit{*\textbf{NAME}S*}''.
It stores the \textit{associated list}, which is the registry\footnote{The \textit{defvar}
generated by \textit{defregistry} is not exported regardless of \textit{export}}.
The five functions generate by \textit{defregistry} are as follows:
\begin{description}
\item [(\textit{REGISTER-\textbf{NAME}} \textit{id} \textit{\textbf{name}})]
Registers a specified
instance of \textit{type} as the specified \textit{id}.
\item [(\textit{REGISTER-\textbf{NAME}-BY-PARAMETERS} \textit{id} \&rest \textit{params})]
Registers a new instance of \textit{type} as the specified \textit{id}.  The new instance of
\textit{type} is created by applying \textit{params} to the constructor \textit{MAKE-\textbf{TYPE}}.
\item [(\textit{LOOKUP-\textbf{NAME}} \textit{id})]
Returns the registered objected based on the specified \textit{id} 
or nil, if the \textit{id} was not found.
\item [(\textit{ALL-\textbf{NAME}-IDS})]
Returns all \textit{ids} in the \textit{registry} as a list.
\item [(\textit{ALL-\textbf{NAME}S})]
Returns all instances of \textit{type} registered  in the \textit{registry} as a list.
\end{description}

\lstinputlisting[language=lisp,caption=wvu-lib:defregistry,label=code:wvu-lib:defregistry,firstline=19,lastline=59]{code/wvu-lib/tricks/registry.lisp}

\subsection{database}
\subsection{\ldots}


\section{XOMO}
