\section{Module\-Type Class Reference}
\label{class_module_type}\index{ModuleType@{ModuleType}}
Defines type of module, holds module instances of its type.  


{\tt \#include $<$moduletype.h$>$}

Inheritance diagram for Module\-Type::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3cm]{class_module_type}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
const char $\ast$ {\bf get\-Type} () const 
\begin{CompactList}\small\item\em Return type of class. \item\end{CompactList}\item 
virtual const string \& {\bf get\-Name} () const =0
\begin{CompactList}\small\item\em Returns name of module type (such as 'boom'). \item\end{CompactList}\item 
virtual {\bf Ptr}$<$ {\bf Var\-Def} $>$ $\ast$ {\bf get\-Variables} () const =0
\begin{CompactList}\small\item\em Return array of variables which will module use. \item\end{CompactList}\item 
virtual {\bf Ptr}$<$ {\bf Command} $>$ $\ast$ {\bf get\-Commands} () const =0\label{class_module_type_ab538b4ca10e3ebd37cf3a7bab80245f}

\begin{CompactList}\small\item\em return module-specific commands \item\end{CompactList}\item 
virtual {\bf IModule} $\ast$ {\bf new\-Module} () const =0
\begin{CompactList}\small\item\em Create new module instance. \item\end{CompactList}\item 
void {\bf register\-Module} ({\bf IModule} $\ast$module, const string \&instance\-Name)
\begin{CompactList}\small\item\em Register instance of module named instance\-Name into the system. \item\end{CompactList}\item 
{\bf Var\-Def} $\ast$ {\bf get\-Variable} (const string \&name)
\begin{CompactList}\small\item\em return definition of variable named name or NULL if no such variable definition exist \item\end{CompactList}\item 
{\bf Command} $\ast$ {\bf get\-Command} (const string \&cmd\-Name)
\begin{CompactList}\small\item\em return definition of command or NULL if no such command definition exist \item\end{CompactList}\item 
{\bf Ptr}$<$ {\bf IModule} $>$ \& {\bf get\-Module} (const string \&instance\-Name)
\begin{CompactList}\small\item\em return module named instance\-Name \item\end{CompactList}\item 
{\bf Ptr}$<$ {\bf IModule} $>$ \& {\bf operator[$\,$]} (const string \&instance\-Name)
\begin{CompactList}\small\item\em Same as function {\bf get\-Module()}{\rm (p.\,\pageref{class_module_type_229d0e3be4c18194adf0f3b50eebba36})}. \item\end{CompactList}\item 
void {\bf send\-To\-All} ({\bf TObject} $\ast$mesg)
\begin{CompactList}\small\item\em Send message to all local instances. \item\end{CompactList}\item 
bool {\bf operator==} (const string \&s) const 
\begin{CompactList}\small\item\em test on module name (text comparsion) \item\end{CompactList}\item 
{\bf Module\-Manager} $\ast$ {\bf get\-Manager} ()
\begin{CompactList}\small\item\em return pointer to module manager \item\end{CompactList}\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf Module\-Manager}\label{class_module_type_cc40c5b62c0023c5355969bbf9ac0e7a}

\end{CompactItemize}


\subsection{Detailed Description}
Defines type of module, holds module instances of its type. 



\subsection{Member Function Documentation}
\index{ModuleType@{Module\-Type}!getCommand@{getCommand}}
\index{getCommand@{getCommand}!ModuleType@{Module\-Type}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Command} $\ast$ Module\-Type::get\-Command (const string \& {\em cmd\-Name})}\label{class_module_type_6b6d33c377b7281abc9ea30534dd6a18}


return definition of command or NULL if no such command definition exist 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cmd\-Name}]name of command \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]variable definition \end{Desc}
\index{ModuleType@{Module\-Type}!getManager@{getManager}}
\index{getManager@{getManager}!ModuleType@{Module\-Type}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Module\-Manager}$\ast$ Module\-Type::get\-Manager ()\hspace{0.3cm}{\tt  [inline]}}\label{class_module_type_e356126b4fdb8315c4b8faff261db787}


return pointer to module manager 

\begin{Desc}
\item[Returns:]module manager \end{Desc}
\index{ModuleType@{Module\-Type}!getModule@{getModule}}
\index{getModule@{getModule}!ModuleType@{Module\-Type}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ptr}$<$ {\bf IModule} $>$ \& Module\-Type::get\-Module (const string \& {\em instance\-Name})}\label{class_module_type_229d0e3be4c18194adf0f3b50eebba36}


return module named instance\-Name 

