File: CastleXMLConfig.TCastleConfig.html

package info (click to toggle)
castle-game-engine 5.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 185,428 kB
  • sloc: pascal: 260,781; cpp: 1,363; objc: 713; makefile: 537; xml: 496; sh: 480; php: 4
file content (641 lines) | stat: -rw-r--r-- 38,245 bytes parent folder | download
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Castle Game Engine: CastleXMLConfig: Class TCastleConfig</title>
<meta name="generator" content="PasDoc 0.13.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<table class="container"><tr><td class="navigation">
<h2>Castle Game Engine</h2><p><a href="introduction.html" class="navigation">Introduction</a></p><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p></td><td class="content">
<a name="TCastleConfig"></a><h1 class="cio">Class TCastleConfig</h1>
<table class="sections wide_list">
<tr>
<td><a class="section" href="#PasDoc-Description">Description</a></td><td><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></td><td>Fields</td><td><a class="section" href="#PasDoc-Methods">Methods</a></td><td><a class="section" href="#PasDoc-Properties">Properties</a></td></tr></table>
<a name="PasDoc-Description"></a><h2 class="unit">Unit</h2>
<p class="unitlink">
<a  href="CastleXMLConfig.html">CastleXMLConfig</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TCastleConfig = class(TXMLConfig)</code></p>
<h2 class="description">Description</h2>
<p>
Store configuration in XML format.

