summaryrefslogtreecommitdiff
path: root/docs/html/class_config.html
blob: 46121fe36770e53edf4f64b601277adb6482e70f (plain)
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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"/>
<title>Rally X: Config Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="car.PNG"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Rally X
   
   </div>
   <div id="projectbrief">ELEN3009 Project by Justin Wernick and David Schneider</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="#pri-static-attribs">Static Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">Config Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Config" -->
<p>Object for handling user settings loaded from a file.  
 <a href="class_config.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_config_8h_source.html">Config.h</a>&gt;</code></p>

<p><a href="class_config-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#aab967ce080511b4ae5bf578cba5237d3">Config</a> (const string &amp;filename)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <a class="el" href="class_config.html" title="Object for handling user settings loaded from a file.">Config</a> object from a file with the given path.  <a href="#aab967ce080511b4ae5bf578cba5237d3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#a3bb73797396d2d5ba8c9956730dfc4db">screenWidth</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for accessing the screen width setting in pixels.  <a href="#a3bb73797396d2d5ba8c9956730dfc4db"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#a53d63c52aa51b5231b9ea8e412086773">screenHeight</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for accessing the screen height setting in pixels.  <a href="#a53d63c52aa51b5231b9ea8e412086773"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#a8a401add779f2b74732ade9e515bf0cd">fullscreen</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for accessing whether the game should be displayed in fullscreen or windowed mode.  <a href="#a8a401add779f2b74732ade9e515bf0cd"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#aa9656bf85fa15fd4e90a99558f880602">readFile</a> (ifstream &amp;file, map&lt; string, string &gt; &amp;map)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads all of the settings defined in a file into a map.  <a href="#aa9656bf85fa15fd4e90a99558f880602"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#ac31c5164b58f86c2a9ecaf21ac1f2202">fillValues</a> (const map&lt; string, string &gt; &amp;readValues, map&lt; string, string &gt; &amp;unfoundValues)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialises the <a class="el" href="class_config.html" title="Object for handling user settings loaded from a file.">Config</a> option's parameters to those in the readValues map.  <a href="#ac31c5164b58f86c2a9ecaf21ac1f2202"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#a38dee1d0fe4e962aedcee79faad2691c">extractValue</a> (const map&lt; string, string &gt; &amp;readValues, map&lt; string, string &gt; &amp;unfoundValues, const string &amp;key, const string &amp;defaultValue)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper function for fillValues. Finds the value for a single key.  <a href="#a38dee1d0fe4e962aedcee79faad2691c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#a54612c3ce193bea917d3088175e16d43">writeUnfoundValues</a> (ofstream &amp;file, const map&lt; string, string &gt; &amp;unfoundValues)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes settings that were not found in the file to the file with default values.  <a href="#a54612c3ce193bea917d3088175e16d43"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#ac0fd2f7c14b9f26339862da74215bf01">setScreenWidth</a> (const string &amp;screenWidthStr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the screen width in pixels from a given string.  <a href="#ac0fd2f7c14b9f26339862da74215bf01"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#a8e960645b79f31c39ee0cecc89ed6060">setScreenHeight</a> (const string &amp;screenHeightStr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the screen height in pixels from a given string.  <a href="#a8e960645b79f31c39ee0cecc89ed6060"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#a5ce32c242ca037105a2430a122249a0a">setFullscreen</a> (const string &amp;fullscreenStr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the fullscreen setting from a given string.  <a href="#a5ce32c242ca037105a2430a122249a0a"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#a46dce43903bb24bac8c2ffc92f2ee4da">_screenWidth</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The desired width of the screen in pixels.  <a href="#a46dce43903bb24bac8c2ffc92f2ee4da"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#ac27364c75bc8d5e82119988df85c1599">_screenHeight</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The desired height of the screen in pixels.  <a href="#ac27364c75bc8d5e82119988df85c1599"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#ad6fddaaf52742adcba95155b3635e807">_fullscreen</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The desired fullscreen or windowed setting.  <a href="#ad6fddaaf52742adcba95155b3635e807"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-static-attribs"></a>
Static Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#abebfdbe6033183421dcdb4cdb6fc9549">SCREEN_WIDTH_KEY</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The key for the screen width setting, initialized to "screen_width".  <a href="#abebfdbe6033183421dcdb4cdb6fc9549"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#a5dd914d11bd6f43c06ad4682be0efaba">SCREEN_HEIGHT_KEY</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The key for the screen height setting, initialized to "screen_height".  <a href="#a5dd914d11bd6f43c06ad4682be0efaba"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#ae2dd20bca46b767d2a30c32de7ab78cb">FULLSCREEN_KEY</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The key for the fullscreen setting, initialized to "fullscreen".  <a href="#ae2dd20bca46b767d2a30c32de7ab78cb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#ad6f88b173db3508eaeb7b569655b5cf2">SCREEN_WIDTH_DEFAULT</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The default value for the screen width setting, initialized to 800.  <a href="#ad6f88b173db3508eaeb7b569655b5cf2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#a2382c43dd0d51b3d52bf88d18438c579">SCREEN_HEIGHT_DEFAULT</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The default value for the screen height setting, initialized to 600.  <a href="#a2382c43dd0d51b3d52bf88d18438c579"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_config.html#a3195b4273ebe9ac691167bff71394720">FULLSCREEN_DEFAULT</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The default value for the fullscreen setting, initialized to false.  <a href="#a3195b4273ebe9ac691167bff71394720"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Object for handling user settings loaded from a file. </p>
<p>These settings are currently all related to the screen (resolution and windowed or fullscreen). If custom controls are implemented in a later release, they will be loaded here. If a setting exists but is not found in the config file, it is set to a default value and written to the file.</p>
<dl class="author"><dt><b>Author:</b></dt><dd>Justin Wernick </dd>
<dd>
David Schneider </dd></dl>