Search only in local module instances ie. instances with module type \char`\"{}this\char`\"{}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em instance\-Name}]name of module instance \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]instance of module \end{Desc}
\index{ModuleType@{Module\-Type}!getName@{getName}}
\index{getName@{getName}!ModuleType@{Module\-Type}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual const string\& Module\-Type::get\-Name () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{class_module_type_8001ea691bcea25ec85ae70871014c81}


Returns name of module type (such as 'boom'). 

Module type name must be unique.

\begin{Desc}
\item[{\bf Todo}]Check unique names in module manager constructor.\end{Desc}
\begin{Desc}
\item[Returns:]name of module type \end{Desc}


Implemented in {\bf Test\-Add\-Loader} {\rm (p.\,\pageref{class_test_add_loader_233fbd39cb42a5f4340815d2190fd55d})}, and {\bf Test\-Compare\-Loader} {\rm (p.\,\pageref{class_test_compare_loader_233fbd39cb42a5f4340815d2190fd55d})}.\index{ModuleType@{Module\-Type}!getType@{getType}}
\index{getType@{getType}!ModuleType@{Module\-Type}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char $\ast$ Module\-Type::get\-Type () const\hspace{0.3cm}{\tt  [virtual]}}\label{class_module_type_1413702cbda682553d02b08afccebfc3}


Return type of class. 

\begin{Desc}
\item[Returns:]type of class \end{Desc}


Reimplemented from {\bf TObject} {\rm (p.\,\pageref{class_t_object_1413702cbda682553d02b08afccebfc3})}.\index{ModuleType@{Module\-Type}!getVariable@{getVariable}}
\index{getVariable@{getVariable}!ModuleType@{Module\-Type}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Var\-Def} $\ast$ Module\-Type::get\-Variable (const string \& {\em name})}\label{class_module_type_2ca8132477f2f2176cbd8068fd98c4ac}


return definition of variable named name or NULL if no such variable definition exist 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]name of variable \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]variable definition \end{Desc}
\index{ModuleType@{Module\-Type}!getVariables@{getVariables}}
\index{getVariables@{getVariables}!ModuleType@{Module\-Type}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf Ptr}$<${\bf Var\-Def}$>$$\ast$ Module\-Type::get\-Variables () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{class_module_type_ffd6c8ffcecd31866e2cc0d417e554d1}


Return array of variables which will module use. 

\begin{Desc}
\item[Returns:]array of variables. \end{Desc}


Implemented in {\bf Test\-Add\-Loader} {\rm (p.\,\pageref{class_test_add_loader_a3e5e20606c028fcae1dfe23432e53cb})}, and {\bf Test\-Compare\-Loader} {\rm (p.\,\pageref{class_test_compare_loader_a3e5e20606c028fcae1dfe23432e53cb})}.\index{ModuleType@{Module\-Type}!newModule@{newModule}}
\index{newModule@{newModule}!ModuleType@{Module\-Type}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf IModule}$\ast$ Module\-Type::new\-Module () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{class_module_type_98c54c8a243d03e32c9a1830d21b97a9}


Create new module instance. 

Typical body of this method is: 

\footnotesize\begin{verbatim} {return new Boom();}
\end{verbatim}
\normalsize


\begin{Desc}
\item[Returns:]new module instance \end{Desc}


Implemented in {\bf Test\-Add\-Loader} {\rm (p.\,\pageref{class_test_add_loader_4d9242345ab1133fe6286f329c8a634d})}, and {\bf Test\-Compare\-Loader} {\rm (p.\,\pageref{class_test_compare_loader_4d9242345ab1133fe6286f329c8a634d})}.\index{ModuleType@{Module\-Type}!operator==@{operator==}}
\index{operator==@{operator==}!ModuleType@{Module\-Type}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Module\-Type::operator== (const string \& {\em s}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_module_type_1e27b27a1062a34f7de2bbf1c84b0979}


test on module name (text comparsion) 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s}]another module name \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true on match \end{Desc}
\index{ModuleType@{Module\-Type}!operator[]@{operator[]}}
\index{operator[]@{operator[]}!ModuleType@{Module\-Type}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ptr}$<$ {\bf IModule} $>$ \& Module\-Type::operator[$\,$] (const string \& {\em instance\-Name})}\label{class_module_type_8939fa484256d2bcdb201ac257068ee0}


Same as function {\bf get\-Module()}{\rm (p.\,\pageref{class_module_type_229d0e3be4c18194adf0f3b50eebba36})}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em instance\-Name}]name of module instance \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]instance of module \end{Desc}
\index{ModuleType@{Module\-Type}!registerModule@{registerModule}}
\index{registerModule@{registerModule}!ModuleType@{Module\-Type}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Module\-Type::register\-Module ({\bf IModule} $\ast$ {\em module}, const string \& {\em instance\-Name})}\label{class_module_type_f13fe7ee0f66b1ea7d298189475daa44}


Register instance of module named instance\-Name into the system. 

Throws exception if instance of name \char`\"{}instance\-Name\char`\"{} already exist in the system.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em module}]module to enregister \item[{\em instance\-Name}]module instance name \end{description}
\end{Desc}
\index{ModuleType@{Module\-Type}!sendToAll@{sendToAll}}
\index{sendToAll@{sendToAll}!ModuleType@{Module\-Type}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Module\-Type::send\-To\-All ({\bf TObject} $\ast$ {\em mesg})}\label{class_module_type_a4822b2e4e8f286b5b055ce5c0a98414}


Send message to all local instances. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mesg}]object representing message \end{description}
\end{Desc}


The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
H:/projs/dot\-NET/eda/src/modulemanager/moduletype.h\item 
H:/projs/dot\-NET/eda/src/modulemanager/moduletype.cpp\end{CompactItemize}