<p>This is a descendant of TXMLConfig that adds various small extensions: float types (<a class="normal" href="CastleXMLConfig.TCastleConfig.html#GetFloat">GetFloat</a>, <a class="normal" href="CastleXMLConfig.TCastleConfig.html#SetFloat">SetFloat</a>, <a class="normal" href="CastleXMLConfig.TCastleConfig.html#SetDeleteFloat">SetDeleteFloat</a>), vector types, key (<a class="normal" href="CastleKeysMouse.html#TKey">TKey</a>) types, <a class="normal" href="CastleXMLConfig.TCastleConfig.html#PathElement">PathElement</a> utility.</p>
<a name="PasDoc-Hierarchy"></a><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TXMLConfig</li>
<li class="thisitem">TCastleConfig</li></ul><h2 class="overview">Overview</h2>
<a name="PasDoc-Methods"></a><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>constructor <b><a  href="CastleXMLConfig.TCastleConfig.html#Create">Create</a></b>(AOwner: TComponent); override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>destructor <b><a  href="CastleXMLConfig.TCastleConfig.html#Destroy">Destroy</a></b>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleXMLConfig.TCastleConfig.html#GetFloat">GetFloat</a></b>(const APath: string; const ADefaultValue: <a  href="CastleUtils.html#Float">Float</a>): <a  href="CastleUtils.html#Float">Float</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#SetFloat">SetFloat</a></b>(const APath: string; const AValue: <a  href="CastleUtils.html#Float">Float</a>);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#SetDeleteFloat">SetDeleteFloat</a></b>(const APath: string; const AValue, ADefaultValue: <a  href="CastleUtils.html#Float">Float</a>);</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleXMLConfig.TCastleConfig.html#GetValue">GetValue</a></b>(const APath: string; const ADefaultValue: <a  href="CastleVectors.html#TVector2Single">TVector2Single</a>): <a  href="CastleVectors.html#TVector2Single">TVector2Single</a>; overload;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#SetValue">SetValue</a></b>(const APath: string; const AValue: <a  href="CastleVectors.html#TVector2Single">TVector2Single</a>); overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#SetDeleteValue">SetDeleteValue</a></b>(const APath: string; const AValue, ADefaultValue: <a  href="CastleVectors.html#TVector2Single">TVector2Single</a>); overload;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleXMLConfig.TCastleConfig.html#GetValue">GetValue</a></b>(const APath: string; const ADefaultValue: <a  href="CastleVectors.html#TVector3Single">TVector3Single</a>): <a  href="CastleVectors.html#TVector3Single">TVector3Single</a>; overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#SetValue">SetValue</a></b>(const APath: string; const AValue: <a  href="CastleVectors.html#TVector3Single">TVector3Single</a>); overload;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#SetDeleteValue">SetDeleteValue</a></b>(const APath: string; const AValue, ADefaultValue: <a  href="CastleVectors.html#TVector3Single">TVector3Single</a>); overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleXMLConfig.TCastleConfig.html#GetValue">GetValue</a></b>(const APath: string; const ADefaultValue: <a  href="CastleVectors.html#TVector4Single">TVector4Single</a>): <a  href="CastleVectors.html#TVector4Single">TVector4Single</a>; overload;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#SetValue">SetValue</a></b>(const APath: string; const AValue: <a  href="CastleVectors.html#TVector4Single">TVector4Single</a>); overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#SetDeleteValue">SetDeleteValue</a></b>(const APath: string; const AValue, ADefaultValue: <a  href="CastleVectors.html#TVector4Single">TVector4Single</a>); overload;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleXMLConfig.TCastleConfig.html#GetValue">GetValue</a></b>(const APath: string; const ADefaultValue: <a  href="CastleKeysMouse.html#TKey">TKey</a>): <a  href="CastleKeysMouse.html#TKey">TKey</a>; overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#SetValue">SetValue</a></b>(const APath: string; const AValue: <a  href="CastleKeysMouse.html#TKey">TKey</a>); overload;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#SetDeleteValue">SetDeleteValue</a></b>(const APath: string; const AValue, ADefaultValue: <a  href="CastleKeysMouse.html#TKey">TKey</a>); overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleXMLConfig.TCastleConfig.html#GetColor">GetColor</a></b>(const APath: string; const ADefaultColor: <a  href="CastleColors.html#TCastleColorRGB">TCastleColorRGB</a>): <a  href="CastleColors.html#TCastleColorRGB">TCastleColorRGB</a>; overload;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#SetColor">SetColor</a></b>(const APath: string; const AColor: <a  href="CastleColors.html#TCastleColorRGB">TCastleColorRGB</a>); overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#SetDeleteColor">SetDeleteColor</a></b>(const APath: string; const AColor, ADefaultColor: <a  href="CastleColors.html#TCastleColorRGB">TCastleColorRGB</a>); overload;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleXMLConfig.TCastleConfig.html#GetColor">GetColor</a></b>(const APath: string; const ADefaultColor: <a  href="CastleColors.html#TCastleColor">TCastleColor</a>): <a  href="CastleColors.html#TCastleColor">TCastleColor</a>; overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#SetColor">SetColor</a></b>(const APath: string; const AColor: <a  href="CastleColors.html#TCastleColor">TCastleColor</a>); overload;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#SetDeleteColor">SetDeleteColor</a></b>(const APath: string; const AColor, ADefaultColor: <a  href="CastleColors.html#TCastleColor">TCastleColor</a>); overload;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleXMLConfig.TCastleConfig.html#PathElement">PathElement</a></b>(const APath: string; const RaiseExceptionWhenMissing: boolean = false): TDOMElement;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleXMLConfig.TCastleConfig.html#PathChildren">PathChildren</a></b>(const APath: string; const ChildName: string): TDOMNodeList;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleXMLConfig.TCastleConfig.html#GetURL">GetURL</a></b>(const APath: string; const EmptyIfNoAttribute: boolean = false): string;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleXMLConfig.TCastleConfig.html#GetMultilineText">GetMultilineText</a></b>(const APath: string; const DefaultValue: string): string;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <b><a  href="CastleXMLConfig.TCastleConfig.html#GetNonEmptyValue">GetNonEmptyValue</a></b>(const APath: string): string;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#NotModified">NotModified</a></b>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#Load">Load</a></b>(const AURL: string);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#Load">Load</a></b>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#Load">Load</a></b>(const Stream: TStream);</code></td>
</tr>
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#Save">Save</a></b>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <b><a  href="CastleXMLConfig.TCastleConfig.html#Save">Save</a></b>(const Stream: TStream);</code></td>
</tr>
</table>
<a name="PasDoc-Properties"></a><h3 class="summary">Properties</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleXMLConfig.TCastleConfig.html#OnLoad">OnLoad</a></b>: <a  href="CastleXMLConfig.TCastleConfigEventList.html">TCastleConfigEventList</a> read FOnLoad;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <b><a  href="CastleXMLConfig.TCastleConfig.html#OnSave">OnSave</a></b>: <a  href="CastleXMLConfig.TCastleConfigEventList.html">TCastleConfigEventList</a> read FOnSave;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Create"></a><code>constructor <b>Create</b>(AOwner: TComponent); override;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Destroy"></a><code>destructor <b>Destroy</b>; override;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GetFloat"></a><code>function <b>GetFloat</b>(const APath: string; const ADefaultValue: <a  href="CastleUtils.html#Float">Float</a>): <a  href="CastleUtils.html#Float">Float</a>;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetFloat"></a><code>procedure <b>SetFloat</b>(const APath: string; const AValue: <a  href="CastleUtils.html#Float">Float</a>);</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetDeleteFloat"></a><code>procedure <b>SetDeleteFloat</b>(const APath: string; const AValue, ADefaultValue: <a  href="CastleUtils.html#Float">Float</a>);</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GetValue"></a><code>function <b>GetValue</b>(const APath: string; const ADefaultValue: <a  href="CastleVectors.html#TVector2Single">TVector2Single</a>): <a  href="CastleVectors.html#TVector2Single">TVector2Single</a>; overload;</code></td>
</tr>
<tr><td colspan="2">
<p>
2D, 3D, 4D vectors reading/writing to config file.

