\hypertarget{classcore_1_1_command_list}{}\doxysection{core\+::Command\+List Class Reference}
\label{classcore_1_1_command_list}\index{core::CommandList@{core::CommandList}}


{\ttfamily \#include $<$Command\+List.\+h$>$}



Inheritance diagram for core\+::Command\+List\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=191pt]{classcore_1_1_command_list__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for core\+::Command\+List\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=191pt]{classcore_1_1_command_list__coll__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{classcore_1_1_command_list_a7a45e75e3d21a25fd3f7e887acf395e9}{add}} (\mbox{\hyperlink{classcore_1_1_command}{Command}} \&command, std\+::string name=\char`\"{}\char`\"{})
\item 
void \mbox{\hyperlink{classcore_1_1_command_list_aaac684effb9ecf5238d23ca60d3fffaa}{remove}} (\mbox{\hyperlink{classcore_1_1_command}{Command}} \&command)
\item 
bool \mbox{\hyperlink{classcore_1_1_command_list_a589f3eba55beebad94a5978970e0650d}{process\+Request}} (std\+::string request, \mbox{\hyperlink{classcore_1_1_t_c_p_session}{T\+C\+P\+Session}} $\ast$session, std\+::stringstream \&data)
\item 
bool \mbox{\hyperlink{classcore_1_1_command_list_a40211d843807cd65f6614c17efcb00e4}{grab\+Input}} (\mbox{\hyperlink{classcore_1_1_t_c_p_session}{T\+C\+P\+Session}} $\ast$session, \mbox{\hyperlink{classcore_1_1_command}{Command}} \&command)
\item 
void \mbox{\hyperlink{classcore_1_1_command_list_a2bf14022331b23e0878aa9d676a90110}{clear\+Grab}} (\mbox{\hyperlink{classcore_1_1_t_c_p_session}{T\+C\+P\+Session}} $\ast$session)
\item 
int \mbox{\hyperlink{classcore_1_1_command_list_a98939555ca061b445019a841726e3ef6}{process\+Command}} (std\+::string request, \mbox{\hyperlink{classcore_1_1_t_c_p_session}{T\+C\+P\+Session}} $\ast$session, std\+::stringstream \&data)
\end{DoxyCompactItemize}
\doxysubsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
std\+::vector$<$ \mbox{\hyperlink{classcore_1_1_command}{Command}} $\ast$ $>$ \mbox{\hyperlink{classcore_1_1_command_list_a435f09d15c78dad43e7bca4977d6bdf1}{commands}}
\end{DoxyCompactItemize}
\doxysubsection*{Additional Inherited Members}


\doxysubsection{Detailed Description}
\mbox{\hyperlink{classcore_1_1_command_list}{Command\+List}}

This object organizes \mbox{\hyperlink{classcore_1_1_command}{Command}} objects into a list that is used to parse an input and run the process associated with the selected command. 

\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classcore_1_1_command_list_a7a45e75e3d21a25fd3f7e887acf395e9}\label{classcore_1_1_command_list_a7a45e75e3d21a25fd3f7e887acf395e9}} 
\index{core::CommandList@{core::CommandList}!add@{add}}
\index{add@{add}!core::CommandList@{core::CommandList}}
\doxysubsubsection{\texorpdfstring{add()}{add()}}
{\footnotesize\ttfamily void core\+::\+Command\+List\+::add (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classcore_1_1_command}{Command}} \&}]{command,  }\item[{std\+::string}]{name = {\ttfamily \char`\"{}\char`\"{}} }\end{DoxyParamCaption})}

Add a new command to the command list and assign a default search value. \mbox{\Hypertarget{classcore_1_1_command_list_a2bf14022331b23e0878aa9d676a90110}\label{classcore_1_1_command_list_a2bf14022331b23e0878aa9d676a90110}} 
\index{core::CommandList@{core::CommandList}!clearGrab@{clearGrab}}
\index{clearGrab@{clearGrab}!core::CommandList@{core::CommandList}}
\doxysubsubsection{\texorpdfstring{clearGrab()}{clearGrab()}}
{\footnotesize\ttfamily void core\+::\+Command\+List\+::clear\+Grab (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classcore_1_1_t_c_p_session}{T\+C\+P\+Session}} $\ast$}]{session }\end{DoxyParamCaption})}

\mbox{\Hypertarget{classcore_1_1_command_list_a40211d843807cd65f6614c17efcb00e4}\label{classcore_1_1_command_list_a40211d843807cd65f6614c17efcb00e4}} 
\index{core::CommandList@{core::CommandList}!grabInput@{grabInput}}
\index{grabInput@{grabInput}!core::CommandList@{core::CommandList}}
\doxysubsubsection{\texorpdfstring{grabInput()}{grabInput()}}
{\footnotesize\ttfamily bool core\+::\+Command\+List\+::grab\+Input (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classcore_1_1_t_c_p_session}{T\+C\+P\+Session}} $\ast$}]{session,  }\item[{\mbox{\hyperlink{classcore_1_1_command}{Command}} \&}]{command }\end{DoxyParamCaption})}

