\section{Basic\-Class\-Group\-Factory Class Reference}
\label{class_basic_class_group_factory}\index{BasicClassGroupFactory@{BasicClassGroupFactory}}
Manages (de)allocation of groups of classes in a type safe manner.  


{\tt \#include $<$Basic\-Class\-Group\-Factory.h$>$}

Inheritance diagram for Basic\-Class\-Group\-Factory:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=130pt]{class_basic_class_group_factory__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for Basic\-Class\-Group\-Factory:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=263pt]{class_basic_class_group_factory__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
virtual {\bf $\sim$Basic\-Class\-Group\-Factory} ()
\item 
void {\bf register\-Class} ({\bf Basic\-Class\-Accessor\-Base} $\ast$accessor)
\begin{CompactList}\small\item\em Register a new class with the group. \item\end{CompactList}\item 
virtual {\bf Basic\-Class\-Group} $\ast$ {\bf create} ()
\begin{CompactList}\small\item\em The constructors of each of the classes in the group will be called in the order they where registered with the factory. \item\end{CompactList}\item 
virtual void {\bf destroy} ({\bf Basic\-Class\-Group} $\ast$group)
\begin{CompactList}\small\item\em The destructors of each of the classes in the group will be called in the order they were registered with the factory. \item\end{CompactList}\end{CompactItemize}
\subsection*{Private Attributes}
\begin{CompactItemize}
\item 
{\bf Basic\-Array}$<$ {\bf Basic\-Class\-Factory\-Base}$<$ void $>$ $\ast$ $>$ {\bf class\-Factories}
\end{CompactItemize}


\subsection{Detailed Description}
Manages (de)allocation of groups of classes in a type safe manner. 

Pros: \begin{itemize}
\item Classes can be dynamically added to the group after compile time. \item Unlike {\bf Basic\-Dynamic\-Class\-Factory}{\rm (p.\,\pageref{class_basic_dynamic_class_factory})} constructors and destructors are called. \item Unlike {\bf Basic\-Dynamic\-Class\-Factory}{\rm (p.\,\pageref{class_basic_dynamic_class_factory})} virtual classes are ok. \end{itemize}


Cons: \begin{itemize}
\item Used more memory than {\bf Basic\-Dynamic\-Class\-Factory}{\rm (p.\,\pageref{class_basic_dynamic_class_factory})} because a list of pointers to the classes is kept in each {\bf Basic\-Class\-Group}{\rm (p.\,\pageref{class_basic_class_group})}. \item If you want to use a constructor with arguments you must override both {\bf Basic\-Class\-Factory::create()}{\rm (p.\,\pageref{class_basic_class_factory_a0})} and {\bf Basic\-Class\-Accessor::create\-Class\-Factory()}{\rm (p.\,\pageref{class_basic_class_accessor_b0})} with your own implementations.\item \end{itemize}


See also {\bf Basic\-Dynamic\-Class\-Factory}{\rm (p.\,\pageref{class_basic_dynamic_class_factory})}. 



\subsection{Constructor \& Destructor Documentation}
\index{BasicClassGroupFactory@{Basic\-Class\-Group\-Factory}!~BasicClassGroupFactory@{$\sim$BasicClassGroupFactory}}
\index{~BasicClassGroupFactory@{$\sim$BasicClassGroupFactory}!BasicClassGroupFactory@{Basic\-Class\-Group\-Factory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Basic\-Class\-Group\-Factory::$\sim${\bf Basic\-Class\-Group\-Factory} ()\hspace{0.3cm}{\tt  [virtual]}}\label{class_basic_class_group_factory_a0}




\subsection{Member Function Documentation}
\index{BasicClassGroupFactory@{Basic\-Class\-Group\-Factory}!create@{create}}
\index{create@{create}!BasicClassGroupFactory@{Basic\-Class\-Group\-Factory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Basic\-Class\-Group} $\ast$ Basic\-Class\-Group\-Factory::create ()\hspace{0.3cm}{\tt  [virtual]}}\label{class_basic_class_group_factory_a2}


The constructors of each of the classes in the group will be called in the order they where registered with the factory. 

\begin{Desc}
\item[Returns:]A new instance of the class group. \end{Desc}


Implements {\bf Basic\-Class\-Factory\-Base$<$ Basic\-Class\-Group $>$} {\rm (p.\,\pageref{class_basic_class_factory_base_a0})}.

\index{BasicClassGroupFactory@{Basic\-Class\-Group\-Factory}!destroy@{destroy}}
\index{destroy@{destroy}!BasicClassGroupFactory@{Basic\-Class\-Group\-Factory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Basic\-Class\-Group\-Factory::destroy ({\bf Basic\-Class\-Group} $\ast$ {\em group})\hspace{0.3cm}{\tt  [virtual]}}\label{class_basic_class_group_factory_a3}


The destructors of each of the classes in the group will be called in the order they were registered with the factory. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em group}]The class group to be deallocated. \end{description}
\end{Desc}


Implements {\bf Basic\-Class\-Factory\-Base$<$ Basic\-Class\-Group $>$} {\rm (p.\,\pageref{class_basic_class_factory_base_a1})}.

\index{BasicClassGroupFactory@{Basic\-Class\-Group\-Factory}!registerClass@{registerClass}}
\index{registerClass@{registerClass}!BasicClassGroupFactory@{Basic\-Class\-Group\-Factory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Basic\-Class\-Group\-Factory::register\-Class ({\bf Basic\-Class\-Accessor\-Base} $\ast$ {\em accessor})}\label{class_basic_class_group_factory_a1}


Register a new class with the group. 

{\bf Basic\-Class\-Accessor::create\-Class\-Factory()}{\rm (p.\,\pageref{class_basic_class_accessor_b0})} is called to get an instance of the class factory. Basic\-Class\-Group\-Factory will deallocate this factory when it is destructed.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em accessor}]The accessor for the class. \end{description}
\end{Desc}


\subsection{Member Data Documentation}
\index{BasicClassGroupFactory@{Basic\-Class\-Group\-Factory}!classFactories@{classFactories}}
\index{classFactories@{classFactories}!BasicClassGroupFactory@{Basic\-Class\-Group\-Factory}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Basic\-Array}$<${\bf Basic\-Class\-Factory\-Base}$<$void$>$ $\ast$$>$ {\bf Basic\-Class\-Group\-Factory::class\-Factories}\hspace{0.3cm}{\tt  [private]}}\label{class_basic_class_group_factory_r0}




The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
{\bf Basic\-Class\-Group\-Factory.h}\item 
{\bf Basic\-Class\-Group\-Factory.cpp}\end{CompactItemize}