<p>They should be expressed in XML like

<p></p>

<pre class="preformatted">&lt;myVector x=&quot;1&quot; y=&quot;2&quot; z=&quot;3&quot; w=&quot;4&quot; /&gt;</pre>

<p>

<p>You can read such vector by

<p></p>

<pre class="longcode"> GetValue(<span class="pascal_string">'example/path/to/myVector'</span>, Vector4Single(<span class="pascal_numeric">0</span>, <span class="pascal_numeric">0</span>, <span class="pascal_numeric">0</span>, <span class="pascal_numeric">0</span>)); </pre>

<p>

<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetValue"></a><code>procedure <b>SetValue</b>(const APath: string; const AValue: <a  href="CastleVectors.html#TVector2Single">TVector2Single</a>); overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetDeleteValue"></a><code>procedure <b>SetDeleteValue</b>(const APath: string; const AValue, ADefaultValue: <a  href="CastleVectors.html#TVector2Single">TVector2Single</a>); overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GetValue"></a><code>function <b>GetValue</b>(const APath: string; const ADefaultValue: <a  href="CastleVectors.html#TVector3Single">TVector3Single</a>): <a  href="CastleVectors.html#TVector3Single">TVector3Single</a>; overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetValue"></a><code>procedure <b>SetValue</b>(const APath: string; const AValue: <a  href="CastleVectors.html#TVector3Single">TVector3Single</a>); overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetDeleteValue"></a><code>procedure <b>SetDeleteValue</b>(const APath: string; const AValue, ADefaultValue: <a  href="CastleVectors.html#TVector3Single">TVector3Single</a>); overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GetValue"></a><code>function <b>GetValue</b>(const APath: string; const ADefaultValue: <a  href="CastleVectors.html#TVector4Single">TVector4Single</a>): <a  href="CastleVectors.html#TVector4Single">TVector4Single</a>; overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetValue"></a><code>procedure <b>SetValue</b>(const APath: string; const AValue: <a  href="CastleVectors.html#TVector4Single">TVector4Single</a>); overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetDeleteValue"></a><code>procedure <b>SetDeleteValue</b>(const APath: string; const AValue, ADefaultValue: <a  href="CastleVectors.html#TVector4Single">TVector4Single</a>); overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GetValue"></a><code>function <b>GetValue</b>(const APath: string; const ADefaultValue: <a  href="CastleKeysMouse.html#TKey">TKey</a>): <a  href="CastleKeysMouse.html#TKey">TKey</a>; overload;</code></td>
</tr>
<tr><td colspan="2">
<p>
Reading/writing key values to config file. Key names are expected to follow <a class="normal" href="CastleKeysMouse.html#StrToKey">StrToKey</a> and <a class="normal" href="CastleKeysMouse.html#KeyToStr">KeyToStr</a> functions in <a class="normal" href="CastleKeysMouse.html">CastleKeysMouse</a>.

