\section{Id\-Gen  Class Reference}
\label{class_IdGen}\index{IdGen@{Id\-Gen}}
{\tt \#include $<$idgen.h$>$}

Collaboration diagram for Id\-Gen:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=106pt]{class_IdGen_coll_graph}
\end{center}
\end{figure}
\subsection*{Public Methods}
\begin{CompactItemize}
\item 
{\bf Id\-Gen} (int min=0)
\item 
{\bf $\sim$Id\-Gen} ()
\item 
int {\bf Max} () const
\item 
int {\bf Peek} () const
\item 
int {\bf Get} ()
\item 
void {\bf Free} (int id)
\item 
void {\bf Reset} ()
\item 
int {\bf Number\-Issued} () const
\item 
int {\bf Number\-Used} () const
\item 
int {\bf Number\-Free} () const
\end{CompactItemize}
\subsection*{Private Attributes}
\begin{CompactItemize}
\item 
{\bf Stack}$<$int$>$ {\bf Free\-Id}
\item 
int {\bf Max\-Id}
\item 
int {\bf Min\-Id}
\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
ostream\& {\bf operator$<$$<$} (ostream \&os, const Id\-Gen \&idg)
\end{CompactItemize}


\subsection{Constructor \& Destructor Documentation}
\index{IdGen@{Id\-Gen}!IdGen@{IdGen}}
\index{IdGen@{IdGen}!IdGen@{Id\-Gen}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Id\-Gen::Id\-Gen (int {\em min} = 0)\hspace{0.3cm}{\tt  [inline]}}\label{class_IdGen_a0}




Definition at line 74 of file idgen.h.\footnotesize\begin{verbatim}00075   { MinId=min; MaxId = MinId; }
00076 \end{verbatim}\normalsize 
\index{IdGen@{Id\-Gen}!~IdGen@{$\sim$IdGen}}
\index{~IdGen@{$\sim$IdGen}!IdGen@{Id\-Gen}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Id\-Gen::$\sim$Id\-Gen ()\hspace{0.3cm}{\tt  [inline]}}\label{class_IdGen_a1}




Definition at line 77 of file idgen.h.\footnotesize\begin{verbatim}00078   { /*empty*/ }
00079 \end{verbatim}\normalsize 


\subsection{Member Function Documentation}
\index{IdGen@{Id\-Gen}!Free@{Free}}
\index{Free@{Free}!IdGen@{Id\-Gen}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Id\-Gen::Free (int {\em id})\hspace{0.3cm}{\tt  [inline]}}\label{class_IdGen_a5}




Definition at line 103 of file idgen.h.

