%%%%%%%%%%%%%%%%%%%%%%%%%%%begin%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Interfaces}

\subsection{CERR}
\label{err:cerr}

For a description of errorlevels see section \ref{err:errlvl} on page \pageref{err:errlvl}.

\subsubsection{CERR()}
\begin{quote}
Sets watchlevel to WARNING, and initializes the list.
\end{quote}


\subsubsection{CERR( IERR\_gui)}
\begin{quote}
Sets watchlevel to WARNING, outmode to GUI and initialies the list.
\end{quote}


\subsubsection{void registergui( IERR\_gui)}
\begin{quote}
Registers the guiobject and sets outmode to GUI;
\end{quote}


\subsubsection{boolean setoumode( int mode)}
\begin{quote}
Sets outmode to mode, returns true if successfull, and false otherwise.
Note that a guiobject must be registered to switch to guimode.
\end{quote}


\subsubsection{int getoutmode()}
\begin{quote}
Returns the current outmode value.
\end{quote}


\subsubsection{int getwatchlevel()}
\begin{quote}
Returns the current watchlevel.
\end{quote}


\subsubsection{int setwatchlevel(int lvl)}
\begin{quote}
Sets the current watchlevel to lvl if possible, note that only levels
from INFO to HAZARD are allowed, which means that under no circumstances
can HAZARD errors be overriden.
\end{quote}


\subsubsection{info(String group, String what)}
\begin{quote}
Adds the specified info to the error list.
\end{quote}


\subsubsection{warning(String group, String what)}
\begin{quote}
Adds the specified warning to the error list.
\end{quote}


\subsubsection{error(String group, String where, String what)}
\begin{quote}
Adds the specified error to the errorlist.
\end{quote}


\subsubsection{severe(String group, String where, String what)}
\begin{quote}
Adds the specified severe error to the errorlist.
\end{quote}

\subsubsection{hazard(String group, String where, String what)}
\begin{quote}
Adds the specified hazardous error to the errorlist.
\end{quote}

\subsubsection{specailerror(String group, int severity, String where, String what)}
\begin{quote}
Adds this special error of errorlevel severity to the error list.
\end{quote}


\subsubsection{void print(void)}
\begin{quote}
Prints the CNVList where the errorcodes are saved.
This also prints the current watchlevel and the running errornumber.
\end{quote}


\subsubsection{void printcnv(void)}
\begin{quote}
Prints the CNVlist via CNVList.print().
\end{quote}


\subsubsection{boolean saveXML(CNVList list)}
\begin{quote}
List should contain path(String), file(String) and ext(String).
The errorlist is saved to path + file + "-error" + ext.
Returns true if everythings ok, false otherwise.
\end{quote}


\subsubsection{boolean saveXML(String path)}
\begin{quote}
The errorlist is saved to path.
Returns false if an error occured, and true otherwise.
\end{quote}


\subsubsection{boolean loadXML(CNVList list)}
\begin{quote}
List should contain path(String), file(String) and ext(String).
The errorlist is loaded from path + file + "-error" + ext.
Returns false if an error occured, and true otherwise.
\end{quote}


\subsubsection{boolean loadXML(String path)}
\begin{quote}
The errorlist is loaded from path.
Returns false if an error occured, and true otherwise.
\end{quote}


\subsubsection{void purge(void)}
\begin{quote}
Clears the errorlist, note that the watchlevel will remain the same.
\end{quote}

%%%%%%  IERR gui %%%%% interface
\subsection{IERR\_gui}
\label{err:ierr-gui}
In order to work with the CERR class the gui needs to implement IERR\_gui.

\subsubsection{void displayError( String errormsg)}
\begin{quote}
This function displays the error.
\end{quote}

\subsubsection{void beep()}
\begin{quote}
This is sounded when a HAZARD comes up.
\end{quote}