<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetValue"></a><code>procedure <b>SetValue</b>(const APath: string; const AValue: <a  href="CastleKeysMouse.html#TKey">TKey</a>); overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetDeleteValue"></a><code>procedure <b>SetDeleteValue</b>(const APath: string; const AValue, ADefaultValue: <a  href="CastleKeysMouse.html#TKey">TKey</a>); overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GetColor"></a><code>function <b>GetColor</b>(const APath: string; const ADefaultColor: <a  href="CastleColors.html#TCastleColorRGB">TCastleColorRGB</a>): <a  href="CastleColors.html#TCastleColorRGB">TCastleColorRGB</a>; overload;</code></td>
</tr>
<tr><td colspan="2">
<p>
Colors reading/writing to config file.

<p>This is very similar to 3D / 4D vector reading/writing to config file, however

<p></p>

<ol class="compact_spacing">
  <li value="1"><p>attribute names are better for colors (<i>red, green, blue, alpha</i> instead of <i>x, y, z, w</i>),</p></li>
  <li value="2"><p>we allow alternative color specification as hex.</p></li>
  <li value="3"><p>and we limit component values to 0..1 range.</p></li>
</ol>

<p>

<p>They should be expressed in XML like

<p></p>

<pre class="preformatted">
&lt;myColor red=&quot;1&quot; green=&quot;0.5&quot; blue=&quot;0.25&quot; alpha=&quot;1&quot; /&gt;
&lt;myColorRGB red=&quot;1&quot; green=&quot;0.5&quot; blue=&quot;0.25&quot; /&gt;
</pre>

<p>

<p>or as hex colors (see <a class="normal" href="CastleColors.html#HexToColor">HexToColor</a>) like

<p></p>

<pre class="preformatted">
&lt;myColor hex=&quot;ff804011&quot; /&gt;
&lt;myColorRGB hex=&quot;ff8040&quot; /&gt;
</pre>

<p>

<p>You can read such colors by

<p></p>

<pre class="longcode">
Color := GetColor(<span class="pascal_string">'example/path/to/myColor'</span>, Black);
ColorRGB := GetColor(<span class="pascal_string">'example/path/to/myColorRGB'</span>, BlackRGB);
</pre>

<p>

<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetColor"></a><code>procedure <b>SetColor</b>(const APath: string; const AColor: <a  href="CastleColors.html#TCastleColorRGB">TCastleColorRGB</a>); overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetDeleteColor"></a><code>procedure <b>SetDeleteColor</b>(const APath: string; const AColor, ADefaultColor: <a  href="CastleColors.html#TCastleColorRGB">TCastleColorRGB</a>); overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GetColor"></a><code>function <b>GetColor</b>(const APath: string; const ADefaultColor: <a  href="CastleColors.html#TCastleColor">TCastleColor</a>): <a  href="CastleColors.html#TCastleColor">TCastleColor</a>; overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetColor"></a><code>procedure <b>SetColor</b>(const APath: string; const AColor: <a  href="CastleColors.html#TCastleColor">TCastleColor</a>); overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="SetDeleteColor"></a><code>procedure <b>SetDeleteColor</b>(const APath: string; const AColor, ADefaultColor: <a  href="CastleColors.html#TCastleColor">TCastleColor</a>); overload;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="PathElement"></a><code>function <b>PathElement</b>(const APath: string; const RaiseExceptionWhenMissing: boolean = false): TDOMElement;</code></td>
</tr>
<tr><td colspan="2">
<p>
For a given path, return corresponding DOM element of XML tree. This is useful if you want to mix XMLConfig style operations on the file and then use some real DOM functions to more directly operate/read on XML document.

