\doxysection{oggz\+\_\+table.\+h File Reference}
\label{oggz__table_8h}\index{oggz\_table.h@{oggz\_table.h}}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{oggz__table_8h_a72c5d21d2254089d192176e1c310b023}} 
typedef void \textbf{ Oggz\+Table}
\begin{DoxyCompactList}\small\item\em A table of key-\/value pairs. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Oggz\+Table} $\ast$ \textbf{ oggz\+\_\+table\+\_\+new} (void)
\begin{DoxyCompactList}\small\item\em Instantiate a new Oggz\+Table. \end{DoxyCompactList}\item 
void \textbf{ oggz\+\_\+table\+\_\+delete} (\textbf{ Oggz\+Table} $\ast$table)
\begin{DoxyCompactList}\small\item\em Delete an Oggz\+Table. \end{DoxyCompactList}\item 
void $\ast$ \textbf{ oggz\+\_\+table\+\_\+insert} (\textbf{ Oggz\+Table} $\ast$table, long key, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Insert an element into a table. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+table\+\_\+remove} (\textbf{ Oggz\+Table} $\ast$table, long key)
\begin{DoxyCompactList}\small\item\em Remove the element of an Oggz\+Table indexed by a given key. \end{DoxyCompactList}\item 
void $\ast$ \textbf{ oggz\+\_\+table\+\_\+lookup} (\textbf{ Oggz\+Table} $\ast$table, long key)
\begin{DoxyCompactList}\small\item\em Retrieve the element of an Oggz\+Table indexed by a given key. \end{DoxyCompactList}\item 
int \textbf{ oggz\+\_\+table\+\_\+size} (\textbf{ Oggz\+Table} $\ast$table)
\begin{DoxyCompactList}\small\item\em Query the number of elements in an Oggz\+Table. \end{DoxyCompactList}\item 
void $\ast$ \textbf{ oggz\+\_\+table\+\_\+nth} (\textbf{ Oggz\+Table} $\ast$table, int n, long $\ast$key)
\begin{DoxyCompactList}\small\item\em Retrieve the nth element of an Oggz\+Table, and optionally its key. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
A lookup table.

Oggz\+Table is provided for convenience to allow the storage of serialno-\/specific data. 

\doxysubsection{Function Documentation}
\mbox{\label{oggz__table_8h_a989e307feecf2adc2ebe905c067051c4}} 
\index{oggz\_table.h@{oggz\_table.h}!oggz\_table\_delete@{oggz\_table\_delete}}
\index{oggz\_table\_delete@{oggz\_table\_delete}!oggz\_table.h@{oggz\_table.h}}
\doxysubsubsection{oggz\_table\_delete()}
{\footnotesize\ttfamily void oggz\+\_\+table\+\_\+delete (\begin{DoxyParamCaption}\item[{\textbf{ Oggz\+Table} $\ast$}]{table }\end{DoxyParamCaption})}



Delete an Oggz\+Table. 


\begin{DoxyParams}{Parameters}
{\em table} & An Oggz\+Table \\
\hline
\end{DoxyParams}
\mbox{\label{oggz__table_8h_adbcdb0cdf6e8392c78956e911cbf6634}} 
\index{oggz\_table.h@{oggz\_table.h}!oggz\_table\_insert@{oggz\_table\_insert}}
\index{oggz\_table\_insert@{oggz\_table\_insert}!oggz\_table.h@{oggz\_table.h}}
\doxysubsubsection{oggz\_table\_insert()}
{\footnotesize\ttfamily void$\ast$ oggz\+\_\+table\+\_\+insert (\begin{DoxyParamCaption}\item[{\textbf{ Oggz\+Table} $\ast$}]{table,  }\item[{long}]{key,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})}



Insert an element into a table. 

If a previous value existed for this key, it is overwritten with the new data element. 
\begin{DoxyParams}{Parameters}
{\em table} & An Oggz\+Table \\
\hline
{\em key} & Key to access this data element \\
\hline
{\em data} & The new element to add \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em data} & If the element was successfully added \\
\hline
{\em N\+U\+LL} & If adding the element failed due to a realloc() error \\
\hline
\end{DoxyRetVals}
\mbox{\label{oggz__table_8h_a92ea55bffd5657be29cf1972f33364e3}} 
\index{oggz\_table.h@{oggz\_table.h}!oggz\_table\_lookup@{oggz\_table\_lookup}}
\index{oggz\_table\_lookup@{oggz\_table\_lookup}!oggz\_table.h@{oggz\_table.h}}
\doxysubsubsection{oggz\_table\_lookup()}
{\footnotesize\ttfamily void$\ast$ oggz\+\_\+table\+\_\+lookup (\begin{DoxyParamCaption}\item[{\textbf{ Oggz\+Table} $\ast$}]{table,  }\item[{long}]{key }\end{DoxyParamCaption})}