Referenced by dd\-Graph::Rem\-Vertex().\footnotesize\begin{verbatim}00104   { 
00105     // Doesnt check for duplicates in the list...
00106 
00107     if(id>=MinId && id<MaxId)
00108         FreeId.Push(id); 
00109 \end{verbatim}\normalsize 
\index{IdGen@{Id\-Gen}!Get@{Get}}
\index{Get@{Get}!IdGen@{Id\-Gen}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Id\-Gen::Get ()\hspace{0.3cm}{\tt  [inline]}}\label{class_IdGen_a4}




Definition at line 90 of file idgen.h.

Referenced by dd\-Graph::Add\-Vertex().\footnotesize\begin{verbatim}00091   {
00092     int id;
00093     if(FreeId.IsEmpty()) 
00094       {
00095         id = MaxId;
00096         ++MaxId;
00097       }
00098 \end{verbatim}\normalsize 
\index{IdGen@{Id\-Gen}!Max@{Max}}
\index{Max@{Max}!IdGen@{Id\-Gen}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Id\-Gen::Max () const\hspace{0.3cm}{\tt  [inline]}}\label{class_IdGen_a2}




Definition at line 80 of file idgen.h.\footnotesize\begin{verbatim}00081   { return MaxId-1; }
00082 \end{verbatim}\normalsize 
\index{IdGen@{Id\-Gen}!NumberFree@{NumberFree}}
\index{NumberFree@{NumberFree}!IdGen@{Id\-Gen}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Id\-Gen::Number\-Free () const\hspace{0.3cm}{\tt  [inline]}}\label{class_IdGen_a9}




Definition at line 120 of file idgen.h.

Referenced by Number\-Used().\footnotesize\begin{verbatim}00121   { return FreeId.Number(); }
00122 \end{verbatim}\normalsize 
\index{IdGen@{Id\-Gen}!NumberIssued@{NumberIssued}}
\index{NumberIssued@{NumberIssued}!IdGen@{Id\-Gen}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Id\-Gen::Number\-Issued () const\hspace{0.3cm}{\tt  [inline]}}\label{class_IdGen_a7}




Definition at line 117 of file idgen.h.

Referenced by Number\-Used().\footnotesize\begin{verbatim}00118   { return (MaxId-MinId); }
00119 \end{verbatim}\normalsize 
\index{IdGen@{Id\-Gen}!NumberUsed@{NumberUsed}}
\index{NumberUsed@{NumberUsed}!IdGen@{Id\-Gen}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Id\-Gen::Number\-Used () const\hspace{0.3cm}{\tt  [inline]}}\label{class_IdGen_a8}




Definition at line 123 of file idgen.h.\footnotesize\begin{verbatim}00124   { return NumberIssued() - NumberFree(); }
00125 \end{verbatim}\normalsize 
\index{IdGen@{Id\-Gen}!Peek@{Peek}}
\index{Peek@{Peek}!IdGen@{Id\-Gen}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Id\-Gen::Peek () const\hspace{0.3cm}{\tt  [inline]}}\label{class_IdGen_a3}




Definition at line 83 of file idgen.h.

Referenced by dd\-Graph::Next\-Free\-Id().\footnotesize\begin{verbatim}00084   {
00085     if(FreeId.IsEmpty())
00086         return MaxId;
00087     return FreeId.Peek();
00088 \end{verbatim}\normalsize 
\index{IdGen@{Id\-Gen}!Reset@{Reset}}
\index{Reset@{Reset}!IdGen@{Id\-Gen}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Id\-Gen::Reset ()\hspace{0.3cm}{\tt  [inline]}}\label{class_IdGen_a6}




Definition at line 111 of file idgen.h.

Referenced by dd\-Graph::Clear().\footnotesize\begin{verbatim}00112   {
00113     FreeId.Clear();
00114     MaxId = MinId;
00115 \end{verbatim}\normalsize 


\subsection{Friends And Related Function Documentation}
\index{IdGen@{Id\-Gen}!operator<<@{operator$<$$<$}}
\index{operator<<@{operator$<$$<$}!IdGen@{Id\-Gen}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ostream\& operator$<$$<$ (ostream \& {\em os}, const Id\-Gen \& {\em idg})\hspace{0.3cm}{\tt  [friend]}}\label{class_IdGen_l0}




Definition at line 126 of file idgen.h.\footnotesize\begin{verbatim}00127   {
00128     os << '[' << idg.MaxId << "] {" << idg.FreeId << '}
00129 \end{verbatim}\normalsize 


\subsection{Member Data Documentation}
\index{IdGen@{Id\-Gen}!FreeId@{FreeId}}
\index{FreeId@{FreeId}!IdGen@{Id\-Gen}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Stack}$<$ int $>$ Id\-Gen::Free\-Id\hspace{0.3cm}{\tt  [private]}}\label{class_IdGen_o0}




Definition at line 63 of file idgen.h.\index{IdGen@{Id\-Gen}!MaxId@{MaxId}}
\index{MaxId@{MaxId}!IdGen@{Id\-Gen}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Id\-Gen::Max\-Id\hspace{0.3cm}{\tt  [private]}}\label{class_IdGen_o1}




Definition at line 66 of file idgen.h.\index{IdGen@{Id\-Gen}!MinId@{MinId}}
\index{MinId@{MinId}!IdGen@{Id\-Gen}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Id\-Gen::Min\-Id\hspace{0.3cm}{\tt  [private]}}\label{class_IdGen_o2}




Definition at line 70 of file idgen.h.

The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
{\bf idgen.h}\end{CompactItemize}