<p>Note that for paths that you pass to various <a class="normal" href="CastleXMLConfig.TCastleConfig.html#SetValue">SetValue</a> versions, the last path component is the attribute name. You do not pass this here. Path passed here should end with the name of final element.

<p>Path passed here may but doesn't have to be terminated by a final slash. In fact, for now the path is just splitted using slash character as a separator, so a path like <code>/some////path/</code> is equivalent to a path like (some/path). But don't depend on this behavior.

<p>If there is no such element: when RaiseExceptionWhenMissing=<code>True</code>, raises exception. when RaiseExceptionWhenMissing=<code>False</code>, returns <code>Nil</code>.

<p>Remember that XMLConfig idea of XML document is limited. That's intentional (XMLConfig is supposed to offer only a simple limited XML access), and this means that some XML trees may confuse XMLConfig. For example, if there are two elements with the same TagName as a children of the same element: XMLConfig will (probably ?) just always ignore the second one. Which means that if you use this method to change some XML content, you should be careful when accessing this content from regular XMLConfig Get/<a class="normal" href="CastleXMLConfig.TCastleConfig.html#SetValue">SetValue</a> methods.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="PathChildren"></a><code>function <b>PathChildren</b>(const APath: string; const ChildName: string): TDOMNodeList;</code></td>
</tr>
<tr><td colspan="2">
<p>
For a given path, return corresponding children elements of a given DOM element of XML tree. For example, you have an XML like this:

<p></p>

<pre class="preformatted">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;CONFIG&gt;
  &lt;game_configuration&gt;
    &lt;locations&gt;
      &lt;location name=&quot;location_1st&quot;&gt;...&lt;/location&gt;
      &lt;location name=&quot;location_2nd&quot;&gt;...&lt;/location&gt;
    &lt;/locations&gt;
  &lt;/game_configuration&gt;
&lt;/CONFIG&gt;
</pre>

<p>

<p>You could use <code><a class="normal" href="CastleXMLConfig.TCastleConfig.html#PathElement">PathElement</a>('game_configuration/locations')</code> to get the <code>&lt;locations&gt;</code> DOM element. Or you could use this method <code><code>PathChildren</code>('game_configuration/locations', 'location')</code> to get a list of &lt;location&gt; elements.

<p>Raises exception if element indicated by APath does not exist. (But it is OK if it is empty.) Never returns <code>Nil</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GetURL"></a><code>function <b>GetURL</b>(const APath: string; const EmptyIfNoAttribute: boolean = false): string;</code></td>
</tr>
<tr><td colspan="2">
<p>
Read an URL from an XML attribute. The attribute in an XML file may be an absolute or relative URL, (we will look at own TXMLConfig.FileName directory to resolve relative URLs). The returned URL is always an absolute URL.

<p>If EmptyIfNoAttribute, then this will just set URL to '' if appropriate XML attribute not found. Otherwise (when EmptyIfNoAttribute = <code>False</code>, this is default), error will be raised.

<p></p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><a class="normal" href="CastleXMLConfig.EMissingAttribute.html">EMissingAttribute</a></dt>
<dd>If EmptyIfNoAttribute = <code>False</code> and no such attribute.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GetMultilineText"></a><code>function <b>GetMultilineText</b>(const APath: string; const DefaultValue: string): string;</code></td>
</tr>
<tr><td colspan="2">
<p>
Read string from a text content of given element. The text may be multiline, line endings are guaranteed to be converted to current OS newlines.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="GetNonEmptyValue"></a><code>function <b>GetNonEmptyValue</b>(const APath: string): string;</code></td>
</tr>
<tr><td colspan="2">
<p>
Get a value, as a string. Value must exist and cannot be empty in XML file.