Retrieve the element of an Oggz\+Table indexed by a given key. 


\begin{DoxyParams}{Parameters}
{\em table} & An Oggz\+Table \\
\hline
{\em key} & a key \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The element indexed by {\itshape key} 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em N\+U\+LL} & {\itshape table} is undefined, or no element is indexed by {\itshape key} \\
\hline
\end{DoxyRetVals}
\mbox{\label{oggz__table_8h_a40772505443484de93526882c48f0dd8}} 
\index{oggz\_table.h@{oggz\_table.h}!oggz\_table\_new@{oggz\_table\_new}}
\index{oggz\_table\_new@{oggz\_table\_new}!oggz\_table.h@{oggz\_table.h}}
\doxysubsubsection{oggz\_table\_new()}
{\footnotesize\ttfamily \textbf{ Oggz\+Table}$\ast$ oggz\+\_\+table\+\_\+new (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Instantiate a new Oggz\+Table. 

\begin{DoxyReturn}{Returns}
A new Oggz\+Table 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em N\+U\+LL} & Could not allocate memory for table \\
\hline
\end{DoxyRetVals}
\mbox{\label{oggz__table_8h_a285c3cbdb46e9b8c2a831728182856f1}} 
\index{oggz\_table.h@{oggz\_table.h}!oggz\_table\_nth@{oggz\_table\_nth}}
\index{oggz\_table\_nth@{oggz\_table\_nth}!oggz\_table.h@{oggz\_table.h}}
\doxysubsubsection{oggz\_table\_nth()}
{\footnotesize\ttfamily void$\ast$ oggz\+\_\+table\+\_\+nth (\begin{DoxyParamCaption}\item[{\textbf{ Oggz\+Table} $\ast$}]{table,  }\item[{int}]{n,  }\item[{long $\ast$}]{key }\end{DoxyParamCaption})}



Retrieve the nth element of an Oggz\+Table, and optionally its key. 


\begin{DoxyParams}{Parameters}
{\em table} & An Oggz\+Table \\
\hline
{\em n} & An index into the {\itshape table} \\
\hline
{\em key} & Return pointer for key corresponding to nth data element of {\itshape table}. Ignored if N\+U\+LL. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The nth data element of {\itshape table} 
\end{DoxyReturn}

\begin{DoxyRetVals}{Return values}
{\em N\+U\+LL} & {\itshape table} is undefined, or {\itshape n} is out of range \\
\hline
\end{DoxyRetVals}
\mbox{\label{oggz__table_8h_ac137e535f1da63ee52266b47f114020f}} 
\index{oggz\_table.h@{oggz\_table.h}!oggz\_table\_remove@{oggz\_table\_remove}}
\index{oggz\_table\_remove@{oggz\_table\_remove}!oggz\_table.h@{oggz\_table.h}}
\doxysubsubsection{oggz\_table\_remove()}
{\footnotesize\ttfamily int oggz\+\_\+table\+\_\+remove (\begin{DoxyParamCaption}\item[{\textbf{ Oggz\+Table} $\ast$}]{table,  }\item[{long}]{key }\end{DoxyParamCaption})}



Remove the element of an Oggz\+Table indexed by a given key. 


\begin{DoxyParams}{Parameters}
{\em table} & An Oggz\+Table \\
\hline
{\em key} & a key \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 0} & Success \\
\hline
{\em -\/1} & Not found \\
\hline
\end{DoxyRetVals}
\mbox{\label{oggz__table_8h_a62db2037df45db88a75b89b8a8ac7766}} 
\index{oggz\_table.h@{oggz\_table.h}!oggz\_table\_size@{oggz\_table\_size}}
\index{oggz\_table\_size@{oggz\_table\_size}!oggz\_table.h@{oggz\_table.h}}
\doxysubsubsection{oggz\_table\_size()}
{\footnotesize\ttfamily int oggz\+\_\+table\+\_\+size (\begin{DoxyParamCaption}\item[{\textbf{ Oggz\+Table} $\ast$}]{table }\end{DoxyParamCaption})}



Query the number of elements in an Oggz\+Table. 


\begin{DoxyParams}{Parameters}
{\em table} & An Oggz\+Table \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the number of elements in {\itshape table} 
\end{DoxyReturn}
