Website Summary Files Commits Branches @commit @diff @stats
path: root / docs / html / Event_8h.html
blob: 252203ab8ef9aa7d7328a07db86e522d6cb69fb6 (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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<!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: src/Models/Event.h File 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 id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_36df885461d6bd14211edf06510d126c.html">Models</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">Event.h File Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Stores the declaration of class <a class="el" href="classEvent.html" title="Stores an event&#39;s hall, name, date, bought tickets and reservations.">Event</a>.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="OrderedList_8hpp_source.html">../Generic/List/OrderedList.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="Date_8h_source.html">../Generic/Date/Date.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="String_8h_source.html">../Generic/String/String.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="Hall_8h_source.html">Hall.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="Ticket_8h_source.html">Ticket.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="Reservation_8h_source.html">Reservation.h</a>&quot;</code><br />
<code>#include &lt;istream&gt;</code><br />
<code>#include &lt;ostream&gt;</code><br />
</div>
<p><a href="Event_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEvent.html">Event</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores an event's hall, name, date, bought tickets and reservations.  <a href="classEvent.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a31d9c76919809491b346728ec6659b19"><td class="memItemLeft" align="right" valign="top">std::istream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Event_8h.html#a31d9c76919809491b346728ec6659b19">operator&gt;&gt;</a> (std::istream &amp;istr, <a class="el" href="classEvent.html">Event</a> &amp;event)</td></tr>
<tr class="memdesc:a31d9c76919809491b346728ec6659b19"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads <a class="el" href="classEvent.html" title="Stores an event&#39;s hall, name, date, bought tickets and reservations.">Event</a> from stream with &gt;&gt; operator.  <a href="Event_8h.html#a31d9c76919809491b346728ec6659b19">More...</a><br /></td></tr>
<tr class="separator:a31d9c76919809491b346728ec6659b19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad423797aa9adadabb5651f8955c001bb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Event_8h.html#ad423797aa9adadabb5651f8955c001bb">configureEventInsertionOp</a> (unsigned setting)</td></tr>
<tr class="memdesc:ad423797aa9adadabb5651f8955c001bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures how <a class="el" href="classEvent.html" title="Stores an event&#39;s hall, name, date, bought tickets and reservations.">Event</a> should be shown, when written to stream with &lt;&lt; operator.  <a href="Event_8h.html#ad423797aa9adadabb5651f8955c001bb">More...</a><br /></td></tr>
<tr class="separator:ad423797aa9adadabb5651f8955c001bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08eaf45abee385d26c4934afeb9be163"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Event_8h.html#a08eaf45abee385d26c4934afeb9be163">operator&lt;&lt;</a> (std::ostream &amp;ostr, const <a class="el" href="classEvent.html">Event</a> &amp;event)</td></tr>
<tr class="memdesc:a08eaf45abee385d26c4934afeb9be163"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes <a class="el" href="classEvent.html" title="Stores an event&#39;s hall, name, date, bought tickets and reservations.">Event</a> to stream with &lt;&lt; operator.  <a href="Event_8h.html#a08eaf45abee385d26c4934afeb9be163">More...</a><br /></td></tr>
<tr class="separator:a08eaf45abee385d26c4934afeb9be163"><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 the declaration of class <a class="el" href="classEvent.html" title="Stores an event&#39;s hall, name, date, bought tickets and reservations.">Event</a>. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ad423797aa9adadabb5651f8955c001bb" name="ad423797aa9adadabb5651f8955c001bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad423797aa9adadabb5651f8955c001bb">&#9670;&nbsp;</a></span>configureEventInsertionOp()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void configureEventInsertionOp </td>
          <td>(</td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>setting</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configures how <a class="el" href="classEvent.html" title="Stores an event&#39;s hall, name, date, bought tickets and reservations.">Event</a> should be shown, when written to stream with &lt;&lt; operator. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">setting</td><td>A number, defining the different options. It's best if it is passed as binary number.</td></tr>
  </table>
  </dd>
</dl>
<p>Sets a configuration setting for how operator&lt;&lt; should behave. Setting is stored as a global variable in the cpp file, so it's independent of <a class="el" href="classEvent.html" title="Stores an event&#39;s hall, name, date, bought tickets and reservations.">Event</a> instance.</p>
<p >Each bit in the number is a certain setting. Each bit from left to right represents one of these options, from top to bottom:</p><ol type="1">
<li>Write count of bought tickets (available only if 5. is set)</li>
<li>Write count of reserved tickets (available only if 5. is set)</li>
<li>Write reservations</li>
<li>Write bought tickets</li>
<li>Write <a class="el" href="classHall.html" title="Each hall contains a number, rows and seats per row.">Hall</a> information</li>
</ol>
<dl class="section user"><dt>Example</dt><dd>To configure printing the <a class="el" href="classHall.html" title="Each hall contains a number, rows and seats per row.">Hall</a> information, bought tickets count and the bought tickets themselves, you would do: <div class="fragment"><div class="line"><a class="code hl_function" href="Event_8h.html#ad423797aa9adadabb5651f8955c001bb">configureEventInsertionOp</a>(0b10011);</div>
<div class="ttc" id="aEvent_8h_html_ad423797aa9adadabb5651f8955c001bb"><div class="ttname"><a href="Event_8h.html#ad423797aa9adadabb5651f8955c001bb">configureEventInsertionOp</a></div><div class="ttdeci">void configureEventInsertionOp(unsigned setting)</div><div class="ttdoc">Configures how Event should be shown, when written to stream with &lt;&lt; operator.</div><div class="ttdef"><b>Definition:</b> Event.cpp:120</div></div>
</div><!-- fragment --> </dd></dl>

</div>
</div>
<a id="a08eaf45abee385d26c4934afeb9be163" name="a08eaf45abee385d26c4934afeb9be163"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a08eaf45abee385d26c4934afeb9be163">&#9670;&nbsp;</a></span>operator&lt;&lt;()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::ostream &amp; operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>ostr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classEvent.html">Event</a> &amp;&#160;</td>
          <td class="paramname"><em>event</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes <a class="el" href="classEvent.html" title="Stores an event&#39;s hall, name, date, bought tickets and reservations.">Event</a> to stream with &lt;&lt; operator. </p>
<p >Uses the stream's &lt;&lt; operator to write all internal data, following setting from <a class="el" href="Event_8h.html#ad423797aa9adadabb5651f8955c001bb" title="Configures how Event should be shown, when written to stream with &lt;&lt; operator.">configureEventInsertionOp()</a> Stored types must have defined operator &lt;&lt;.</p>
<dl class="section note"><dt>Note</dt><dd>Best used with std::cout or text std::ofstream </dd></dl>

</div>
</div>
<a id="a31d9c76919809491b346728ec6659b19" name="a31d9c76919809491b346728ec6659b19"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31d9c76919809491b346728ec6659b19">&#9670;&nbsp;</a></span>operator&gt;&gt;()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::istream &amp; operator&gt;&gt; </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>istr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classEvent.html">Event</a> &amp;&#160;</td>
          <td class="paramname"><em>event</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads <a class="el" href="classEvent.html" title="Stores an event&#39;s hall, name, date, bought tickets and reservations.">Event</a> from stream with &gt;&gt; operator. </p>
<p >Uses the stream's &gt;&gt; operator to read and parse all internal values. Stored types must have defined operator &gt;&gt;.</p>
<dl class="section note"><dt>Note</dt><dd>Best used with std::cin or text std::ifstream </dd></dl>

</div>
</div>
</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>