Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / Project 2 / docs / latex / classCommand.tex
blob: 93bf9090cac62786272c932bde8e7276ff1de6f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
\hypertarget{classCommand}{}\doxysection{Command Class Reference}
\label{classCommand}\index{Command@{Command}}


Stores a 256 character name and a function pointer to be executed when calling \mbox{\hyperlink{classCommand_a2134b97948833d1ef31c6fb5ed200bed}{run()}}  




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

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classCommand_a18df2d81039392daeb0b78c346a70537}\label{classCommand_a18df2d81039392daeb0b78c346a70537}} 
{\bfseries Command} ()
\begin{DoxyCompactList}\small\item\em Leaves name empty and exec function pointer to nullptr. \end{DoxyCompactList}\item 
\mbox{\hyperlink{classCommand_a96dda87aba05825c0e8a0323bd25c826}{Command}} (const char $\ast$name, void($\ast$exec)(const char $\ast$params))
\begin{DoxyCompactList}\small\item\em Copies contents of name\+In\+Menu and stores exec. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classCommand_a2134b97948833d1ef31c6fb5ed200bed}{run}} (const char $\ast$params) const
\begin{DoxyCompactList}\small\item\em Executes the stored function pointer. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classCommand_addaa3c970a31f3babd990ca453538f9b}\label{classCommand_addaa3c970a31f3babd990ca453538f9b}} 
const char $\ast$ {\bfseries get\+\_\+name} () const
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Stores a 256 character name and a function pointer to be executed when calling \mbox{\hyperlink{classCommand_a2134b97948833d1ef31c6fb5ed200bed}{run()}} 

\mbox{\hyperlink{classMenu}{Menu}} uses this class for a more generic implementation of it\textquotesingle{}s navigate function. 

\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classCommand_a96dda87aba05825c0e8a0323bd25c826}\label{classCommand_a96dda87aba05825c0e8a0323bd25c826}} 
\index{Command@{Command}!Command@{Command}}
\index{Command@{Command}!Command@{Command}}
\doxysubsubsection{\texorpdfstring{Command()}{Command()}}
{\footnotesize\ttfamily Command\+::\+Command (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name,  }\item[{void($\ast$)(const char $\ast$params)}]{exec }\end{DoxyParamCaption})}



Copies contents of name\+In\+Menu and stores exec. 


\begin{DoxyParams}{Parameters}
{\em name} & C-\/style string, class stores at most 255 characters (last character is always terminating zero) \\
\hline
{\em exec} & Function pointer that will be executed when \mbox{\hyperlink{classCommand_a2134b97948833d1ef31c6fb5ed200bed}{run()}} is called. Can be nullptr. \\
\hline
\end{DoxyParams}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classCommand_a2134b97948833d1ef31c6fb5ed200bed}\label{classCommand_a2134b97948833d1ef31c6fb5ed200bed}} 
\index{Command@{Command}!run@{run}}
\index{run@{run}!Command@{Command}}
\doxysubsubsection{\texorpdfstring{run()}{run()}}
{\footnotesize\ttfamily void Command\+::run (\begin{DoxyParamCaption}\item[{const char $\ast$}]{params }\end{DoxyParamCaption}) const}



Executes the stored function pointer. 

Executes the stored function pointer, when it\textquotesingle{}s not nullptr. Otherwise does nothing. 

The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
src/\+Generic/\+Console\+Interface/\mbox{\hyperlink{Command_8h}{Command.\+h}}\item 
src/\+Generic/\+Console\+Interface/Command.\+cpp\end{DoxyCompactItemize}