Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / Project 1 / docs / html / classCommand.html
blob: a6504b1db814a6fa11b061ed832c3b84f4579157 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FMI Ticket System: Command Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">FMI Ticket System
   </div>
   <div id="projectbrief">| Kamen Mladenov | FMI Computer Science Year 1 Group 6 | Project 1 | Project Topic 4 |</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classCommand-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">Command Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Stores a 256 character name and a function pointer to be executed when calling <a class="el" href="classCommand.html#a44689093b812bfc97b2787c2ba0303ce" title="Executes the stored function pointer.">run()</a>  
 <a href="classCommand.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="Command_8h_source.html">Command.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a18df2d81039392daeb0b78c346a70537"><td class="memItemLeft" align="right" valign="top"><a id="a18df2d81039392daeb0b78c346a70537" name="a18df2d81039392daeb0b78c346a70537"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Command</b> ()</td></tr>
<tr class="memdesc:a18df2d81039392daeb0b78c346a70537"><td class="mdescLeft">&#160;</td><td class="mdescRight">Leaves name empty and exec function pointer to nullptr. <br /></td></tr>
<tr class="separator:a18df2d81039392daeb0b78c346a70537"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e22ce5bdf74f9c975494dddd280884a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCommand.html#a4e22ce5bdf74f9c975494dddd280884a">Command</a> (const char *nameInMenu, void(*exec)())</td></tr>
<tr class="memdesc:a4e22ce5bdf74f9c975494dddd280884a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies contents of nameInMenu and stores exec.  <a href="classCommand.html#a4e22ce5bdf74f9c975494dddd280884a">More...</a><br /></td></tr>
<tr class="separator:a4e22ce5bdf74f9c975494dddd280884a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44689093b812bfc97b2787c2ba0303ce"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCommand.html#a44689093b812bfc97b2787c2ba0303ce">run</a> () const</td></tr>
<tr class="memdesc:a44689093b812bfc97b2787c2ba0303ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the stored function pointer.  <a href="classCommand.html#a44689093b812bfc97b2787c2ba0303ce">More...</a><br /></td></tr>
<tr class="separator:a44689093b812bfc97b2787c2ba0303ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06adf2e6710dd57506449f0997f467c0"><td class="memItemLeft" align="right" valign="top"><a id="a06adf2e6710dd57506449f0997f467c0" name="a06adf2e6710dd57506449f0997f467c0"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><b>get_nameInMenu</b> () const</td></tr>
<tr class="separator:a06adf2e6710dd57506449f0997f467c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Stores a 256 character name and a function pointer to be executed when calling <a class="el" href="classCommand.html#a44689093b812bfc97b2787c2ba0303ce" title="Executes the stored function pointer.">run()</a> </p>
<p ><a class="el" href="classMenu.html" title="Handles navigation between multiple commands.">Menu</a> uses this class for a more generic implementation of it's navigate function. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a4e22ce5bdf74f9c975494dddd280884a" name="a4e22ce5bdf74f9c975494dddd280884a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e22ce5bdf74f9c975494dddd280884a">&#9670;&nbsp;</a></span>Command()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Command::Command </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>nameInMenu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)()&#160;</td>
          <td class="paramname"><em>exec</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Copies contents of nameInMenu and stores exec. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nameInMenu</td><td>C-style string, class stores at most 255 characters (last character is always terminating zero) </td></tr>
    <tr><td class="paramname">exec</td><td>Function pointer that will be executed when <a class="el" href="classCommand.html#a44689093b812bfc97b2787c2ba0303ce" title="Executes the stored function pointer.">run()</a> is called. Can be nullptr. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a44689093b812bfc97b2787c2ba0303ce" name="a44689093b812bfc97b2787c2ba0303ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44689093b812bfc97b2787c2ba0303ce">&#9670;&nbsp;</a></span>run()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Command::run </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Executes the stored function pointer. </p>
<p >Executes the stored function pointer, when it's not nullptr. Otherwise does nothing. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/Generic/ConsoleInterface/<a class="el" href="Command_8h_source.html">Command.h</a></li>
<li>src/Generic/ConsoleInterface/Command.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3
</small></address>
</body>
</html>