<p></p>
<h6 class="description_section">Exceptions raised</h6>
<dl class="exceptions_raised">
<dt><a class="normal" href="CastleXMLConfig.EMissingAttribute.html">EMissingAttribute</a></dt>
<dd>If value doesn't exist or is empty in XML file.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="NotModified"></a><code>procedure <b>NotModified</b>;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Load"></a><code>procedure <b>Load</b>(const AURL: string);</code></td>
</tr>
<tr><td colspan="2">
<p>
Load the current configuration of the engine components. Sets <code>TXMLConfig.URL</code>, loading the appropriate file to our properties, and then calls the <a class="normal" href="CastleXMLConfig.TCastleConfig.html#OnLoad">OnLoad</a> callbacks to allow all engine components read their settings.

<p>Accepts URL as parameter, converting it to a local filename under the hood.

<p>The overloaded parameter-less version chooses a suitable filename for storing per-program user preferences. It uses ApplicationName to pick a filename that is unique to your application (usually you want to assign OnGetApplicationName callback to set your name, unless you're fine with default determination that looks at stuff like ParamStr(0)). See FPC OnGetApplicationName docs. It uses <a class="normal" href="CastleFilesUtils.html#ApplicationConfig">ApplicationConfig</a> to determine location of this file.

<p>The overloaded version with TStream parameter loads from a stream. URL is set to empty.

<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Load"></a><code>procedure <b>Load</b>;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Load"></a><code>procedure <b>Load</b>(const Stream: TStream);</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Save"></a><code>procedure <b>Save</b>;</code></td>
</tr>
<tr><td colspan="2">
<p>
Save the configuration of all engine components. Calls the <a class="normal" href="CastleXMLConfig.TCastleConfig.html#OnSave">OnSave</a> callbacks to allow all engine components to store their settings in our properties, and then flushes them to disk (using <code>TXMLConfig.URL</code> property) by inherited Flush method.

<p>The overloaded version with TStream parameter saves to a stream. If does not use inherited Flush method, instead it always unconditionally dumps contents to stream.

<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="Save"></a><code>procedure <b>Save</b>(const Stream: TStream);</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<h3 class="detail">Properties</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnLoad"></a><code>property <b>OnLoad</b>: <a  href="CastleXMLConfig.TCastleConfigEventList.html">TCastleConfigEventList</a> read FOnLoad;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called at <a class="normal" href="CastleXMLConfig.TCastleConfig.html#Load">Load</a>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a  href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><a name="OnSave"></a><code>property <b>OnSave</b>: <a  href="CastleXMLConfig.TCastleConfigEventList.html">TCastleConfigEventList</a> read FOnSave;</code></td>
</tr>
<tr><td colspan="2">
<p>
Called at <a class="normal" href="CastleXMLConfig.TCastleConfig.html#Save">Save</a>.</p>
</td></tr>
</table>
<!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(["trackPageView"]);
  _paq.push(["enableLinkTracking"]);

  (function() {
    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://michalis.ii.uni.wroc.pl/piwik-castle-engine/";
    _paq.push(["setTrackerUrl", u+"piwik.php"]);
    _paq.push(["setSiteId", "1"]);
    var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
    g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Piwik Code -->

<noscript>
<!-- Piwik Image Tracker -->
<img src="http://michalis.ii.uni.wroc.pl/piwik-castle-engine/piwik.php?idsite=1&amp;rec=1" style="border:0" alt="" />
<!-- End Piwik -->
</noscript>
<hr noshade size="1"><span class="appinfo"><em>Generated by <a  href="http://pasdoc.sourceforge.net/">PasDoc 0.13.0</a> on 2015-06-15 04:43:13</em>
</span>
</td></tr></table></body></html>