<p>Definition at line <a class="el" href="_config_8h_source.html#l00020">20</a> of file <a class="el" href="_config_8h_source.html">Config.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aab967ce080511b4ae5bf578cba5237d3"></a><!-- doxytag: member="Config::Config" ref="aab967ce080511b4ae5bf578cba5237d3" args="(const string &amp;filename)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Config::Config </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructs a <a class="el" href="class_config.html" title="Object for handling user settings loaded from a file.">Config</a> object from a file with the given path. </p>
<p>Opens the file and reads all of the settings in the file. The read settings are bound to the settings that have keys defined in the class. And settings missing from the file are set to default values, and the default values are written to the file.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>The path of the file in which the settings are stored. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_config_8cpp_source.html#l00012">12</a> of file <a class="el" href="_config_8cpp_source.html">Config.cpp</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a38dee1d0fe4e962aedcee79faad2691c"></a><!-- doxytag: member="Config::extractValue" ref="a38dee1d0fe4e962aedcee79faad2691c" args="(const map&lt; string, string &gt; &amp;readValues, map&lt; string, string &gt; &amp;unfoundValues, const string &amp;key, const string &amp;defaultValue)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string Config::extractValue </td>
          <td>(</td>
          <td class="paramtype">const map&lt; string, string &gt; &amp;&#160;</td>
          <td class="paramname"><em>readValues</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">map&lt; string, string &gt; &amp;&#160;</td>
          <td class="paramname"><em>unfoundValues</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>defaultValue</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Helper function for fillValues. Finds the value for a single key. </p>
<p>If the given key does not appear, it is added to the unfoundValues map with the given default</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">readValues</td><td>A map containing all of the settings read in from a config file. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">unfoundValues</td><td>A map that is populated with and settings not found in readValues. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>The key of the setting to be found in readValues. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">defaultValue</td><td>The value to return and add to unfoundValues if the setting is not found in readValues.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The value corresponding to the requested key. </dd></dl>

<p>Definition at line <a class="el" href="_config_8cpp_source.html#l00072">72</a> of file <a class="el" href="_config_8cpp_source.html">Config.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ac31c5164b58f86c2a9ecaf21ac1f2202"></a><!-- doxytag: member="Config::fillValues" ref="ac31c5164b58f86c2a9ecaf21ac1f2202" args="(const map&lt; string, string &gt; &amp;readValues, map&lt; string, string &gt; &amp;unfoundValues)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Config::fillValues </td>
          <td>(</td>
          <td class="paramtype">const map&lt; string, string &gt; &amp;&#160;</td>
          <td class="paramname"><em>readValues</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">map&lt; string, string &gt; &amp;&#160;</td>
          <td class="paramname"><em>unfoundValues</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initialises the <a class="el" href="class_config.html" title="Object for handling user settings loaded from a file.">Config</a> option's parameters to those in the readValues map. </p>
<p>Parameters with a key that does not appear in readValues are initialised to a default value. The default value, and its key, are then added to the unfoundValues map.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">readValues</td><td>A map containing all of the settings read in from a config file. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">unfoundValues</td><td>A map that is populated with and settings not found in readValues. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_config_8cpp_source.html#l00065">65</a> of file <a class="el" href="_config_8cpp_source.html">Config.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a8a401add779f2b74732ade9e515bf0cd"></a><!-- doxytag: member="Config::fullscreen" ref="a8a401add779f2b74732ade9e515bf0cd" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Config::fullscreen </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Function for accessing whether the game should be displayed in fullscreen or windowed mode. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The desired fullscreen setting. A result of true means fullscreen mode, while a result of false means windowed mode. </dd></dl>

<p>Definition at line <a class="el" href="_config_8cpp_source.html#l00040">40</a> of file <a class="el" href="_config_8cpp_source.html">Config.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aa9656bf85fa15fd4e90a99558f880602"></a><!-- doxytag: member="Config::readFile" ref="aa9656bf85fa15fd4e90a99558f880602" args="(ifstream &amp;file, map&lt; string, string &gt; &amp;map)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Config::readFile </td>
          <td>(</td>
          <td class="paramtype">ifstream &amp;&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">map&lt; string, string &gt; &amp;&#160;</td>
          <td class="paramname"><em>map</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reads all of the settings defined in a file into a map. </p>
<p>Reads each line that is in the format "key=value" in a file into a map. Lines that do not contain a '=' are ignored.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">file</td><td>An opened filestream object at the beginning of the file to be read. After the function call, file will be at the end of the file. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">map</td><td>The map that is populated with settings. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_config_8cpp_source.html#l00045">45</a> of file <a class="el" href="_config_8cpp_source.html">Config.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a53d63c52aa51b5231b9ea8e412086773"></a><!-- doxytag: member="Config::screenHeight" ref="a53d63c52aa51b5231b9ea8e412086773" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Config::screenHeight </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Function for accessing the screen height setting in pixels. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The desired height of the screen in pixels. </dd></dl>

<p>Definition at line <a class="el" href="_config_8cpp_source.html#l00036">36</a> of file <a class="el" href="_config_8cpp_source.html">Config.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a3bb73797396d2d5ba8c9956730dfc4db"></a><!-- doxytag: member="Config::screenWidth" ref="a3bb73797396d2d5ba8c9956730dfc4db" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Config::screenWidth </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Function for accessing the screen width setting in pixels. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The desired width of the screen in pixels. </dd></dl>

<p>Definition at line <a class="el" href="_config_8cpp_source.html#l00032">32</a> of file <a class="el" href="_config_8cpp_source.html">Config.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a5ce32c242ca037105a2430a122249a0a"></a><!-- doxytag: member="Config::setFullscreen" ref="a5ce32c242ca037105a2430a122249a0a" args="(const string &amp;fullscreenStr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Config::setFullscreen </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>fullscreenStr</em></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initializes the fullscreen setting from a given string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fullscreenStr</td><td>A string representing whether the screen should be in fullscreen mode ("true") or windowed mode (anything else). </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_config_8cpp_source.html#l00102">102</a> of file <a class="el" href="_config_8cpp_source.html">Config.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a8e960645b79f31c39ee0cecc89ed6060"></a><!-- doxytag: member="Config::setScreenHeight" ref="a8e960645b79f31c39ee0cecc89ed6060" args="(const string &amp;screenHeightStr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Config::setScreenHeight </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>screenHeightStr</em></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initializes the screen height in pixels from a given string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">screenHeightStr</td><td>A string representing the desired screen height, read from a file. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_config_8cpp_source.html#l00098">98</a> of file <a class="el" href="_config_8cpp_source.html">Config.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ac0fd2f7c14b9f26339862da74215bf01"></a><!-- doxytag: member="Config::setScreenWidth" ref="ac0fd2f7c14b9f26339862da74215bf01" args="(const string &amp;screenWidthStr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Config::setScreenWidth </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>screenWidthStr</em></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initializes the screen width in pixels from a given string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">screenWidthStr</td><td>A string representing the desired screen width, read from a file. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_config_8cpp_source.html#l00094">94</a> of file <a class="el" href="_config_8cpp_source.html">Config.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a54612c3ce193bea917d3088175e16d43"></a><!-- doxytag: member="Config::writeUnfoundValues" ref="a54612c3ce193bea917d3088175e16d43" args="(ofstream &amp;file, const map&lt; string, string &gt; &amp;unfoundValues)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Config::writeUnfoundValues </td>
          <td>(</td>
          <td class="paramtype">ofstream &amp;&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const map&lt; string, string &gt; &amp;&#160;</td>
          <td class="paramname"><em>unfoundValues</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Writes settings that were not found in the file to the file with default values. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">file</td><td>The opened filestream to which the key=value pairs are written. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">unfoundValues</td><td>The map of key value pairs to be written to the file. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_config_8cpp_source.html#l00086">86</a> of file <a class="el" href="_config_8cpp_source.html">Config.cpp</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="ad6fddaaf52742adcba95155b3635e807"></a><!-- doxytag: member="Config::_fullscreen" ref="ad6fddaaf52742adcba95155b3635e807" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_config.html#ad6fddaaf52742adcba95155b3635e807">Config::_fullscreen</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The desired fullscreen or windowed setting. </p>

<p>Definition at line <a class="el" href="_config_8h_source.html#l00125">125</a> of file <a class="el" href="_config_8h_source.html">Config.h</a>.</p>

</div>
</div>
<a class="anchor" id="ac27364c75bc8d5e82119988df85c1599"></a><!-- doxytag: member="Config::_screenHeight" ref="ac27364c75bc8d5e82119988df85c1599" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int <a class="el" href="class_config.html#ac27364c75bc8d5e82119988df85c1599">Config::_screenHeight</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The desired height of the screen in pixels. </p>

<p>Definition at line <a class="el" href="_config_8h_source.html#l00124">124</a> of file <a class="el" href="_config_8h_source.html">Config.h</a>.</p>

</div>
</div>
<a class="anchor" id="a46dce43903bb24bac8c2ffc92f2ee4da"></a><!-- doxytag: member="Config::_screenWidth" ref="a46dce43903bb24bac8c2ffc92f2ee4da" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int <a class="el" href="class_config.html#a46dce43903bb24bac8c2ffc92f2ee4da">Config::_screenWidth</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The desired width of the screen in pixels. </p>

<p>Definition at line <a class="el" href="_config_8h_source.html#l00123">123</a> of file <a class="el" href="_config_8h_source.html">Config.h</a>.</p>

</div>
</div>
<a class="anchor" id="a3195b4273ebe9ac691167bff71394720"></a><!-- doxytag: member="Config::FULLSCREEN_DEFAULT" ref="a3195b4273ebe9ac691167bff71394720" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const string <a class="el" href="class_config.html#a3195b4273ebe9ac691167bff71394720">Config::FULLSCREEN_DEFAULT</a><code> [static, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The default value for the fullscreen setting, initialized to false. </p>

<p>Definition at line <a class="el" href="_config_8h_source.html#l00133">133</a> of file <a class="el" href="_config_8h_source.html">Config.h</a>.</p>

</div>
</div>
<a class="anchor" id="ae2dd20bca46b767d2a30c32de7ab78cb"></a><!-- doxytag: member="Config::FULLSCREEN_KEY" ref="ae2dd20bca46b767d2a30c32de7ab78cb" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const string <a class="el" href="class_config.html#ae2dd20bca46b767d2a30c32de7ab78cb">Config::FULLSCREEN_KEY</a><code> [static, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The key for the fullscreen setting, initialized to "fullscreen". </p>

<p>Definition at line <a class="el" href="_config_8h_source.html#l00129">129</a> of file <a class="el" href="_config_8h_source.html">Config.h</a>.</p>

</div>
</div>
<a class="anchor" id="a2382c43dd0d51b3d52bf88d18438c579"></a><!-- doxytag: member="Config::SCREEN_HEIGHT_DEFAULT" ref="a2382c43dd0d51b3d52bf88d18438c579" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const string <a class="el" href="class_config.html#a2382c43dd0d51b3d52bf88d18438c579">Config::SCREEN_HEIGHT_DEFAULT</a><code> [static, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The default value for the screen height setting, initialized to 600. </p>

<p>Definition at line <a class="el" href="_config_8h_source.html#l00132">132</a> of file <a class="el" href="_config_8h_source.html">Config.h</a>.</p>

</div>
</div>
<a class="anchor" id="a5dd914d11bd6f43c06ad4682be0efaba"></a><!-- doxytag: member="Config::SCREEN_HEIGHT_KEY" ref="a5dd914d11bd6f43c06ad4682be0efaba" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const string <a class="el" href="class_config.html#a5dd914d11bd6f43c06ad4682be0efaba">Config::SCREEN_HEIGHT_KEY</a><code> [static, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The key for the screen height setting, initialized to "screen_height". </p>

<p>Definition at line <a class="el" href="_config_8h_source.html#l00128">128</a> of file <a class="el" href="_config_8h_source.html">Config.h</a>.</p>

</div>
</div>
<a class="anchor" id="ad6f88b173db3508eaeb7b569655b5cf2"></a><!-- doxytag: member="Config::SCREEN_WIDTH_DEFAULT" ref="ad6f88b173db3508eaeb7b569655b5cf2" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const string <a class="el" href="class_config.html#ad6f88b173db3508eaeb7b569655b5cf2">Config::SCREEN_WIDTH_DEFAULT</a><code> [static, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The default value for the screen width setting, initialized to 800. </p>

<p>Definition at line <a class="el" href="_config_8h_source.html#l00131">131</a> of file <a class="el" href="_config_8h_source.html">Config.h</a>.</p>

</div>
</div>
<a class="anchor" id="abebfdbe6033183421dcdb4cdb6fc9549"></a><!-- doxytag: member="Config::SCREEN_WIDTH_KEY" ref="abebfdbe6033183421dcdb4cdb6fc9549" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const string <a class="el" href="class_config.html#abebfdbe6033183421dcdb4cdb6fc9549">Config::SCREEN_WIDTH_KEY</a><code> [static, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The key for the screen width setting, initialized to "screen_width". </p>

<p>Definition at line <a class="el" href="_config_8h_source.html#l00127">127</a> of file <a class="el" href="_config_8h_source.html">Config.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>source/data/<a class="el" href="_config_8h_source.html">Config.h</a></li>
<li>source/data/<a class="el" href="_config_8cpp_source.html">Config.cpp</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a></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>



<hr class="footer"/><address class="footer"><small>
Generated on Wed Oct 5 2011 20:08:31 for Rally X by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>