Use \mbox{\hyperlink{classcore_1_1_command_list_a40211d843807cd65f6614c17efcb00e4}{grab\+Input()}} within a \mbox{\hyperlink{classcore_1_1_command}{Command}} object to force the requesting handler to receive all further input from the socket. Use release\+Grab() method to release the session back to normal command processing. \mbox{\Hypertarget{classcore_1_1_command_list_a98939555ca061b445019a841726e3ef6}\label{classcore_1_1_command_list_a98939555ca061b445019a841726e3ef6}} 
\index{core::CommandList@{core::CommandList}!processCommand@{processCommand}}
\index{processCommand@{processCommand}!core::CommandList@{core::CommandList}}
\doxysubsubsection{\texorpdfstring{processCommand()}{processCommand()}}
{\footnotesize\ttfamily int core\+::\+Command\+List\+::process\+Command (\begin{DoxyParamCaption}\item[{std\+::string}]{request,  }\item[{\mbox{\hyperlink{classcore_1_1_t_c_p_session}{T\+C\+P\+Session}} $\ast$}]{session,  }\item[{std\+::stringstream \&}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}

This method is used to implement the functionality of the requested command. This pure virtual function must be implemented in your inheriting object.


\begin{DoxyParams}{Parameters}
{\em request} & The request that was entered by the user to invoke this command. \\
\hline
{\em session} & Specify the requesting session so that the execution of the command process can return its output to the session. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns 0 if execution of the command was successful. Otherwise returns a non-\/zero value indicating an error condition. 
\end{DoxyReturn}


Reimplemented from \mbox{\hyperlink{classcore_1_1_command_a068ebc22f7a067cf23ed2c17f95b06e9}{core\+::\+Command}}.

\mbox{\Hypertarget{classcore_1_1_command_list_a589f3eba55beebad94a5978970e0650d}\label{classcore_1_1_command_list_a589f3eba55beebad94a5978970e0650d}} 
\index{core::CommandList@{core::CommandList}!processRequest@{processRequest}}
\index{processRequest@{processRequest}!core::CommandList@{core::CommandList}}
\doxysubsubsection{\texorpdfstring{processRequest()}{processRequest()}}
{\footnotesize\ttfamily bool core\+::\+Command\+List\+::process\+Request (\begin{DoxyParamCaption}\item[{std\+::string}]{request,  }\item[{\mbox{\hyperlink{classcore_1_1_t_c_p_session}{T\+C\+P\+Session}} $\ast$}]{session,  }\item[{std\+::stringstream \&}]{data }\end{DoxyParamCaption})}

Use this method to apply a parsed P\+String to the command set and execute the matching parameter. The selected command will return a true on a call to \mbox{\hyperlink{classcore_1_1_command_abdc0d7a4693a7f7940bbae20c4a667c0}{check()}}. If there is a handler that has a grab on the process handler then control is given to the process handler holding the grab on the input. \mbox{\Hypertarget{classcore_1_1_command_list_aaac684effb9ecf5238d23ca60d3fffaa}\label{classcore_1_1_command_list_aaac684effb9ecf5238d23ca60d3fffaa}} 
\index{core::CommandList@{core::CommandList}!remove@{remove}}
\index{remove@{remove}!core::CommandList@{core::CommandList}}
\doxysubsubsection{\texorpdfstring{remove()}{remove()}}
{\footnotesize\ttfamily void core\+::\+Command\+List\+::remove (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classcore_1_1_command}{Command}} \&}]{command }\end{DoxyParamCaption})}

Remove a command object from the command list. 

\doxysubsection{Member Data Documentation}
\mbox{\Hypertarget{classcore_1_1_command_list_a435f09d15c78dad43e7bca4977d6bdf1}\label{classcore_1_1_command_list_a435f09d15c78dad43e7bca4977d6bdf1}} 
\index{core::CommandList@{core::CommandList}!commands@{commands}}
\index{commands@{commands}!core::CommandList@{core::CommandList}}
\doxysubsubsection{\texorpdfstring{commands}{commands}}
{\footnotesize\ttfamily std\+::vector$<$\mbox{\hyperlink{classcore_1_1_command}{Command}} $\ast$$>$ core\+::\+Command\+List\+::commands\hspace{0.3cm}{\ttfamily [protected]}}

The vector of all registered commands. 

The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{_command_list_8h}{Command\+List.\+h}}\item 
\mbox{\hyperlink{_command_list_8cpp}{Command\+List.\+cpp}}\end{DoxyCompactItemize}
