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
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
|
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>nevrax.org : docs</TITLE>
<LINK REL=stylesheet TYPE="text/css" HREF="/inc/css/nevrax.css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY MARGINHEIGHT="0" MARGINWIDTH="0">
<!-- uplinks -->
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD WIDTH=16><IMG SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
<TD WIDTH=140 BGCOLOR=#dddddd><IMG SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD>
<TD WIDTH=16><IMG SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
<TD><IMG width=6 height=14 SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF=><b>Home</B></FONT></A> </TD>
<TD><IMG width=6 height=14 SRC="/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle> <A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A> </TD>
</TR>
</TABLE>
<!-- banner Nevrax -->
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%>
<TR><TD BGCOLOR="#000000" BACKGROUND="/inc/img/black_banner.jpg"><A HREF=""><IMG SRC="/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR>
</TABLE>
<!-- main table -->
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 height=100%>
<TR>
<TD WIDTH=16><IMG SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD>
<TD WIDTH=140 BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
<!------ Begin Box ------>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0 cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black>
<FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td colspan=2 bgcolor=#FFFFFF>
<TABLE cellspacing=0 cellpadding=1 border=0>
<tr><td ALIGN=middle><a class='linkbox' href="/news/" TITLE="Rubrique news"><img width=13 height=15 hspace=5 border=0 src=/inc/img/picto-news.gif ALT=#></A></td><td><a class='linkbox' href="/news/" TITLE="News">News</a></td></tr>
<tr><td ALIGN=middle><a class='linkbox' href="/mail/" TITLE="Rubrique mail"><img width=15 height=11 hspace=5 border=0 src=/inc/img/picto-mail.gif ALT=#></A></td><td><a class='linkbox' href="/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr>
<tr><td ALIGN=middle><a class='linkbox' href="/docs/" TITLE="Rubrique docs"><img width=14 height=16 hspace=5 border=0 src=/inc/img/picto-docs.gif ALT=#></A></td><td><a class='linkbox' href="/docs/" TITLE="Documentation">Documentation</a></td></tr>
<tr><td ALIGN=middle><a class='linkbox' href="/cvs/" TITLE="Rubrique cvs"><img width=13 height=17 hspace=5 border=0 src=/inc/img/picto-cvs.gif ALT=#></A></td><td><a class='linkbox' href="/cvs/" TITLE="CVS Web">CVS</a></td></tr>
<tr><td ALIGN=middle><a class='linkbox' href="/bugs/" TITLE="Rubrique bugs"><img width=20 height=16 hspace=5 border=0 src=/inc/img/picto-bugs.gif ALT=#></A></td><td><a class='linkbox' href="/bugs/" TITLE="Bugtracking">Bugs</a></td></tr>
<tr><td ALIGN=middle><a class='linkbox' href="/GPL.php3" TITLE="Rubrique license"><img width=18 height=12 hspace=5 border=0 src=/inc/img/picto-gpl.gif ALT=#></A></td><td><a class='linkbox' href="/GPL.php3" TITLE="License">License</a></td></tr>
</TABLE>
</TD></TR></TABLE></TD></TR></TABLE>
<!------ End Box ------>
</TD>
<TD WIDTH=15><IMG SRC="/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
<TD ALIGN=left valign=top><IMG SRC="/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
<!-- title -->
<TABLE background="/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td>
<A HREF="/docs/"><img src="/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A>
</td><td><IMG SRC="/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT="">
</td></tr></table>
<!-- block -->
<TABLE bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="/inc/img/reddots.gif"></TD>
<TD><B>Documentation</B></TD>
<TD ALIGN=RIGHT> </td>
</tr></table>
<!-- Generated by Doxygen 1.2.14 -->
<center>
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> <a class="qindexRef" doxygen="_cgi:/cgi-bin/nel-search.cgi" href="/cgi-bin/nel-search.cgi">Search</a> </center>
<hr><h1>form_elm.cpp</h1><a href="form__elm_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001
00007 <font class="comment">/* Copyright, 2000 Nevrax Ltd.</font>
00008 <font class="comment"> *</font>
00009 <font class="comment"> * This file is part of NEVRAX NEL.</font>
00010 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</font>
00011 <font class="comment"> * it under the terms of the GNU General Public License as published by</font>
00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font>
00013 <font class="comment"> * any later version.</font>
00014 <font class="comment"></font>
00015 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</font>
00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>
00018 <font class="comment"> * General Public License for more details.</font>
00019 <font class="comment"></font>
00020 <font class="comment"> * You should have received a copy of the GNU General Public License</font>
00021 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</font>
00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font>
00023 <font class="comment"> * MA 02111-1307, USA.</font>
00024 <font class="comment"> */</font>
00025
00026
00027 <font class="preprocessor">#include "<a class="code" href="stdgeorges_8h.html">stdgeorges.h</a>"</font>
00028
00029 <font class="preprocessor">#include "<a class="code" href="o__xml_8h.html">nel/misc/o_xml.h</a>"</font>
00030 <font class="preprocessor">#include "<a class="code" href="i__xml_8h.html">nel/misc/i_xml.h</a>"</font>
00031
00032 <font class="preprocessor">#include "<a class="code" href="form_8h.html">form.h</a>"</font>
00033 <font class="preprocessor">#include "<a class="code" href="form__elm_8h.html">form_elm.h</a>"</font>
00034 <font class="preprocessor">#include "<a class="code" href="form__loader_8h.html">form_loader.h</a>"</font>
00035 <font class="preprocessor">#include "<a class="code" href="type_8h.html">type.h</a>"</font>
00036
00037 <font class="keyword">using</font> <font class="keyword">namespace </font>NLMISC;
00038 <font class="keyword">using</font> <font class="keyword">namespace </font>std;
00039
00040 <font class="keyword">namespace </font>NLGEORGES
00041 {
00042
<a name="l00043"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">00043</a> uint32 CFormElm::LastRound = 0;
00044
00045 <font class="comment">// ***************************************************************************</font>
00046 <font class="comment">// class CFormElm</font>
00047 <font class="comment">// ***************************************************************************</font>
00048
00049 <font class="comment">// ***************************************************************************</font>
00050
00051 <font class="keywordtype">void</font> <a class="code" href="namespaceNLGEORGES.html#a0">warning</a> (<font class="keywordtype">bool</font> exception, <font class="keyword">const</font> <font class="keywordtype">char</font> *<a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a>, ... );
00052
00053 <font class="comment">// ***************************************************************************</font>
00054
<a name="l00055"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a30">00055</a> <font class="keywordtype">bool</font> CFormElm::isArray ()<font class="keyword"> const </font>
00056 <font class="keyword"></font>{
00057 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00058 };
00059
00060 <font class="comment">// ***************************************************************************</font>
00061
<a name="l00062"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a31">00062</a> <font class="keywordtype">bool</font> CFormElm::getArraySize (uint &size)<font class="keyword"> const </font>
00063 <font class="keyword"></font>{
00064 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArraySize"</font>, <font class="stringliteral">"This node is not an array."</font>);
00065 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00066 };
00067
00068 <font class="comment">// ***************************************************************************</font>
00069
<a name="l00070"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a32">00070</a> <font class="keywordtype">bool</font> CFormElm::getArrayNode (<font class="keyword">const</font> UFormElm **result, uint arrayIndex)<font class="keyword"> const</font>
00071 <font class="keyword"></font>{
00072 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayNode"</font>, <font class="stringliteral">"This node is not an array."</font>);
00073 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00074 };
00075
00076 <font class="comment">// ***************************************************************************</font>
00077
<a name="l00078"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a33">00078</a> <font class="keywordtype">bool</font> CFormElm::getArrayNode (UFormElm **result, uint arrayIndex)
00079 {
00080 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayNode"</font>, <font class="stringliteral">"This node is not an array."</font>);
00081 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00082 };
00083
00084 <font class="comment">// ***************************************************************************</font>
00085
<a name="l00086"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a34">00086</a> <font class="keywordtype">bool</font> CFormElm::getArrayNodeName (std::string &result, uint arrayIndex)<font class="keyword"> const</font>
00087 <font class="keyword"></font>{
00088 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayNodeName"</font>, <font class="stringliteral">"This node is not an array."</font>);
00089 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00090 }
00091
00092 <font class="comment">// ***************************************************************************</font>
00093
<a name="l00094"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a35">00094</a> <font class="keywordtype">bool</font> CFormElm::getArrayValue (std::string &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
00095 <font class="keyword"></font>{
00096 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayNode"</font>, <font class="stringliteral">"This node is not an array."</font>);
00097 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00098 }
00099
00100 <font class="comment">// ***************************************************************************</font>
00101
<a name="l00102"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a36">00102</a> <font class="keywordtype">bool</font> CFormElm::getArrayValue (sint8 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
00103 <font class="keyword"></font>{
00104 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This node is not an array."</font>);
00105 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00106 }
00107
00108 <font class="comment">// ***************************************************************************</font>
00109
<a name="l00110"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a37">00110</a> <font class="keywordtype">bool</font> CFormElm::getArrayValue (uint8 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
00111 <font class="keyword"></font>{
00112 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This node is not an array."</font>);
00113 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00114 }
00115
00116 <font class="comment">// ***************************************************************************</font>
00117
<a name="l00118"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a38">00118</a> <font class="keywordtype">bool</font> CFormElm::getArrayValue (sint16 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
00119 <font class="keyword"></font>{
00120 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This node is not an array."</font>);
00121 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00122 }
00123
00124 <font class="comment">// ***************************************************************************</font>
00125
<a name="l00126"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a39">00126</a> <font class="keywordtype">bool</font> CFormElm::getArrayValue (uint16 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
00127 <font class="keyword"></font>{
00128 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This node is not an array."</font>);
00129 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00130 }
00131
00132 <font class="comment">// ***************************************************************************</font>
00133
<a name="l00134"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a40">00134</a> <font class="keywordtype">bool</font> CFormElm::getArrayValue (sint32 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
00135 <font class="keyword"></font>{
00136 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This node is not an array."</font>);
00137 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00138 }
00139
00140 <font class="comment">// ***************************************************************************</font>
00141
<a name="l00142"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a41">00142</a> <font class="keywordtype">bool</font> CFormElm::getArrayValue (uint32 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
00143 <font class="keyword"></font>{
00144 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This node is not an array."</font>);
00145 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00146 }
00147
00148 <font class="comment">// ***************************************************************************</font>
00149
<a name="l00150"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a42">00150</a> <font class="keywordtype">bool</font> CFormElm::getArrayValue (<font class="keywordtype">float</font> &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
00151 <font class="keyword"></font>{
00152 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This node is not an array."</font>);
00153 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00154 }
00155
00156 <font class="comment">// ***************************************************************************</font>
00157
<a name="l00158"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a43">00158</a> <font class="keywordtype">bool</font> CFormElm::getArrayValue (<font class="keywordtype">double</font> &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
00159 <font class="keyword"></font>{
00160 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This node is not an array."</font>);
00161 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00162 }
00163
00164 <font class="comment">// ***************************************************************************</font>
00165
<a name="l00166"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a44">00166</a> <font class="keywordtype">bool</font> CFormElm::getArrayValue (<font class="keywordtype">bool</font> &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
00167 <font class="keyword"></font>{
00168 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This node is not an array."</font>);
00169 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00170 }
00171
00172 <font class="comment">// ***************************************************************************</font>
00173
<a name="l00174"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a45">00174</a> <font class="keywordtype">bool</font> CFormElm::getArrayValue (<a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
00175 <font class="keyword"></font>{
00176 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This node is not an array."</font>);
00177 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00178 }
00179
00180 <font class="comment">// ***************************************************************************</font>
00181
<a name="l00182"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a46">00182</a> <font class="keywordtype">bool</font> CFormElm::isStruct ()<font class="keyword"> const </font>
00183 <font class="keyword"></font>{
00184 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00185 };
00186
00187 <font class="comment">// ***************************************************************************</font>
00188
<a name="l00189"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a47">00189</a> <font class="keywordtype">bool</font> CFormElm::isVirtualStruct ()<font class="keyword"> const </font>
00190 <font class="keyword"></font>{
00191 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00192 };
00193
00194 <font class="comment">// ***************************************************************************</font>
00195
<a name="l00196"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a48">00196</a> <font class="keywordtype">bool</font> CFormElm::getDfnName (std::string &dfnName )<font class="keyword"> const</font>
00197 <font class="keyword"></font>{
00198 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00199 }
00200
00201 <font class="comment">// ***************************************************************************</font>
00202
<a name="l00203"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a49">00203</a> <font class="keywordtype">bool</font> CFormElm::getStructSize (uint &size)<font class="keyword"> const </font>
00204 <font class="keyword"></font>{
00205 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getStructSize"</font>, <font class="stringliteral">"This node is not a struct."</font>);
00206 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00207 };
00208
00209 <font class="comment">// ***************************************************************************</font>
00210
<a name="l00211"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a50">00211</a> <font class="keywordtype">bool</font> CFormElm::getStructNodeName (uint element, string &result)<font class="keyword"> const </font>
00212 <font class="keyword"></font>{
00213 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getStructNodeName"</font>, <font class="stringliteral">"This node is not a struct."</font>);
00214 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00215 };
00216
00217 <font class="comment">// ***************************************************************************</font>
00218
<a name="l00219"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a51">00219</a> <font class="keywordtype">bool</font> CFormElm::getStructNode (uint element, <font class="keyword">const</font> UFormElm **result)<font class="keyword"> const </font>
00220 <font class="keyword"></font>{
00221 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getStructNode"</font>, <font class="stringliteral">"This node is not a struct."</font>);
00222 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00223 };
00224
00225 <font class="comment">// ***************************************************************************</font>
00226
<a name="l00227"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a52">00227</a> <font class="keywordtype">bool</font> CFormElm::getStructNode (uint element, UFormElm **result)
00228 {
00229 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getStructNode"</font>, <font class="stringliteral">"This node is not a struct."</font>);
00230 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00231 };
00232
00233 <font class="comment">// ***************************************************************************</font>
00234
<a name="l00235"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a53">00235</a> <font class="keywordtype">bool</font> CFormElm::isAtom ()<font class="keyword"> const </font>
00236 <font class="keyword"></font>{
00237 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00238 };
00239
00240 <font class="comment">// ***************************************************************************</font>
00241
<a name="l00242"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a54">00242</a> <font class="keywordtype">bool</font> CFormElm::getValue (string &result, TEval evaluate)<font class="keyword"> const </font>
00243 <font class="keyword"></font>{
00244 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getValue"</font>, <font class="stringliteral">"This node is not an atom."</font>);
00245 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00246 };
00247
00248 <font class="comment">// ***************************************************************************</font>
00249
<a name="l00250"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a55">00250</a> <font class="keywordtype">bool</font> CFormElm::getValue (sint8 &result, TEval evaluate)<font class="keyword"> const</font>
00251 <font class="keyword"></font>{
00252 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getValue"</font>, <font class="stringliteral">"This node is not an atom."</font>);
00253 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00254 }
00255
00256 <font class="comment">// ***************************************************************************</font>
00257
<a name="l00258"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a56">00258</a> <font class="keywordtype">bool</font> CFormElm::getValue (uint8 &result, TEval evaluate)<font class="keyword"> const</font>
00259 <font class="keyword"></font>{
00260 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getValue"</font>, <font class="stringliteral">"This node is not an atom."</font>);
00261 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00262 }
00263
00264 <font class="comment">// ***************************************************************************</font>
00265
<a name="l00266"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a57">00266</a> <font class="keywordtype">bool</font> CFormElm::getValue (sint16 &result, TEval evaluate)<font class="keyword"> const</font>
00267 <font class="keyword"></font>{
00268 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getValue"</font>, <font class="stringliteral">"This node is not an atom."</font>);
00269 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00270 }
00271
00272 <font class="comment">// ***************************************************************************</font>
00273
<a name="l00274"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a58">00274</a> <font class="keywordtype">bool</font> CFormElm::getValue (uint16 &result, TEval evaluate)<font class="keyword"> const</font>
00275 <font class="keyword"></font>{
00276 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getValue"</font>, <font class="stringliteral">"This node is not an atom."</font>);
00277 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00278 }
00279
00280 <font class="comment">// ***************************************************************************</font>
00281
<a name="l00282"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a59">00282</a> <font class="keywordtype">bool</font> CFormElm::getValue (sint32 &result, TEval evaluate)<font class="keyword"> const</font>
00283 <font class="keyword"></font>{
00284 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getValue"</font>, <font class="stringliteral">"This node is not an atom."</font>);
00285 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00286 }
00287
00288 <font class="comment">// ***************************************************************************</font>
00289
<a name="l00290"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a60">00290</a> <font class="keywordtype">bool</font> CFormElm::getValue (uint32 &result, TEval evaluate)<font class="keyword"> const</font>
00291 <font class="keyword"></font>{
00292 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getValue"</font>, <font class="stringliteral">"This node is not an atom."</font>);
00293 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00294 }
00295
00296 <font class="comment">// ***************************************************************************</font>
00297
<a name="l00298"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a61">00298</a> <font class="keywordtype">bool</font> CFormElm::getValue (<font class="keywordtype">float</font> &result, TEval evaluate)<font class="keyword"> const</font>
00299 <font class="keyword"></font>{
00300 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getValue"</font>, <font class="stringliteral">"This node is not an atom."</font>);
00301 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00302 }
00303
00304 <font class="comment">// ***************************************************************************</font>
00305
<a name="l00306"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a62">00306</a> <font class="keywordtype">bool</font> CFormElm::getValue (<font class="keywordtype">double</font> &result, TEval evaluate)<font class="keyword"> const</font>
00307 <font class="keyword"></font>{
00308 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getValue"</font>, <font class="stringliteral">"This node is not an atom."</font>);
00309 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00310 }
00311
00312 <font class="comment">// ***************************************************************************</font>
00313
<a name="l00314"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a63">00314</a> <font class="keywordtype">bool</font> CFormElm::getValue (<font class="keywordtype">bool</font> &result, TEval evaluate)<font class="keyword"> const</font>
00315 <font class="keyword"></font>{
00316 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getValue"</font>, <font class="stringliteral">"This node is not an atom."</font>);
00317 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00318 }
00319
00320 <font class="comment">// ***************************************************************************</font>
00321
<a name="l00322"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a64">00322</a> <font class="keywordtype">bool</font> CFormElm::getValue (<a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> &result, TEval evaluate)<font class="keyword"> const</font>
00323 <font class="keyword"></font>{
00324 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getValue"</font>, <font class="stringliteral">"This node is not an atom."</font>);
00325 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00326 }
00327
00328 <font class="comment">// ***************************************************************************</font>
00329
<a name="l00330"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">00330</a> CFormElm::CFormElm (CForm *form, CFormElm *parentNode, <font class="keyword">const</font> CFormDfn *parentDfn, uint parentIndex)
00331 {
00332 <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a> = form;
00333 <a class="code" href="classNLGEORGES_1_1CFormElm.html#n1">ParentNode</a> = parentNode;
00334 <a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a> = parentDfn;
00335 <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a> = parentIndex;
00336 <a class="code" href="classNLGEORGES_1_1CFormElm.html#n4">Round</a> = 0xffffffff;
00337 }
00338
00339 <font class="comment">// ***************************************************************************</font>
00340
<a name="l00341"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a1">00341</a> CFormElm::~CFormElm ()
00342 {
00343 }
00344
00345 <font class="comment">// ***************************************************************************</font>
00346
<a name="l00347"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a3">00347</a> <font class="keywordtype">bool</font> CFormElm::isUsed (<font class="keyword">const</font> CForm *form)<font class="keyword"> const</font>
00348 <font class="keyword"></font>{
00349 <font class="keywordflow">return</font> form == <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>;
00350 }
00351
00352 <font class="comment">// ***************************************************************************</font>
00353
<a name="l00354"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a2">00354</a> CForm *CFormElm::getForm ()<font class="keyword"> const</font>
00355 <font class="keyword"></font>{
00356 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>;
00357 }
00358
00359 <font class="comment">// ***************************************************************************</font>
00360
<a name="l00361"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a6">00361</a> <font class="keywordtype">bool</font> CFormElm::getNodeByName (UFormElm **result, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, TWhereIsNode *where, <font class="keywordtype">bool</font> verbose, uint32 round)
00362 {
00363 <font class="keywordflow">if</font> (round == 0xffffffff)
00364 round = <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++;
00365
00366 <font class="keyword">const</font> UFormElm *resultConst = NULL;
00367 <font class="keywordflow">if</font> (((<font class="keyword">const</font> UFormElm*)<font class="keyword">this</font>)->getNodeByName (&resultConst, name, where, verbose, round))
00368 {
00369 *result = const_cast<UFormElm*> (resultConst);
00370 <font class="keywordflow">return</font> <font class="keyword">true</font>;
00371 }
00372 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00373 }
00374
00375 <font class="comment">// ***************************************************************************</font>
00376
<a name="l00377"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a5">00377</a> <font class="keywordtype">bool</font> CFormElm::getNodeByName (<font class="keyword">const</font> UFormElm **result, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, TWhereIsNode *where, <font class="keywordtype">bool</font> verbose, uint32 round)<font class="keyword"> const</font>
00378 <font class="keyword"></font>{
00379 <font class="keywordflow">if</font> (round == 0xffffffff)
00380 round = <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++;
00381
00382 <font class="comment">// The parent Dfn</font>
00383 <font class="keyword">const</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#l2">CFormDfn</a> *parentDfn;
00384 <font class="keyword">const</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#l2">CFormDfn</a> *nodeDfn;
00385 <font class="keyword">const</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#l1">CType</a> *nodeType;
00386 <a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a> *node;
00387 uint indexDfn;
00388 <font class="keywordtype">bool</font> array;
00389 <font class="keywordtype">bool</font> parentVDfnArray;
00390 UFormDfn::TEntryType <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>;
00391
00392 <font class="comment">// Search for the node</font>
00393 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a5">getNodeByName</a> (name, &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>, array, parentVDfnArray, verbose, round))
00394 {
00395 <font class="comment">// Set the result</font>
00396 *result = node;
00397
00398 <font class="comment">// Where ?</font>
00399 <font class="keywordflow">if</font> (where && node)
00400 {
00401 *where = (node->getForm () == <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>) ? <a class="code" href="classNLGEORGES_1_1UFormElm.html#s13s3">NodeForm</a> : <a class="code" href="classNLGEORGES_1_1UFormElm.html#s13s4">NodeParentForm</a>;
00402 }
00403
00404 <font class="comment">// Ok </font>
00405 <font class="keywordflow">return</font> <font class="keyword">true</font>;
00406 }
00407
00408 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00409 }
00410
00411 <font class="comment">// ***************************************************************************</font>
00412
<a name="l00413"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a7">00413</a> <font class="keywordtype">bool</font> CFormElm::getValueByName (string& result, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, TEval evaluate, TWhereIsValue *where, uint32 round)<font class="keyword"> const</font>
00414 <font class="keyword"></font>{
00415 <font class="keywordflow">if</font> (round == 0xffffffff)
00416 round = <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++;
00417
00418 <font class="comment">// The parent Dfn</font>
00419 <font class="keyword">const</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#l2">CFormDfn</a> *parentDfn;
00420 <font class="keyword">const</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#l2">CFormDfn</a> *nodeDfn;
00421 <font class="keyword">const</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#l1">CType</a> *nodeType;
00422 <a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a> *node;
00423 uint parentIndex;
00424 <font class="keywordtype">bool</font> array;
00425 <font class="keywordtype">bool</font> parentVDfnArray;
00426 UFormDfn::TEntryType <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>;
00427
00428 <font class="comment">// Search for the node</font>
00429 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a5">getNodeByName</a> (name, &parentDfn, parentIndex, &nodeDfn, &nodeType, &node, <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>, array, parentVDfnArray, <font class="keyword">true</font>, round))
00430 {
00431 <font class="comment">// End, return the current index</font>
00432 <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a> == UFormDfn::EntryType)
00433 {
00434 <font class="comment">// The atom</font>
00435 <font class="keyword">const</font> CFormElmAtom *atom = node ? safe_cast<const CFormElmAtom*> (node) : NULL;
00436
00437 <font class="comment">// Evale</font>
00438 <a class="code" href="debug_8h.html#a6">nlassert</a> (nodeType);
00439 <font class="keywordflow">return</font> (nodeType->getValue (result, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, atom, *parentDfn, parentIndex, evaluate, (uint32*)where, round, name));
00440 }
00441 <font class="keywordflow">else</font>
00442 {
00443 <font class="comment">// Error message</font>
00444 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getValueByName"</font>, <font class="stringliteral">"The node (%s) is not an atom element. Can't return a value."</font>, name);
00445 }
00446 }
00447 <font class="keywordflow">else</font>
00448 {
00449 <font class="comment">// Error message</font>
00450 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getValueByName"</font>, <font class="stringliteral">"Can't find the node (%s)."</font>, name);
00451 }
00452
00453 <font class="comment">// Error</font>
00454 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00455 }
00456
00457 <font class="comment">// ***************************************************************************</font>
00458
<a name="l00459"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a8">00459</a> <font class="keywordtype">bool</font> CFormElm::getValueByName (sint8 &result, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, TEval evaluate, TWhereIsValue *where, uint32 round)<font class="keyword"> const</font>
00460 <font class="keyword"></font>{
00461 <font class="keywordflow">if</font> (round == 0xffffffff)
00462 round = <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++;
00463
00464 <font class="comment">// Get the string value</font>
00465 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
00466 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a7">getValueByName</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, name, evaluate, where, round))
00467 {
00468 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
00469 }
00470
00471 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00472 }
00473
00474 <font class="comment">// ***************************************************************************</font>
00475
<a name="l00476"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a9">00476</a> <font class="keywordtype">bool</font> CFormElm::getValueByName (uint8 &result, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, TEval evaluate, TWhereIsValue *where, uint32 round)<font class="keyword"> const</font>
00477 <font class="keyword"></font>{
00478 <font class="keywordflow">if</font> (round == 0xffffffff)
00479 round = <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++;
00480
00481 <font class="comment">// Get the string value</font>
00482 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
00483 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a7">getValueByName</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, name, evaluate, where, round))
00484 {
00485 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
00486 }
00487
00488 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00489 }
00490
00491 <font class="comment">// ***************************************************************************</font>
00492
<a name="l00493"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a10">00493</a> <font class="keywordtype">bool</font> CFormElm::getValueByName (sint16 &result, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, TEval evaluate, TWhereIsValue *where, uint32 round)<font class="keyword"> const</font>
00494 <font class="keyword"></font>{
00495 <font class="keywordflow">if</font> (round == 0xffffffff)
00496 round = <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++;
00497
00498 <font class="comment">// Get the string value</font>
00499 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
00500 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a7">getValueByName</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, name, evaluate, where, round))
00501 {
00502 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
00503 }
00504
00505 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00506 }
00507
00508 <font class="comment">// ***************************************************************************</font>
00509
<a name="l00510"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a11">00510</a> <font class="keywordtype">bool</font> CFormElm::getValueByName (uint16 &result, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, TEval evaluate, TWhereIsValue *where, uint32 round)<font class="keyword"> const</font>
00511 <font class="keyword"></font>{
00512 <font class="keywordflow">if</font> (round == 0xffffffff)
00513 round = <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++;
00514
00515 <font class="comment">// Get the string value</font>
00516 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
00517 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a7">getValueByName</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, name, evaluate, where, round))
00518 {
00519 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
00520 }
00521
00522 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00523 }
00524
00525 <font class="comment">// ***************************************************************************</font>
00526
<a name="l00527"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a12">00527</a> <font class="keywordtype">bool</font> CFormElm::getValueByName (sint32 &result, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, TEval evaluate, TWhereIsValue *where, uint32 round)<font class="keyword"> const</font>
00528 <font class="keyword"></font>{
00529 <font class="keywordflow">if</font> (round == 0xffffffff)
00530 round = <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++;
00531
00532 <font class="comment">// Get the string value</font>
00533 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
00534 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a7">getValueByName</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, name, evaluate, where, round))
00535 {
00536 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
00537 }
00538
00539 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00540 }
00541
00542 <font class="comment">// ***************************************************************************</font>
00543
<a name="l00544"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a13">00544</a> <font class="keywordtype">bool</font> CFormElm::getValueByName (uint32 &result, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, TEval evaluate, TWhereIsValue *where, uint32 round)<font class="keyword"> const</font>
00545 <font class="keyword"></font>{
00546 <font class="keywordflow">if</font> (round == 0xffffffff)
00547 round = <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++;
00548
00549 <font class="comment">// Get the string value</font>
00550 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
00551 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a7">getValueByName</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, name, evaluate, where, round))
00552 {
00553 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
00554 }
00555
00556 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00557 }
00558
00559 <font class="comment">// ***************************************************************************</font>
00560
<a name="l00561"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a14">00561</a> <font class="keywordtype">bool</font> CFormElm::getValueByName (<font class="keywordtype">float</font> &result, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, TEval evaluate, TWhereIsValue *where, uint32 round)<font class="keyword"> const</font>
00562 <font class="keyword"></font>{
00563 <font class="keywordflow">if</font> (round == 0xffffffff)
00564 round = <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++;
00565
00566 <font class="comment">// Get the string value</font>
00567 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
00568 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a7">getValueByName</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, name, evaluate, where, round))
00569 {
00570 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
00571 }
00572
00573 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00574 }
00575
00576 <font class="comment">// ***************************************************************************</font>
00577
<a name="l00578"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a15">00578</a> <font class="keywordtype">bool</font> CFormElm::getValueByName (<font class="keywordtype">double</font> &result, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, TEval evaluate, TWhereIsValue *where, uint32 round)<font class="keyword"> const</font>
00579 <font class="keyword"></font>{
00580 <font class="keywordflow">if</font> (round == 0xffffffff)
00581 round = <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++;
00582
00583 <font class="comment">// Get the string value</font>
00584 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
00585 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a7">getValueByName</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, name, evaluate, where, round))
00586 {
00587 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
00588 }
00589
00590 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00591 }
00592
00593 <font class="comment">// ***************************************************************************</font>
00594
<a name="l00595"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a16">00595</a> <font class="keywordtype">bool</font> CFormElm::getValueByName (<font class="keywordtype">bool</font> &result, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, TEval evaluate, TWhereIsValue *where, uint32 round)<font class="keyword"> const</font>
00596 <font class="keyword"></font>{
00597 <font class="keywordflow">if</font> (round == 0xffffffff)
00598 round = <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++;
00599
00600 <font class="comment">// Get the string value</font>
00601 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
00602 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a7">getValueByName</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, name, evaluate, where, round))
00603 {
00604 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
00605 }
00606
00607 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00608 }
00609
00610 <font class="comment">// ***************************************************************************</font>
00611
<a name="l00612"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a17">00612</a> <font class="keywordtype">bool</font> CFormElm::getValueByName (<a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> &result, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, TEval evaluate, TWhereIsValue *where, uint32 round)<font class="keyword"> const</font>
00613 <font class="keyword"></font>{
00614 <font class="keywordflow">if</font> (round == 0xffffffff)
00615 round = <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++;
00616
00617 <font class="comment">// Get the string value</font>
00618 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
00619 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a7">getValueByName</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, name, evaluate, where, round))
00620 {
00621 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
00622 }
00623
00624 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00625 }
00626
00627 <font class="comment">// ***************************************************************************</font>
00628
<a name="l00629"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a29">00629</a> UFormElm *CFormElm::getParent ()<font class="keyword"> const</font>
00630 <font class="keyword"></font>{
00631 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#n1">ParentNode</a>;
00632 }
00633
00634 <font class="comment">// ***************************************************************************</font>
00635
<a name="l00636"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a75">00636</a> <font class="keywordtype">bool</font> CFormElm::createNodeByName (<font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keyword">const</font> CFormDfn **parentDfn, uint &indexDfn,
00637 <font class="keyword">const</font> CFormDfn **nodeDfn, <font class="keyword">const</font> CType **nodeType,
00638 CFormElm **node, UFormDfn::TEntryType &<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>,
00639 <font class="keywordtype">bool</font> &array, <font class="keywordtype">bool</font> &created)
00640 {
00641 *parentDfn = <a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>;
00642 indexDfn = <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>;
00643 *nodeDfn = NULL;
00644 *nodeType = NULL;
00645 *node = <font class="keyword">this</font>;
00646 <font class="keywordtype">bool</font> parentVDfnArray;
00647 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#e0">getIternalNodeByName</a> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, name, parentDfn, indexDfn, nodeDfn, nodeType, node, <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>, array, <a class="code" href="classNLGEORGES_1_1CFormElm.html#t3t1">Create</a>, created, parentVDfnArray, <font class="keyword">true</font>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++);
00648 }
00649
00650 <font class="comment">// ***************************************************************************</font>
00651
<a name="l00652"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a76">00652</a> <font class="keywordtype">bool</font> CFormElm::deleteNodeByName (<font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keyword">const</font> CFormDfn **parentDfn, uint &indexDfn,
00653 <font class="keyword">const</font> CFormDfn **nodeDfn, <font class="keyword">const</font> CType **nodeType,
00654 CFormElm **node, UFormDfn::TEntryType &<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>,
00655 <font class="keywordtype">bool</font> &array)
00656 {
00657 *parentDfn = <a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>;
00658 indexDfn = <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>;
00659 *nodeDfn = NULL;
00660 *nodeType = NULL;
00661 *node = <font class="keyword">this</font>;
00662 <font class="keywordtype">bool</font> created;
00663 <font class="keywordtype">bool</font> parentVDfnArray;
00664 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#e0">getIternalNodeByName</a> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, name, parentDfn, indexDfn, nodeDfn, nodeType, node, <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>, array, <a class="code" href="classNLGEORGES_1_1CFormElm.html#t3t2">Delete</a>, created, parentVDfnArray, <font class="keyword">true</font>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++);
00665 }
00666
00667 <font class="comment">// ***************************************************************************</font>
00668
<a name="l00669"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a77">00669</a> <font class="keywordtype">bool</font> CFormElm::getNodeByName (<font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keyword">const</font> CFormDfn **parentDfn, uint &indexDfn,
00670 <font class="keyword">const</font> CFormDfn **nodeDfn, <font class="keyword">const</font> CType **nodeType,
00671 CFormElm **node, UFormDfn::TEntryType &<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>,
00672 <font class="keywordtype">bool</font> &array, <font class="keywordtype">bool</font> &parentVDfnArray, <font class="keywordtype">bool</font> verbose, uint32 round)<font class="keyword"> const</font>
00673 <font class="keyword"></font>{
00674 *parentDfn = <a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>;
00675 indexDfn = <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>;
00676 *nodeDfn = NULL;
00677 *nodeType = NULL;
00678 *node = (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a>*)<font class="keyword">this</font>;
00679 <font class="keywordtype">bool</font> created;
00680 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#e0">getIternalNodeByName</a> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, name, parentDfn, indexDfn, nodeDfn, nodeType, node, <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>, array, <a class="code" href="classNLGEORGES_1_1CFormElm.html#t3t0">Return</a>, created, parentVDfnArray, verbose, round);
00681 }
00682
00683 <font class="comment">// ***************************************************************************</font>
00684
<a name="l00685"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a78">00685</a> <font class="keywordtype">bool</font> CFormElm::arrayInsertNodeByName (<font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keyword">const</font> CFormDfn **parentDfn, uint &indexDfn,
00686 <font class="keyword">const</font> CFormDfn **nodeDfn, <font class="keyword">const</font> CType **nodeType,
00687 CFormElm **node, UFormDfn::TEntryType &<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>,
00688 <font class="keywordtype">bool</font> &array, <font class="keywordtype">bool</font> verbose, uint arrayIndex)<font class="keyword"> const</font>
00689 <font class="keyword"></font>{
00690 <font class="comment">// Get the node by name</font>
00691 *parentDfn = <a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>;
00692 indexDfn = <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>;
00693 *nodeDfn = NULL;
00694 *nodeType = NULL;
00695 *node = (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a>*)<font class="keyword">this</font>;
00696 <font class="keywordtype">bool</font> created;
00697 <font class="keywordtype">bool</font> parentVDfnArray;
00698 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#e0">getIternalNodeByName</a> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, name, parentDfn, indexDfn, nodeDfn, nodeType, node, <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>, array, <a class="code" href="classNLGEORGES_1_1CFormElm.html#t3t1">Create</a>, created, parentVDfnArray, verbose, <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++))
00699 {
00700 <font class="comment">// Must be in the same form</font>
00701 <a class="code" href="debug_8h.html#a6">nlassert</a> ((*node) && ((*node)->Form == <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>));
00702
00703 <font class="comment">// Get its parent</font>
00704 <a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a> *parentNode = (*node)->ParentNode;
00705 <font class="keywordflow">if</font> (parentNode->isArray ())
00706 {
00707 <font class="comment">// Cast pointer</font>
00708 CFormElmArray *array = safe_cast<CFormElmArray*>(parentNode);
00709
00710 <font class="comment">// Valid index ?</font>
00711 <font class="keywordflow">if</font> (arrayIndex<array->Elements.size ())
00712 {
00713 <font class="comment">// Insert the element</font>
00714 array->Elements.insert (array->Elements.begin() + arrayIndex);
00715
00716 <font class="comment">// Create a new element</font>
00717
00718 <font class="comment">// The new element</font>
00719 <a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a> *newelm = NULL;
00720 <font class="keywordflow">switch</font> (type)
00721 {
00722 <font class="keywordflow">case</font> UFormDfn::EntryType:
00723 {
00724 <font class="comment">// Create an atom</font>
00725 CFormElmAtom *atom = <font class="keyword">new</font> CFormElmAtom (<a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, array, *parentDfn, indexDfn);
00726 newelm = atom;
00727 }
00728 <font class="keywordflow">break</font>;
00729 <font class="keywordflow">case</font> UFormDfn::EntryDfn:
00730 {
00731 CFormElmStruct *_struct = <font class="keyword">new</font> CFormElmStruct (<a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, array, *parentDfn, indexDfn);
00732 _struct->build (*nodeDfn);
00733 newelm = _struct;
00734 }
00735 <font class="keywordflow">break</font>;
00736 <font class="keywordflow">case</font> UFormDfn::EntryVirtualDfn:
00737 <font class="comment">// todo array of virtual struct</font>
00738 <font class="comment">//newelm = new CFormElmVirtualStruct (Form, array, *parentDfn, indexDfn);</font>
00739 <font class="keywordflow">break</font>;
00740 <font class="keywordflow">default</font>:
00741 <a class="code" href="debug_8h.html#a12">nlstop</a>
00742 }
00743
00744 <a class="code" href="debug_8h.html#a6">nlassert</a> (newelm);
00745
00746 <font class="comment">// Set the element pointer</font>
00747 array->Elements[arrayIndex].Element = newelm;
00748
00749 <font class="comment">// Ok </font>
00750 <font class="keywordflow">return</font> <font class="keyword">true</font>;
00751 }
00752 }
00753 }
00754 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00755 }
00756
00757 <font class="comment">// ***************************************************************************</font>
00758
<a name="l00759"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a79">00759</a> <font class="keywordtype">bool</font> CFormElm::arrayDeleteNodeByName (<font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keyword">const</font> CFormDfn **parentDfn, uint &indexDfn,
00760 <font class="keyword">const</font> CFormDfn **nodeDfn, <font class="keyword">const</font> CType **nodeType,
00761 CFormElm **node, UFormDfn::TEntryType &<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>,
00762 <font class="keywordtype">bool</font> &array, <font class="keywordtype">bool</font> verbose, uint arrayIndex)<font class="keyword"> const</font>
00763 <font class="keyword"></font>{
00764 <font class="comment">// Get the node by name</font>
00765 *parentDfn = <a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>;
00766 indexDfn = <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>;
00767 *nodeDfn = NULL;
00768 *nodeType = NULL;
00769 *node = (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a>*)<font class="keyword">this</font>;
00770 <font class="keywordtype">bool</font> created;
00771 <font class="keywordtype">bool</font> parentVDfnArray;
00772 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#e0">getIternalNodeByName</a> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, name, parentDfn, indexDfn, nodeDfn, nodeType, node, <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>, array, <a class="code" href="classNLGEORGES_1_1CFormElm.html#t3t1">Create</a>, created, parentVDfnArray, verbose, <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++))
00773 {
00774 <font class="comment">// Must be in the same form</font>
00775 <a class="code" href="debug_8h.html#a6">nlassert</a> ((*node) && ((*node)->Form == <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>));
00776
00777 <font class="comment">// Get its parent</font>
00778 <a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a> *parentNode = (*node)->ParentNode;
00779 <font class="keywordflow">if</font> (parentNode->isArray ())
00780 {
00781 <font class="comment">// Cast pointer</font>
00782 CFormElmArray *array = safe_cast<CFormElmArray*>(parentNode);
00783
00784 <font class="comment">// Valid index ?</font>
00785 <font class="keywordflow">if</font> (arrayIndex<array->Elements.size ())
00786 {
00787 <font class="comment">// Insert the element</font>
00788 <font class="keywordflow">if</font> (array->Elements[arrayIndex].Element)
00789 <font class="keyword">delete</font> array->Elements[arrayIndex].Element;
00790
00791 <font class="comment">// Erase the entry</font>
00792 array->Elements.erase (array->Elements.begin () + arrayIndex);
00793
00794 <font class="comment">// Ok </font>
00795 <font class="keywordflow">return</font> <font class="keyword">true</font>;
00796 }
00797 }
00798 }
00799 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00800 }
00801
00802 <font class="comment">// ***************************************************************************</font>
00803
<a name="l00804"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#e0">00804</a> <font class="keywordtype">bool</font> CFormElm::getIternalNodeByName (CForm *form, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keyword">const</font> CFormDfn **parentDfn, uint &indexDfn, <font class="keyword">const</font> CFormDfn **nodeDfn, <font class="keyword">const</font> CType **nodeType, CFormElm **node, UFormDfn::TEntryType &<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>, <font class="keywordtype">bool</font> &array, TNodeAction action, <font class="keywordtype">bool</font> &created, <font class="keywordtype">bool</font> &parentVDfnArray, <font class="keywordtype">bool</font> verbose, uint32 round)
00805 {
00806 <font class="comment">// *** Init output variables</font>
00807 created = <font class="keyword">false</font>;
00808 parentVDfnArray = <font class="keyword">false</font>;
00809
00810 <font class="comment">// ParentDfn or Node..</font>
00811 <a class="code" href="debug_8h.html#a6">nlassert</a> ( (*parentDfn) || (*node) );
00812
00813 <font class="comment">// Error message</font>
00814 <font class="keywordtype">char</font> error[512];
00815
00816 <font class="comment">// Parent exist ?</font>
00817 <font class="keywordflow">if</font> (*parentDfn)
00818 {
00819 <font class="comment">// Get the entry</font>
00820 <font class="keyword">const</font> CFormDfn::CEntry &theEntry = (*parentDfn)->getEntry (indexDfn);
00821
00822 <font class="comment">// Get the type</font>
00823 <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a> = theEntry.getType ();
00824 *nodeType = theEntry.getTypePtr ();
00825 <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a> == UFormDfn::EntryVirtualDfn)
00826 {
00827 <font class="keywordflow">if</font> (*node)
00828 *nodeDfn = safe_cast <CFormElmVirtualStruct*> (*node)->FormDfn;
00829 <font class="keywordflow">else</font>
00830 *nodeDfn = NULL;
00831 }
00832 <font class="keywordflow">else</font>
00833 *nodeDfn = theEntry.getDfnPtr ();
00834 array = theEntry.getArrayFlag ();
00835 }
00836 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (*node)
00837 {
00838 <a class="code" href="debug_8h.html#a6">nlassert</a> (!(*node)->isArray ());
00839 indexDfn = 0xffffffff;
00840 *nodeType = (*node)->isAtom () ? safe_cast<CFormElmAtom*>(*node)->Type : NULL;
00841 *nodeDfn = (*node)->isStruct () ? (<font class="keyword">const</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#l2">CFormDfn</a> *)(safe_cast<CFormElmStruct*>(*node)->FormDfn) : NULL;
00842 <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a> = (*node)->isAtom () ? UFormDfn::EntryType : (*node)->isVirtualStruct () ? UFormDfn::EntryVirtualDfn : UFormDfn::EntryDfn;
00843 array = <font class="keyword">false</font>;
00844 }
00845
00846 <font class="comment">// Check node pointer</font>
00847 <font class="keywordflow">if</font> (action == <a class="code" href="classNLGEORGES_1_1CFormElm.html#t3t1">Create</a>)
00848 {
00849 <a class="code" href="debug_8h.html#a6">nlassert</a> (*node);
00850 <a class="code" href="debug_8h.html#a6">nlassert</a> ((*node)->getForm () == form);
00851 }
00852
00853 <font class="comment">// Backup current node</font>
00854 <a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a> *backupFirstElm = *node;
00855
00856 <font class="comment">// *** Parsing variables</font>
00857
00858 <font class="comment">// Current token start and end</font>
00859 <font class="keyword">const</font> <font class="keywordtype">char</font> *startToken = name;
00860 <font class="keyword">const</font> <font class="keywordtype">char</font> *endToken;
00861
00862 <font class="comment">// Current token start</font>
00863 string token;
00864
00865 <font class="comment">// Current form name</font>
00866 string currentName;
00867 <font class="keywordflow">if</font> (*node)
00868 (*node)->getFormName (currentName);
00869
00870 <font class="comment">// Error</font>
00871 uint errorIndex;
00872
00873 <font class="comment">// Token code</font>
00874 uint code;
00875
00876 <font class="comment">// Are we parsing an array ?</font>
00877 <font class="keywordtype">bool</font> inArrayIndex = <font class="keyword">false</font>;
00878
00879 <font class="comment">// Index in the array</font>
00880 uint arrayIndex;
00881
00882 <font class="comment">// Bool next token must be an array index</font>
00883 <font class="keywordtype">bool</font> wantArrayIndex = <font class="keyword">false</font>;
00884
00885 <font class="comment">// Last struct elm</font>
00886 CFormElmStruct *lastStructElm = ((*node)->ParentNode && (*node)->ParentNode->isStruct ()) ? safe_cast<CFormElmStruct*> ((*node)->ParentNode) : NULL;
00887 uint lastStructIndex = 0;
00888 <font class="keywordflow">if</font> (lastStructElm)
00889 {
00890 <font class="comment">// Look for node in the parent</font>
00891 <font class="keywordflow">for</font> (; lastStructIndex<lastStructElm->Elements.size (); lastStructIndex++)
00892 {
00893 <font class="comment">// The same node ?</font>
00894 <font class="keywordflow">if</font> (lastStructElm->Elements[lastStructIndex].Element == (*node))
00895 <font class="keywordflow">break</font>;
00896 }
00897
00898 <font class="comment">// Must have been found</font>
00899 <a class="code" href="debug_8h.html#a6">nlassert</a> (lastStructIndex<lastStructElm->Elements.size ());
00900 }
00901
00902 <font class="comment">// While there is tokens</font>
00903 <font class="keywordflow">while</font> (endToken = <a class="code" href="classNLGEORGES_1_1CFormElm.html#d0">tokenize</a> (startToken, token, errorIndex, code))
00904 {
00905 <font class="comment">// Ready an array index ?</font>
00906 <font class="keywordflow">if</font> (!inArrayIndex)
00907 {
00908 <font class="comment">// For each code</font>
00909 <font class="keywordflow">switch</font> (code)
00910 {
00911 <font class="keywordflow">case</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#u4u0">TokenString</a>:
00912 {
00913 <font class="comment">// Need an array index array ?</font>
00914 <font class="keywordflow">if</font> (wantArrayIndex)
00915 {
00916 <font class="comment">// Error message</font>
00917 <a class="code" href="namespaceNLMISC.html#a211">smprintf</a> (error, 512, <font class="stringliteral">"Token (%s) should be an array index."</font>, token.c_str());
00918 <font class="keywordflow">goto</font> exit;
00919 }
00920
00921 <font class="comment">// Are we a struct ?</font>
00922 <font class="keywordflow">if</font> ( ((<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a> == UFormDfn::EntryDfn) || (<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a> == UFormDfn::EntryVirtualDfn)) <font class="comment">/*&& (!array)*/</font> )
00923 {
00924 <font class="comment">// Check the virtual DFN is not empty..</font>
00925 <font class="keywordflow">if</font> ( (<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a> == UFormDfn::EntryVirtualDfn) && (*nodeDfn == NULL) )
00926 {
00927 <font class="comment">// Is it a parent virtual DFN ?</font>
00928 <font class="keywordflow">if</font> ( (<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a> == UFormDfn::EntryVirtualDfn) && (*node == NULL) )
00929 parentVDfnArray = <font class="keyword">true</font>;
00930
00931 <font class="comment">// Create mode ?</font>
00932 <font class="keywordflow">if</font> (action == <a class="code" href="classNLGEORGES_1_1CFormElm.html#t3t1">Create</a>)
00933 {
00934 <font class="comment">// Should have a valid node</font>
00935 <a class="code" href="debug_8h.html#a6">nlassert</a> (*node && lastStructElm);
00936
00937 <font class="comment">// Get the current virtual dfn</font>
00938 CFormElmVirtualStruct *vStruct = safe_cast<CFormElmVirtualStruct*> (*node);
00939
00940 <font class="comment">// Get the form name of the current node</font>
00941 string formName;
00942 vStruct->getFormName (formName, NULL);
00943
00944 <font class="comment">// Get the parent node if available</font>
00945 <font class="keywordflow">for</font> (uint parent=0; parent<form->getParentCount (); parent++)
00946 {
00947 <font class="comment">// Get the parent</font>
00948 <a class="code" href="classNLGEORGES_1_1CFormElm.html#l0">CForm</a> *parentPtr = form->getParent (parent);
00949 <a class="code" href="debug_8h.html#a6">nlassert</a> (parentPtr);
00950
00951 <font class="comment">// Get the virtual node by name</font>
00952 UFormElm *uelm;
00953 <font class="keywordflow">if</font> (parentPtr->getRootNode ().getNodeByName (&uelm, formName.c_str (), NULL, verbose, round) && uelm)
00954 {
00955 <font class="comment">// Value node ?</font>
00956 <font class="keywordflow">if</font> (uelm->isVirtualStruct ())
00957 {
00958 <font class="comment">// Get a virtual struct pointer</font>
00959 CFormElmVirtualStruct *vStructParent = safe_cast<CFormElmVirtualStruct*> (uelm);
00960
00961 <font class="comment">// Copy the DFN filename</font>
00962 vStruct->DfnFilename = vStructParent->DfnFilename;
00963
00964 <font class="comment">// Build it</font>
00965 vStruct->build (vStructParent->FormDfn);
00966
00967 <font class="comment">// Set the current DFN</font>
00968 *nodeDfn = vStruct->FormDfn;
00969
00970 <font class="comment">// Stop looking for parent</font>
00971 <font class="keywordflow">break</font>;
00972 }
00973 <font class="keywordflow">else</font>
00974 {
00975 <font class="comment">// Error message</font>
00976 <a class="code" href="namespaceNLMISC.html#a211">smprintf</a> (error, 512, <font class="stringliteral">"Internal node parsing error."</font>);
00977 <font class="keywordflow">goto</font> exit;
00978 }
00979 }
00980 }
00981 }
00982
00983 <font class="comment">// Still no DFN ?</font>
00984 <font class="keywordflow">if</font> (*nodeDfn == NULL)
00985 {
00986 <font class="comment">// Error message</font>
00987 <a class="code" href="namespaceNLMISC.html#a211">smprintf</a> (error, 512, <font class="stringliteral">"Empty virtual struct element. Can't look into it while it is not defined."</font>);
00988 <font class="keywordflow">goto</font> exit;
00989 }
00990 }
00991
00992 <font class="comment">// Must hjave a nodeDfn here</font>
00993 <a class="code" href="debug_8h.html#a6">nlassert</a> (*nodeDfn);
00994
00995 <font class="comment">// Look for the element</font>
00996 uint elementCount = (*nodeDfn)->getNumEntry ();
00997
00998 <font class="comment">// Get the parents</font>
00999 vector<const CFormDfn*> arrayDfn;
01000 arrayDfn.reserve ((*nodeDfn)->countParentDfn ());
01001 (*nodeDfn)->getParentDfn (arrayDfn);
01002
01003 <font class="comment">// For each parent</font>
01004 uint i;
01005 uint formElm = 0;
01006 <font class="keywordflow">for</font> (i=0; i<arrayDfn.size(); i++)
01007 {
01008 <font class="comment">// The dfn</font>
01009 <font class="keyword">const</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#l2">CFormDfn</a> &dfn = *(arrayDfn[i]);
01010
01011 <font class="comment">// For each elements</font>
01012 uint element;
01013 <font class="keywordflow">for</font> (element=0; element<dfn.Entries.size(); element++)
01014 {
01015 <font class="comment">// Good name ?</font>
01016 <font class="keywordflow">if</font> (dfn.Entries[element].Name == token)
01017 {
01018 <font class="comment">// Good one.</font>
01019 *parentDfn = &dfn;
01020 indexDfn = element;
01021 *nodeDfn = dfn.Entries[element].Dfn;
01022 *nodeType = dfn.Entries[element].Type;
01023 <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a> = dfn.Entries[element].TypeElement;
01024 array = dfn.Entries[element].Array;
01025 wantArrayIndex = array;
01026
01027 <font class="comment">// Next node</font>
01028 <font class="keywordflow">if</font> (*node)
01029 {
01030 <font class="comment">// Get next node</font>
01031 CFormElmStruct *nodeStruct = safe_cast<CFormElmStruct*> (*node);
01032 <a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a> *nextElt = nodeStruct->Elements[formElm].Element;
01033
01034 <font class="comment">// If no next node, watch for parent node</font>
01035 *node = nextElt;
01036
01037 <font class="comment">// Create node</font>
01038 <font class="keywordflow">if</font> ( (action == <a class="code" href="classNLGEORGES_1_1CFormElm.html#t3t1">Create</a>) && (*node == NULL) )
01039 {
01040 <font class="comment">// Is an array ?</font>
01041 <font class="keywordflow">if</font> (array)
01042 {
01043 <font class="comment">// Create an atom</font>
01044 CFormElmArray *atom = <font class="keyword">new</font> CFormElmArray (form, *nodeDfn, *nodeType, nodeStruct, *parentDfn, indexDfn);
01045 *node = atom;
01046 }
01047 <font class="keywordflow">else</font>
01048 {
01049 <font class="comment">// What kind of node ?</font>
01050 <font class="keywordflow">switch</font> (type)
01051 {
01052 <font class="keywordflow">case</font> UFormDfn::EntryType:
01053 {
01054 <font class="comment">// Create an atom</font>
01055 CFormElmAtom *atom = <font class="keyword">new</font> CFormElmAtom (form, nodeStruct, *parentDfn, indexDfn);
01056 *node = atom;
01057 }
01058 <font class="keywordflow">break</font>;
01059 <font class="keywordflow">case</font> UFormDfn::EntryDfn:
01060 {
01061 CFormElmStruct *_struct = <font class="keyword">new</font> CFormElmStruct (form, nodeStruct, *parentDfn, indexDfn);
01062 _struct->build (*nodeDfn);
01063 *node = _struct;
01064 }
01065 <font class="keywordflow">break</font>;
01066 <font class="keywordflow">case</font> UFormDfn::EntryVirtualDfn:
01067 *node = <font class="keyword">new</font> CFormElmVirtualStruct (form, nodeStruct, *parentDfn, indexDfn);
01068 <font class="keywordflow">break</font>;
01069 <font class="keywordflow">default</font>:
01070 <a class="code" href="debug_8h.html#a12">nlstop</a>;
01071 }
01072 }
01073
01074 <font class="comment">// Node created</font>
01075 created = <font class="keyword">true</font>;
01076
01077 <font class="comment">// Set the node in parent</font>
01078 nodeStruct->Elements[formElm].Element = *node;
01079 }
01080
01081 <font class="comment">// Is a virtual DFN ?</font>
01082 <font class="keywordflow">if</font> ((*node) && (*node)->isVirtualStruct ())
01083 {
01084 <font class="comment">// Should be NULL</font>
01085 <a class="code" href="debug_8h.html#a6">nlassert</a> (*nodeDfn == NULL);
01086
01087 <font class="comment">// Set the current dfn</font>
01088 *nodeDfn = safe_cast<const CFormElmVirtualStruct*> (*node)->FormDfn;
01089 }
01090
01091 <font class="comment">// Save last struct</font>
01092 lastStructElm = nodeStruct;
01093 lastStructIndex = formElm;
01094 }
01095 <font class="keywordflow">else</font>
01096 {
01097 <font class="comment">// Save last struct</font>
01098 CFormElmStruct *lastStructElm = NULL;
01099 uint lastStructIndex = 0xffffffff;
01100
01101 *node = NULL;
01102 }
01103
01104 <font class="keywordflow">break</font>;
01105 }
01106 formElm++;
01107 }
01108
01109 <font class="comment">// Breaked ?</font>
01110 <font class="keywordflow">if</font> (element!=dfn.Entries.size())
01111 <font class="keywordflow">break</font>;
01112 }
01113
01114 <font class="comment">// Breaked ?</font>
01115 <font class="keywordflow">if</font> (i==arrayDfn.size())
01116 {
01117 <font class="comment">// Not found</font>
01118 <a class="code" href="namespaceNLMISC.html#a211">smprintf</a> (error, 512, <font class="stringliteral">"Struct does not contain element named (%s)."</font>, token.c_str());
01119 <font class="keywordflow">goto</font> exit;
01120 }
01121 }
01122 <font class="keywordflow">else</font>
01123 {
01124 <font class="comment">// Error message</font>
01125 <a class="code" href="namespaceNLMISC.html#a211">smprintf</a> (error, 512, <font class="stringliteral">"Not a struct element. Can't open the node (%s)."</font>, token.c_str());
01126 <font class="keywordflow">goto</font> exit;
01127 }
01128 }
01129 <font class="keywordflow">break</font>;
01130 <font class="keywordflow">case</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#u4u1">TokenPoint</a>:
01131 {
01132 <font class="comment">// Need an array index array ?</font>
01133 <font class="keywordflow">if</font> (wantArrayIndex)
01134 {
01135 <font class="comment">// Error message</font>
01136 <a class="code" href="namespaceNLMISC.html#a211">smprintf</a> (error, 512, <font class="stringliteral">"Token (%s) should be an array index."</font>, token.c_str());
01137 <font class="keywordflow">goto</font> exit;
01138 }
01139
01140 <font class="comment">// Are we a struct ?</font>
01141 <font class="keywordflow">if</font> ((<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a> != UFormDfn::EntryDfn) && (<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a> != UFormDfn::EntryVirtualDfn))
01142 {
01143 <font class="comment">// Error message</font>
01144 <a class="code" href="namespaceNLMISC.html#a211">smprintf</a> (error, 512, <font class="stringliteral">"Not a struct element. Can't open the node (%s)."</font>, token.c_str());
01145 <font class="keywordflow">goto</font> exit;
01146 }
01147 }
01148 <font class="keywordflow">break</font>;
01149 <font class="keywordflow">case</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#u4u2">TokenArrayBegin</a>:
01150 {
01151 <font class="comment">// Are we an array ?</font>
01152 <font class="keywordflow">if</font> (!array)
01153 {
01154 <font class="comment">// Error message</font>
01155 <a class="code" href="namespaceNLMISC.html#a211">smprintf</a> (error, 512, <font class="stringliteral">"Not an array element. Can't open the node (%s)."</font>, token.c_str());
01156 <font class="keywordflow">goto</font> exit;
01157 }
01158 inArrayIndex = <font class="keyword">true</font>;
01159 arrayIndex = 0xffffffff;
01160 }
01161 <font class="keywordflow">break</font>;
01162 <font class="keywordflow">default</font>:
01163 {
01164 <font class="comment">// Error message</font>
01165 <a class="code" href="namespaceNLMISC.html#a211">smprintf</a> (error, 512, <font class="stringliteral">"Syntax error at keyword (%s)."</font>, token.c_str ());
01166 <font class="keywordflow">goto</font> exit;
01167 }
01168 <font class="keywordflow">break</font>;
01169 }
01170 }
01171 <font class="keywordflow">else</font>
01172 {
01173 <font class="keywordflow">switch</font> (code)
01174 {
01175 <font class="keywordflow">case</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#u4u0">TokenString</a>:
01176 {
01177 <font class="comment">// To int</font>
01178 <font class="keywordflow">if</font> (sscanf (token.c_str(), <font class="stringliteral">"%d"</font>, &arrayIndex)!=1)
01179 {
01180 <font class="comment">// Error message</font>
01181 <a class="code" href="namespaceNLMISC.html#a211">smprintf</a> (error, 512, <font class="stringliteral">"Keyword (%s) is not an array index."</font>, token.c_str());
01182 <font class="keywordflow">goto</font> exit;
01183 }
01184
01185 <font class="comment">// Is it a parent virtual DFN ?</font>
01186 <font class="keywordflow">if</font> (*node == NULL)
01187 parentVDfnArray = <font class="keyword">true</font>;
01188
01189 <font class="comment">// Should have an array defined</font>
01190 <font class="keywordflow">if</font> (*node)
01191 {
01192 <font class="comment">// Check index</font>
01193 uint arraySize;
01194 <a class="code" href="debug_8h.html#a9">nlverify</a> ((*node)->getArraySize (arraySize));
01195 <font class="keywordflow">if</font> (arrayIndex>=arraySize)
01196 {
01197 <font class="comment">// Create mode ?</font>
01198 <font class="keywordflow">if</font> (action == <a class="code" href="classNLGEORGES_1_1CFormElm.html#t3t1">Create</a>)
01199 {
01200 <font class="comment">// Must be in the same form</font>
01201 <a class="code" href="debug_8h.html#a6">nlassert</a> ((*node)->Form == form);
01202
01203 <font class="comment">// The array pointer</font>
01204 CFormElmArray *array = safe_cast<CFormElmArray*>(*node);
01205 uint oldSize = array->Elements.size ();
01206 array->Elements.resize (arrayIndex+1);
01207
01208 <font class="comment">// Insert empty element</font>
01209 uint i;
01210 <font class="keywordflow">for</font> (i=oldSize; i<array->Elements.size (); i++)
01211 {
01212 <font class="comment">// The new element</font>
01213 <a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a> *newelm = NULL;
01214 <font class="keywordflow">switch</font> (type)
01215 {
01216 <font class="keywordflow">case</font> UFormDfn::EntryType:
01217 {
01218 <font class="comment">// Create an atom</font>
01219 CFormElmAtom *atom = <font class="keyword">new</font> CFormElmAtom (form, array, *parentDfn, indexDfn);
01220 newelm = atom;
01221 }
01222 <font class="keywordflow">break</font>;
01223 <font class="keywordflow">case</font> UFormDfn::EntryDfn:
01224 {
01225 CFormElmStruct *_struct = <font class="keyword">new</font> CFormElmStruct (form, array, *parentDfn, indexDfn);
01226 _struct->build (*nodeDfn);
01227 newelm = _struct;
01228 }
01229 <font class="keywordflow">break</font>;
01230 <font class="keywordflow">case</font> UFormDfn::EntryVirtualDfn:
01231 <font class="comment">// todo array of virtual struct</font>
01232 <font class="comment">//newelm = new CFormElmVirtualStruct (form, array, *parentDfn, indexDfn);</font>
01233 <font class="keywordflow">break</font>;
01234 <font class="keywordflow">default</font>:
01235 <a class="code" href="debug_8h.html#a12">nlstop</a>
01236 }
01237
01238 <a class="code" href="debug_8h.html#a6">nlassert</a> (newelm);
01239
01240 <font class="comment">// Node created</font>
01241 created = <font class="keyword">true</font>;
01242
01243 <font class="comment">// Set the element pointer</font>
01244 array->Elements[i].Element = newelm;
01245 }
01246 }
01247 <font class="keywordflow">else</font>
01248 {
01249 <font class="comment">// Error message</font>
01250 <a class="code" href="namespaceNLMISC.html#a211">smprintf</a> (error, 512, <font class="stringliteral">"Out of array bounds (%d >= %d)."</font>, arrayIndex, arraySize);
01251 <font class="keywordflow">goto</font> exit;
01252 }
01253 }
01254 }
01255 <font class="keywordflow">else</font>
01256 {
01257 <font class="comment">// Error message</font>
01258 <a class="code" href="namespaceNLMISC.html#a211">smprintf</a> (error, 512, <font class="stringliteral">"Array is not defined."</font>);
01259 <font class="keywordflow">goto</font> exit;
01260 }
01261 }
01262 <font class="keywordflow">break</font>;
01263 <font class="keywordflow">case</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#u4u3">TokenArrayEnd</a>:
01264 {
01265 <font class="comment">// No need of an array index any more</font>
01266 wantArrayIndex = <font class="keyword">false</font>;
01267
01268 <font class="comment">// Index found ?</font>
01269 <font class="keywordflow">if</font> (arrayIndex == 0xffffffff)
01270 {
01271 <font class="comment">// Error message</font>
01272 <a class="code" href="namespaceNLMISC.html#a211">smprintf</a> (error, 512, <font class="stringliteral">"Missing array index."</font>);
01273 }
01274 <font class="keywordflow">else</font>
01275 {
01276 <font class="comment">// Let the parent DFN</font>
01277 <a class="code" href="debug_8h.html#a6">nlassert</a> (*parentDfn)
01278
01279 <font class="comment">// New current node</font>
01280 CFormElmArray *parentNode = safe_cast<CFormElmArray*> (*node);
01281
01282 <font class="comment">// Get the element</font>
01283 *node = parentNode->Elements[arrayIndex].Element;
01284
01285 <font class="comment">// Is a dfn ?</font>
01286 *nodeDfn = (*parentDfn)->getEntry (indexDfn).getDfnPtr ();
01287
01288 <font class="comment">// Is a type ?</font>
01289 *nodeType = (*parentDfn)->getEntry (indexDfn).getTypePtr ();
01290
01291 <font class="comment">// Type ?</font>
01292 <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a> = (*parentDfn)->getEntry (indexDfn).getType ();
01293
01294 <font class="comment">// Can't be an array of array</font>
01295 array = <font class="keyword">false</font>;
01296
01297 <font class="comment">// Not any more in index</font>
01298 inArrayIndex = <font class="keyword">false</font>;
01299
01300 <font class="comment">// What kind of node ?</font>
01301 <font class="keywordflow">if</font> ( (action == <a class="code" href="classNLGEORGES_1_1CFormElm.html#t3t1">Create</a>) && ( *node == NULL) )
01302 {
01303 <font class="keywordflow">switch</font> (type)
01304 {
01305 <font class="keywordflow">case</font> UFormDfn::EntryType:
01306 {
01307 <font class="comment">// Create an atom</font>
01308 CFormElmAtom *atom = <font class="keyword">new</font> CFormElmAtom (form, parentNode, *parentDfn, indexDfn);
01309 *node = atom;
01310 }
01311 <font class="keywordflow">break</font>;
01312 <font class="keywordflow">case</font> UFormDfn::EntryDfn:
01313 {
01314 CFormElmStruct *_struct = <font class="keyword">new</font> CFormElmStruct (form, parentNode, *parentDfn, indexDfn);
01315 _struct->build (*nodeDfn);
01316 *node = _struct;
01317 }
01318 <font class="keywordflow">break</font>;
01319 <font class="keywordflow">case</font> UFormDfn::EntryVirtualDfn:
01320 <font class="comment">// todo array of virtual struct</font>
01321 <font class="comment">// *node = new CFormElmVirtualStruct (form, parentNode, *parentDfn, indexDfn);</font>
01322 <font class="keywordflow">break</font>;
01323 <font class="keywordflow">default</font>:
01324 <a class="code" href="debug_8h.html#a12">nlstop</a>
01325 }
01326
01327 <a class="code" href="debug_8h.html#a6">nlassert</a> (*node);
01328
01329 <font class="comment">// Node created</font>
01330 created = <font class="keyword">true</font>;
01331
01332 <font class="comment">// Set the element pointer</font>
01333 parentNode->Elements[arrayIndex].Element = *node;
01334 }
01335
01336 <font class="comment">// Is a virtual DFN ?</font>
01337 <font class="keywordflow">if</font> ((*node) && (*node)->isVirtualStruct ())
01338 {
01339 <font class="comment">// Should be NULL</font>
01340 <a class="code" href="debug_8h.html#a6">nlassert</a> (*nodeDfn == NULL);
01341
01342 <font class="comment">// Set the current dfn</font>
01343 *nodeDfn = safe_cast<const CFormElmVirtualStruct*> (*node)->FormDfn;
01344 }
01345 }
01346 }
01347 <font class="keywordflow">break</font>;
01348 <font class="keywordflow">default</font>:
01349 {
01350 <font class="comment">// Error message</font>
01351 <a class="code" href="namespaceNLMISC.html#a211">smprintf</a> (error, 512, <font class="stringliteral">"Keyword (%s) is not an array index."</font>, token.c_str());
01352 <font class="keywordflow">goto</font> exit;
01353 }
01354 }
01355 }
01356
01357 <font class="comment">// Concat current adress</font>
01358 currentName += token;
01359 startToken = endToken;
01360 }
01361 exit:;
01362
01363 <font class="comment">// Error ?</font>
01364 <font class="keywordtype">bool</font> errorAppend = endToken != NULL;
01365
01366 <font class="comment">// Continue ?</font>
01367 <font class="keywordflow">if</font> (!errorAppend)
01368 {
01369 <font class="comment">// Delete the node ?</font>
01370 <font class="keywordflow">if</font> ( (action == <a class="code" href="classNLGEORGES_1_1CFormElm.html#t3t2">Delete</a>) && (*node) )
01371 {
01372 <font class="comment">// Get its parent</font>
01373 <a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a> *parent = safe_cast<CFormElm*> ((*node)->getParent ());
01374
01375 <font class="comment">// Don't erase the root structure</font>
01376 <font class="keywordflow">if</font> (parent && !parent->isArray ())
01377 {
01378 <font class="comment">// Unlink the primitive from its parent</font>
01379 parent->unlink (*node);
01380
01381 <font class="comment">// Erase the node</font>
01382 <font class="keyword">delete</font> (*node);
01383 *node = parent;
01384 parent = (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a>*) (parent->getParent ());
01385
01386 <font class="comment">// For each parent</font>
01387 <font class="keywordflow">while</font> (parent && !(*node)->isUsed (form) && !parent->isArray ())
01388 {
01389 <font class="comment">// Unlink the primitive from its parent</font>
01390 parent->unlink (*node);
01391
01392 <font class="comment">// Erase it and get next parent</font>
01393 <font class="keyword">delete</font> (*node);
01394 *node = parent;
01395 parent = (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a>*) (parent->getParent ());
01396 }
01397
01398 <font class="comment">// No more node</font>
01399 *node = NULL;
01400 }
01401 }
01402 }
01403
01404 <font class="comment">// Node not found in get node ? Look in parents !</font>
01405 <font class="keywordflow">if</font> ( ((*node) == NULL) && (action == <a class="code" href="classNLGEORGES_1_1CFormElm.html#t3t0">Return</a>) && backupFirstElm )
01406 {
01407 <font class="comment">// Get the path name</font>
01408 string formName;
01409 backupFirstElm->getFormName (formName);
01410 uint formNameSize = formName.size ();
01411 <font class="keywordflow">if</font> ((formNameSize > 0) && (formName[formNameSize-1] != <font class="charliteral">'.'</font>) && (formName[formNameSize-1] != <font class="charliteral">'['</font>))
01412 formName += <font class="stringliteral">"."</font>;
01413 formName += name;
01414
01415 <font class="comment">// Backup first parent default value</font>
01416 <font class="keywordtype">bool</font> defaultValue = <font class="keyword">false</font>;
01417 <font class="keyword">const</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#l2">CFormDfn</a> *defaultParentDfnParent;
01418 uint defaultIndexDfnParent;
01419 <font class="keyword">const</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#l2">CFormDfn</a> *defaultNodeDfnParent;
01420 <font class="keyword">const</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#l1">CType</a> *defaultNodeTypeParent;
01421 <a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a> *defaultNodeParent;
01422 UFormDfn::TEntryType defaultTypeParent;
01423 <font class="keywordtype">bool</font> defaultArrayParent;
01424 <font class="keywordtype">bool</font> defaultCreatedParent;
01425 <font class="keywordtype">bool</font> defaultParentVDfnArray;
01426
01427 <font class="comment">// Look in parent form</font>
01428 <font class="keywordflow">for</font> (uint parent=0; parent<form->getParentCount (); parent++)
01429 {
01430 <font class="comment">// Get the parent</font>
01431 <a class="code" href="classNLGEORGES_1_1CFormElm.html#l0">CForm</a> *parentPtr = form->getParent (parent);
01432 <a class="code" href="debug_8h.html#a6">nlassert</a> (parentPtr);
01433
01434 <font class="comment">// Get the node by name in the parent</font>
01435 <font class="keyword">const</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#l2">CFormDfn</a> *parentDfnParent = NULL;
01436 uint indexDfnParent = 0xffffffff;
01437 <font class="keyword">const</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#l2">CFormDfn</a> *nodeDfnParent = NULL;
01438 <font class="keyword">const</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#l1">CType</a> *nodeTypeParent = NULL;
01439 <a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a> *nodeParent = (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a>*)&parentPtr->getRootNode ();
01440 UFormDfn::TEntryType typeParent;
01441 <font class="keywordtype">bool</font> arrayParent;
01442 <font class="keywordtype">bool</font> createdParent;
01443 <font class="keywordtype">bool</font> parentVDfnArray;
01444 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#e0">getIternalNodeByName</a> (parentPtr, formName.c_str (), &parentDfnParent, indexDfnParent, &nodeDfnParent, &nodeTypeParent, &nodeParent, typeParent, arrayParent, action, createdParent, parentVDfnArray, <font class="keyword">false</font>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>))
01445 {
01446 <font class="comment">// Node found ?</font>
01447 <font class="keywordflow">if</font> (nodeParent)
01448 {
01449 <font class="comment">// Found copy return values</font>
01450 *parentDfn = parentDfnParent;
01451 indexDfn = indexDfnParent;
01452 *nodeDfn = nodeDfnParent;
01453 *nodeType = nodeTypeParent;
01454 *node = nodeParent;
01455 <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a> = typeParent;
01456 array = arrayParent;
01457 created = createdParent;
01458
01459 <font class="keywordflow">return</font> <font class="keyword">true</font>;
01460 }
01461 <font class="keywordflow">else</font>
01462 {
01463 <font class="comment">// Backup the first parent default value found</font>
01464 <font class="keywordflow">if</font> (!defaultValue)
01465 {
01466 defaultParentDfnParent = parentDfnParent;
01467 defaultIndexDfnParent = indexDfnParent;
01468 defaultNodeDfnParent = nodeDfnParent;
01469 defaultNodeTypeParent = nodeTypeParent;
01470 defaultNodeParent = nodeParent;
01471 defaultTypeParent = typeParent;
01472 defaultArrayParent = arrayParent;
01473 defaultCreatedParent = createdParent;
01474 defaultParentVDfnArray = parentVDfnArray;
01475 defaultValue = <font class="keyword">true</font>;
01476 }
01477 }
01478 }
01479 }
01480
01481 <font class="comment">// Default value available ?</font>
01482 <font class="keywordflow">if</font> (defaultValue)
01483 {
01484 *parentDfn = defaultParentDfnParent;
01485 indexDfn = defaultIndexDfnParent;
01486 *nodeDfn = defaultNodeDfnParent;
01487 *nodeType = defaultNodeTypeParent;
01488 *node = defaultNodeParent;
01489 <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a> = defaultTypeParent;
01490 array = defaultArrayParent;
01491 created = defaultCreatedParent;
01492 <font class="keywordflow">return</font> <font class="keyword">true</font>;
01493 }
01494 }
01495
01496 <font class="comment">// Recurce warning !</font>
01497 <font class="keywordflow">if</font> (*node)
01498 {
01499 <font class="keywordflow">if</font> ((*node)->Round == round)
01500 {
01501 <font class="comment">// Turn around..</font>
01502 string formName;
01503 (*node)->getFormName (formName);
01504 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, formName.c_str (), form->getFilename ().c_str(), <font class="stringliteral">"getIternalNodeByName"</font>, <font class="stringliteral">"Recurcive call on the same node (%s), look for loop references or inheritances."</font>, name);
01505 <font class="keywordflow">return</font> <font class="keyword">false</font>;
01506 }
01507 <font class="keywordflow">else</font>
01508 (*node)->Round = round;
01509 }
01510
01511 <font class="keywordflow">if</font> (verbose && errorAppend)
01512 {
01513 <a class="code" href="debug_8h.html#a6">nlassert</a> (*error);
01514
01515 <font class="comment">// Get the best form name</font>
01516 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, currentName.c_str (), form->getFilename ().c_str(), <font class="stringliteral">"getIternalNodeByName"</font>, <font class="stringliteral">"Getting the node (%s) : %s"</font>, name, error);
01517 }
01518
01519 <font class="keywordflow">return</font> !errorAppend;
01520 }
01521
01522 <font class="comment">// ***************************************************************************</font>
01523
<a name="l01524"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#d0">01524</a> <font class="keyword">const</font> <font class="keywordtype">char</font>* CFormElm::tokenize (<font class="keyword">const</font> <font class="keywordtype">char</font> *name, string &str, uint &errorIndex, uint &code)
01525 {
01526 <font class="keywordflow">if</font> (*name == 0)
01527 {
01528 <font class="keywordflow">return</font> NULL;
01529 }
01530
01531 <font class="keywordflow">if</font> (*name == <font class="charliteral">'['</font>)
01532 {
01533 code = <a class="code" href="classNLGEORGES_1_1CFormElm.html#u4u2">TokenArrayBegin</a>;
01534 str = <font class="stringliteral">"["</font>;
01535 <font class="keywordflow">return</font> name+1;
01536 }
01537
01538 <font class="keywordflow">if</font> (*name == <font class="charliteral">']'</font>)
01539 {
01540 code = <a class="code" href="classNLGEORGES_1_1CFormElm.html#u4u3">TokenArrayEnd</a>;
01541 str = <font class="stringliteral">"]"</font>;
01542 <font class="keywordflow">return</font> name+1;
01543 }
01544
01545 <font class="keywordflow">if</font> (*name == <font class="charliteral">'.'</font>)
01546 {
01547 code = <a class="code" href="classNLGEORGES_1_1CFormElm.html#u4u1">TokenPoint</a>;
01548 str = <font class="stringliteral">"."</font>;
01549 <font class="keywordflow">return</font> name+1;
01550 }
01551
01552 str = <font class="stringliteral">""</font>;
01553 <font class="keywordflow">while</font> ( (*name != <font class="charliteral">'.'</font>) && (*name != <font class="charliteral">'['</font>) && (*name != <font class="charliteral">']'</font>) && (*name != 0) )
01554 {
01555 <font class="comment">// Add a char</font>
01556 str += *name;
01557 name++;
01558 }
01559
01560 code = <a class="code" href="classNLGEORGES_1_1CFormElm.html#u4u0">TokenString</a>;
01561 <font class="keywordflow">return</font> name;
01562 }
01563
01564 <font class="comment">// ***************************************************************************</font>
01565
<a name="l01566"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#b0">01566</a> <font class="keywordtype">void</font> CFormElm::unlink (CFormElm *child)
01567 {
01568 <font class="comment">// No children</font>
01569 <a class="code" href="debug_8h.html#a12">nlstop</a>;
01570 }
01571
01572 <font class="comment">// ***************************************************************************</font>
01573
<a name="l01574"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a18">01574</a> <font class="keywordtype">bool</font> CFormElm::setValueByName (<font class="keyword">const</font> <font class="keywordtype">char</font> *<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keywordtype">bool</font> *created)
01575 {
01576 <font class="comment">// The parent Dfn</font>
01577 <font class="keyword">const</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#l2">CFormDfn</a> *parentDfn;
01578 <font class="keyword">const</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#l2">CFormDfn</a> *nodeDfn;
01579 <font class="keyword">const</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#l1">CType</a> *nodeType;
01580 <a class="code" href="classNLGEORGES_1_1CFormElm.html#a0">CFormElm</a> *node;
01581 uint indexDfn;
01582 <font class="keywordtype">bool</font> array;
01583 <font class="keywordtype">bool</font> _created;
01584 UFormDfn::TEntryType <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>;
01585
01586 <font class="comment">// Search for the node</font>
01587 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a75">createNodeByName</a> (name, &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>, array, _created))
01588 {
01589 <font class="comment">// Is this a type ?</font>
01590 <font class="keywordflow">if</font> (<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a> == UFormDfn::EntryType)
01591 {
01592 <font class="comment">// The atom</font>
01593 CFormElmAtom *atom = node ? safe_cast<CFormElmAtom*> (node) : NULL;
01594
01595 <font class="comment">// Evale</font>
01596 <a class="code" href="debug_8h.html#a6">nlassert</a> (nodeType);
01597 atom->setValue (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>);
01598
01599 <font class="comment">// Created flag</font>
01600 <font class="keywordflow">if</font> (created)
01601 *created = _created;
01602 <font class="keywordflow">return</font> <font class="keyword">true</font>;
01603 }
01604 <font class="keywordflow">else</font>
01605 {
01606 <font class="comment">// Error message</font>
01607 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"setValueByName"</font>, <font class="stringliteral">"The node (%s) is not an atom element. Can't set the value."</font>, name);
01608 }
01609 }
01610 <font class="keywordflow">else</font>
01611 {
01612 <font class="comment">// Error message</font>
01613 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"setValueByName"</font>, <font class="stringliteral">"Can't created / set the node (%s)."</font>, name);
01614
01615 <font class="comment">// Created flag</font>
01616 <font class="keywordflow">if</font> (created)
01617 *created = <font class="keyword">false</font>;
01618 }
01619
01620 <font class="comment">// Error</font>
01621 <font class="keywordflow">return</font> <font class="keyword">false</font>;
01622 }
01623
01624 <font class="comment">// ***************************************************************************</font>
01625
<a name="l01626"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a19">01626</a> <font class="keywordtype">bool</font> CFormElm::setValueByName (sint8 <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keywordtype">bool</font> *created)
01627 {
01628 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a18">setValueByName</a> (toString (value).c_str (), name, created);
01629 }
01630
01631 <font class="comment">// ***************************************************************************</font>
01632
<a name="l01633"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a20">01633</a> <font class="keywordtype">bool</font> CFormElm::setValueByName (uint8 <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keywordtype">bool</font> *created)
01634 {
01635 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a18">setValueByName</a> (toString (value).c_str (), name, created);
01636 }
01637
01638 <font class="comment">// ***************************************************************************</font>
01639
<a name="l01640"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a21">01640</a> <font class="keywordtype">bool</font> CFormElm::setValueByName (sint16 <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keywordtype">bool</font> *created)
01641 {
01642 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a18">setValueByName</a> (toString (value).c_str (), name, created);
01643 }
01644
01645 <font class="comment">// ***************************************************************************</font>
01646
<a name="l01647"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a22">01647</a> <font class="keywordtype">bool</font> CFormElm::setValueByName (uint16 <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keywordtype">bool</font> *created)
01648 {
01649 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a18">setValueByName</a> (toString (value).c_str (), name, created);
01650 }
01651
01652 <font class="comment">// ***************************************************************************</font>
01653
<a name="l01654"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a23">01654</a> <font class="keywordtype">bool</font> CFormElm::setValueByName (sint32 <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keywordtype">bool</font> *created)
01655 {
01656 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a18">setValueByName</a> (toString (value).c_str (), name, created);
01657 }
01658
01659 <font class="comment">// ***************************************************************************</font>
01660
<a name="l01661"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a24">01661</a> <font class="keywordtype">bool</font> CFormElm::setValueByName (uint32 <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keywordtype">bool</font> *created)
01662 {
01663 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a18">setValueByName</a> (toString (value).c_str (), name, created);
01664 }
01665
01666 <font class="comment">// ***************************************************************************</font>
01667
<a name="l01668"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a25">01668</a> <font class="keywordtype">bool</font> CFormElm::setValueByName (<font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keywordtype">bool</font> *created)
01669 {
01670 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a18">setValueByName</a> (toString (value).c_str (), name, created);
01671 }
01672
01673 <font class="comment">// ***************************************************************************</font>
01674
<a name="l01675"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a26">01675</a> <font class="keywordtype">bool</font> CFormElm::setValueByName (<font class="keywordtype">double</font> <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keywordtype">bool</font> *created)
01676 {
01677 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a18">setValueByName</a> (toString (value).c_str (), name, created);
01678 }
01679
01680 <font class="comment">// ***************************************************************************</font>
01681
<a name="l01682"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a27">01682</a> <font class="keywordtype">bool</font> CFormElm::setValueByName (<font class="keywordtype">bool</font> <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keywordtype">bool</font> *created)
01683 {
01684 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a18">setValueByName</a> (toString (value).c_str (), name, created);
01685 }
01686
01687 <font class="comment">// ***************************************************************************</font>
01688
<a name="l01689"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#a28">01689</a> <font class="keywordtype">bool</font> CFormElm::setValueByName (<a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, <font class="keyword">const</font> <font class="keywordtype">char</font> *name, <font class="keywordtype">bool</font> *created)
01690 {
01691 <font class="keywordtype">char</font> tmp[512];
01692 <a class="code" href="namespaceNLMISC.html#a211">smprintf</a> (tmp, 512, <font class="stringliteral">"%d,%d,%d"</font>, value.<a class="code" href="classNLMISC_1_1CRGBA.html#m0">R</a>, value.<a class="code" href="classNLMISC_1_1CRGBA.html#m1">G</a>, value.<a class="code" href="classNLMISC_1_1CRGBA.html#m2">B</a>);
01693 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a18">setValueByName</a> (tmp, name, created);
01694 }
01695
01696 <font class="comment">// ***************************************************************************</font>
01697
<a name="l01698"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">01698</a> <font class="keywordtype">void</font> CFormElm::warning (<font class="keywordtype">bool</font> exception, <font class="keyword">const</font> <font class="keywordtype">char</font> *formName, <font class="keyword">const</font> <font class="keywordtype">char</font> *formFileName, <font class="keyword">const</font> <font class="keywordtype">char</font> *function, <font class="keyword">const</font> <font class="keywordtype">char</font> *<a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a>, ... )
01699 {
01700 <font class="comment">// Make a buffer string</font>
01701 va_list args;
01702 va_start( args, <a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a> );
01703 <font class="keywordtype">char</font> buffer[1024];
01704 sint ret = vsnprintf( buffer, 1024, <a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a>, args );
01705 va_end( args );
01706
01707 <font class="comment">// Set the warning</font>
01708 <a class="code" href="namespaceNLGEORGES.html#a0">NLGEORGES::warning</a> (exception, <font class="stringliteral">"(CFormElm::%s) on node (%s) in form (%s) : %s"</font>, function, formName, formFileName, buffer);
01709 }
01710
01711 <font class="comment">// ***************************************************************************</font>
01712
<a name="l01713"></a><a class="code" href="classNLGEORGES_1_1CFormElm.html#b1">01713</a> <font class="keywordtype">void</font> CFormElm::warning (<font class="keywordtype">bool</font> exception, <font class="keyword">const</font> <font class="keywordtype">char</font> *function, <font class="keyword">const</font> <font class="keywordtype">char</font> *<a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a>, ... )<font class="keyword"> const</font>
01714 <font class="keyword"></font>{
01715 va_list args;
01716 va_start( args, <a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a> );
01717
01718 string formName;
01719 <a class="code" href="classNLGEORGES_1_1CFormElm.html#a4">getFormName</a> (formName);
01720 <a class="code" href="classNLGEORGES_1_1CFormElm.html#e1">warning</a> (exception, formName.c_str (), <a class="code" href="classNLGEORGES_1_1CFormElm.html#a2">getForm</a> ()->getFilename ().c_str (), function, <a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a>, args);
01721
01722 va_end( args );
01723 }
01724
01725 <font class="comment">// ***************************************************************************</font>
01726 <font class="comment">// class CFormElmStruct</font>
01727 <font class="comment">// ***************************************************************************</font>
01728
<a name="l01729"></a><a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a0">01729</a> CFormElmStruct::CFormElmStruct (CForm *form, CFormElm *parentNode, <font class="keyword">const</font> CFormDfn *parentDfn, uint parentIndex) : CFormElm (form, parentNode, parentDfn, parentIndex)
01730 {
01731 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m0">FormDfn</a> = NULL;
01732 }
01733
01734 <font class="comment">// ***************************************************************************</font>
01735
<a name="l01736"></a><a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a1">01736</a> CFormElmStruct::~CFormElmStruct ()
01737 {
01738 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a2">clean</a> ();
01739 }
01740
01741 <font class="comment">// ***************************************************************************</font>
01742
<a name="l01743"></a><a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a2">01743</a> <font class="keywordtype">void</font> CFormElmStruct::clean ()
01744 {
01745 <font class="comment">// For each element of the array</font>
01746 uint elm;
01747 <font class="keywordflow">for</font> (elm =0; elm<<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>.size(); elm++)
01748 {
01749 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[elm].Element)
01750 <font class="keyword">delete</font> <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[elm].Element;
01751 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[elm].Element = NULL;
01752 }
01753 }
01754
01755 <font class="comment">// ***************************************************************************</font>
01756
<a name="l01757"></a><a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a4">01757</a> <font class="keywordtype">bool</font> CFormElmStruct::isStruct ()<font class="keyword"> const</font>
01758 <font class="keyword"></font>{
01759 <font class="keywordflow">return</font> <font class="keyword">true</font>;
01760 };
01761
01762 <font class="comment">// ***************************************************************************</font>
01763
<a name="l01764"></a><a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a5">01764</a> <font class="keywordtype">bool</font> CFormElmStruct::getStructSize (uint &size)<font class="keyword"> const </font>
01765 <font class="keyword"></font>{
01766 size = <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>.size();
01767 <font class="keywordflow">return</font> <font class="keyword">true</font>;
01768 };
01769
01770 <font class="comment">// ***************************************************************************</font>
01771
<a name="l01772"></a><a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a6">01772</a> <font class="keywordtype">bool</font> CFormElmStruct::getStructNodeName (uint element, string &result)<font class="keyword"> const </font>
01773 <font class="keyword"></font>{
01774 <font class="keywordflow">if</font> (element<<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>.size())
01775 {
01776 result = <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[element].Name;
01777 <font class="keywordflow">return</font> <font class="keyword">true</font>;
01778 }
01779 <font class="keywordflow">else</font>
01780 {
01781 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a14">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getStructNodeName"</font>, <font class="stringliteral">"Index (%d) out of bound (%d)."</font>, element, <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>.size() );
01782 <font class="keywordflow">return</font> <font class="keyword">false</font>;
01783 }
01784 };
01785
01786 <font class="comment">// ***************************************************************************</font>
01787
<a name="l01788"></a><a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a7">01788</a> <font class="keywordtype">bool</font> CFormElmStruct::getStructNode (uint element, <font class="keyword">const</font> UFormElm **result)<font class="keyword"> const </font>
01789 <font class="keyword"></font>{
01790 <font class="keywordflow">if</font> (element<<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>.size())
01791 {
01792 *result = <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[element].Element;
01793 <font class="keywordflow">return</font> <font class="keyword">true</font>;
01794 }
01795 <font class="keywordflow">else</font>
01796 {
01797 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a14">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getStructNode"</font>, <font class="stringliteral">"Index (%d) out of bound (%d)."</font>, element, <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>.size() );
01798 <font class="keywordflow">return</font> <font class="keyword">false</font>;
01799 }
01800 };
01801
01802 <font class="comment">// ***************************************************************************</font>
01803
<a name="l01804"></a><a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a8">01804</a> <font class="keywordtype">bool</font> CFormElmStruct::getStructNode (uint element, UFormElm **result)
01805 {
01806 <font class="keywordflow">if</font> (element<<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>.size())
01807 {
01808 *result = <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[element].Element;
01809 <font class="keywordflow">return</font> <font class="keyword">true</font>;
01810 }
01811 <font class="keywordflow">else</font>
01812 {
01813 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a14">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getStructNode"</font>, <font class="stringliteral">"Index (%d) out of bound (%d)."</font>, element, <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>.size() );
01814 <font class="keywordflow">return</font> <font class="keyword">false</font>;
01815 }
01816 };
01817
01818 <font class="comment">// ***************************************************************************</font>
01819
<a name="l01820"></a><a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a10">01820</a> xmlNodePtr CFormElmStruct::write (xmlNodePtr root, <font class="keyword">const</font> CForm *form, <font class="keyword">const</font> <font class="keywordtype">char</font> *structName, <font class="keywordtype">bool</font> forceWrite)<font class="keyword"> const</font>
01821 <font class="keyword"></font>{
01822 <font class="comment">// Is used ?</font>
01823 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a9">isUsed</a> (form) || forceWrite)
01824 {
01825 <font class="comment">// *** Header</font>
01826 xmlNodePtr node = xmlNewChild ( root, NULL, (<font class="keyword">const</font> xmlChar*)<font class="stringliteral">"STRUCT"</font>, NULL);
01827
01828 <font class="comment">// Element name</font>
01829 <font class="keywordflow">if</font> (structName != NULL)
01830 {
01831 <font class="comment">// Struct name</font>
01832 xmlSetProp (node, (<font class="keyword">const</font> xmlChar*)<font class="stringliteral">"Name"</font>, (<font class="keyword">const</font> xmlChar*)structName);
01833 }
01834
01835 <font class="comment">// For each elements of the structure</font>
01836 uint elm;
01837 <font class="keywordflow">for</font> (elm=0; elm<<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>.size(); elm++)
01838 {
01839 <font class="comment">// Create a node if it exist</font>
01840 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[elm].Element)
01841 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[elm].Element->write (node, form, <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[elm].Name.c_str());
01842 }
01843
01844 <font class="comment">// Return the new node</font>
01845 <font class="keywordflow">return</font> node;
01846 }
01847 <font class="keywordflow">return</font> NULL;
01848 }
01849
01850 <font class="comment">// ***************************************************************************</font>
01851
<a name="l01852"></a><a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a13">01852</a> <font class="keywordtype">void</font> CFormElmStruct::read (xmlNodePtr node, CFormLoader &loader, <font class="keyword">const</font> CFormDfn *dfn, CForm *form)
01853 {
01854 <font class="comment">// Get the smart pointer on the dfn</font>
01855 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m0">FormDfn</a> = (CFormDfn*)dfn;
01856
01857 <font class="comment">// Build the Form</font>
01858 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a3">build</a> (dfn);
01859
01860 <font class="comment">// Count parent</font>
01861 uint dfnCount = dfn->countParentDfn ();
01862
01863 <font class="comment">// Array of Dfn</font>
01864 std::vector<const CFormDfn*> dfnArray;
01865 dfnArray.reserve (dfnCount);
01866 dfn->getParentDfn (dfnArray);
01867
01868 <font class="comment">// For each Dfn</font>
01869 uint dfnId;
01870 uint elmIndex=0;
01871 <font class="keywordflow">for</font> (dfnId=0; dfnId<dfnCount; dfnId++)
01872 {
01873 <font class="comment">// Lookup for the name in the DFN</font>
01874 uint elm;
01875 <font class="keywordflow">for</font> (elm=0; elm<dfnArray[dfnId]->Entries.size(); elm++)
01876 {
01877 <font class="comment">// Found ?</font>
01878 <font class="keywordtype">bool</font> found = <font class="keyword">false</font>;
01879
01880 <font class="comment">// Read the struct</font>
01881 xmlNodePtr child = NULL;
01882
01883 <font class="comment">// Node can be NULL</font>
01884 <font class="keywordflow">if</font> (node)
01885 child = node->children;
01886
01887 <font class="keywordflow">while</font> (child)
01888 {
01889 <font class="comment">// Good node ?</font>
01890 <font class="keyword">const</font> <font class="keywordtype">char</font> *name = (<font class="keyword">const</font> <font class="keywordtype">char</font>*)xmlGetProp (child, (xmlChar*)<font class="stringliteral">"Name"</font>);
01891 <font class="keywordflow">if</font> (name && (dfnArray[dfnId]->Entries[elm].getName () == name) )
01892 {
01893 <font class="comment">// Type</font>
01894 <font class="keywordtype">bool</font> atom=<font class="keyword">false</font>;
01895 <font class="keywordtype">bool</font> array=<font class="keyword">false</font>;
01896 <font class="keywordtype">bool</font> _struct=<font class="keyword">false</font>;
01897 <font class="keywordtype">bool</font> vStruct=<font class="keyword">false</font>;
01898
01899 <font class="comment">// Is an atom ?</font>
01900 <font class="keywordflow">if</font> (strcmp ((<font class="keyword">const</font> <font class="keywordtype">char</font>*)child->name, <font class="stringliteral">"ATOM"</font>) == 0)
01901 {
01902 atom = <font class="keyword">true</font>;
01903 }
01904 <font class="comment">// Is a struct ?</font>
01905 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (strcmp ((<font class="keyword">const</font> <font class="keywordtype">char</font>*)child->name, <font class="stringliteral">"STRUCT"</font>) == 0)
01906 {
01907 _struct = <font class="keyword">true</font>;
01908 }
01909 <font class="comment">// Is a struct ?</font>
01910 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (strcmp ((<font class="keyword">const</font> <font class="keywordtype">char</font>*)child->name, <font class="stringliteral">"VSTRUCT"</font>) == 0)
01911 {
01912 vStruct = <font class="keyword">true</font>;
01913 }
01914 <font class="comment">// Is an array ?</font>
01915 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (strcmp ((<font class="keyword">const</font> <font class="keywordtype">char</font>*)child->name, <font class="stringliteral">"ARRAY"</font>) == 0)
01916 {
01917 array = <font class="keyword">true</font>;
01918 }
01919
01920 <font class="comment">// Continue ?</font>
01921 <font class="keywordflow">if</font> (atom || _struct || vStruct || array)
01922 {
01923 <font class="comment">// Same type ?</font>
01924 <font class="keywordflow">if</font> (
01925 (atom && (dfnArray[dfnId]->Entries[elm].getType ()==UFormDfn::EntryType) && (!dfnArray[dfnId]->Entries[elm].getArrayFlag ()) ) ||
01926 (array && dfnArray[dfnId]->Entries[elm].getArrayFlag () && ( (dfnArray[dfnId]->Entries[elm].getType () == UFormDfn::EntryType) || (dfnArray[dfnId]->Entries[elm].getType () == UFormDfn::EntryDfn) ) ) ||
01927 (_struct && (dfnArray[dfnId]->Entries[elm].getType () == UFormDfn::EntryDfn) && (!dfnArray[dfnId]->Entries[elm].getArrayFlag ()) ) ||
01928 (vStruct && (dfnArray[dfnId]->Entries[elm].getType () == UFormDfn::EntryVirtualDfn) && (!dfnArray[dfnId]->Entries[elm].getArrayFlag ()) )
01929 )
01930 {
01931 <font class="comment">// Ok keep it</font>
01932 <font class="keywordflow">break</font>;
01933 }
01934 <font class="keywordflow">else</font>
01935 {
01936 <font class="comment">// Make a warning message</font>
01937 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a14">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"read"</font>, <font class="stringliteral">"In block line %d, node (%s) type in DFN have changed."</font>,
01938 (<font class="keywordtype">int</font>)child->content, child->name);
01939 }
01940 }
01941 <font class="keywordflow">else</font>
01942 {
01943 <font class="keywordflow">if</font> (name)
01944 {
01945 <font class="comment">// Delete the value</font>
01946 xmlFree ((<font class="keywordtype">void</font>*)name);
01947 }
01948
01949 <font class="comment">// Throw exception</font>
01950 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a14">warning</a> (<font class="keyword">true</font>, <font class="stringliteral">"read"</font>, <font class="stringliteral">"XML Syntax error in block line %d, node (%s) name should be STRUCT, ATOM or ARRAY."</font>,
01951 (<font class="keywordtype">int</font>)child->content, child->name);
01952 }
01953 }
01954
01955 <font class="keywordflow">if</font> (name)
01956 {
01957 <font class="comment">// Delete the value</font>
01958 xmlFree ((<font class="keywordtype">void</font>*)name);
01959 }
01960
01961 <font class="comment">// Next child</font>
01962 child = child->next;
01963 }
01964
01965 <font class="comment">// Found ?</font>
01966 <font class="keywordflow">if</font> (child)
01967 {
01968 <font class="comment">// Create a new element</font>
01969 <font class="keywordflow">if</font> (dfnArray[dfnId]->Entries[elm].getArrayFlag ())
01970 {
01971 <font class="comment">// Array of type</font>
01972 CFormElmArray *newElm = NULL;
01973 <font class="keywordflow">if</font> (dfnArray[dfnId]->Entries[elm].getType () == UFormDfn::EntryType)
01974 {
01975 <font class="comment">// Load the new element</font>
01976 newElm = <font class="keyword">new</font> CFormElmArray (form, NULL, dfnArray[dfnId]->Entries[elm].getTypePtr (), <font class="keyword">this</font>, dfnArray[dfnId], elm);
01977 }
01978 <font class="comment">// Array of struct</font>
01979 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (dfnArray[dfnId]->Entries[elm].getType () == UFormDfn::EntryDfn)
01980 {
01981 newElm = <font class="keyword">new</font> CFormElmArray (form, dfnArray[dfnId]->Entries[elm].getDfnPtr (), NULL, <font class="keyword">this</font>, dfnArray[dfnId], elm);
01982 }
01983
01984 <font class="comment">// Should be created</font>
01985 <a class="code" href="debug_8h.html#a6">nlassert</a> (newElm);
01986 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[elmIndex].Element = newElm;
01987 newElm->read (child, loader, form);
01988 }
01989 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (dfnArray[dfnId]->Entries[elm].getType () == UFormDfn::EntryType)
01990 {
01991 <font class="comment">// Load the new element</font>
01992 CFormElmAtom *newElm = <font class="keyword">new</font> CFormElmAtom (form, <font class="keyword">this</font>, dfnArray[dfnId], elm);
01993 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[elmIndex].Element = newElm;
01994 newElm->read (child, loader, dfnArray[dfnId]->Entries[elm].getTypePtr (), form);
01995 }
01996 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (dfnArray[dfnId]->Entries[elm].getType () == UFormDfn::EntryDfn)
01997 {
01998 <font class="comment">// Load the new element</font>
01999 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a0">CFormElmStruct</a> *newElm = <font class="keyword">new</font> <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a0">CFormElmStruct</a> (form, <font class="keyword">this</font>, dfnArray[dfnId], elm);
02000 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[elmIndex].Element = newElm;
02001 newElm->read (child, loader, dfnArray[dfnId]->Entries[elm].getDfnPtr (), form);
02002 }
02003 <font class="keywordflow">else</font> <font class="comment">// if dfnArray[dfnId]->Entries[elm].getType () == CFormDfn::CEntry::EntryVirtualDfn)</font>
02004 {
02005 <font class="comment">// Should be a struct</font>
02006 <a class="code" href="debug_8h.html#a6">nlassert</a> (dfnArray[dfnId]->Entries[elm].getType () == UFormDfn::EntryVirtualDfn);
02007
02008 <font class="comment">// Load the new element</font>
02009 CFormElmVirtualStruct *newElm = <font class="keyword">new</font> CFormElmVirtualStruct (form, <font class="keyword">this</font>, dfnArray[dfnId], elm);
02010 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[elmIndex].Element = newElm;
02011 newElm->read (child, loader, form);
02012 }
02013 }
02014 <font class="keywordflow">else</font>
02015 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[elmIndex].Element = NULL;
02016
02017 elmIndex++;
02018 }
02019 }
02020 }
02021
02022 <font class="comment">// ***************************************************************************</font>
02023
<a name="l02024"></a><a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a9">02024</a> <font class="keywordtype">bool</font> CFormElmStruct::isUsed (<font class="keyword">const</font> CForm *form)<font class="keyword"> const</font>
02025 <font class="keyword"></font>{
02026 <font class="keywordflow">for</font> (uint i=0; i<<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>.size(); i++)
02027 {
02028 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[i].Element && <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[i].Element->isUsed (form))
02029 <font class="keywordflow">return</font> <font class="keyword">true</font>;
02030 }
02031 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02032 }
02033
02034 <font class="comment">// ***************************************************************************</font>
02035
<a name="l02036"></a><a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a3">02036</a> <font class="keywordtype">void</font> CFormElmStruct::build (<font class="keyword">const</font> CFormDfn *dfn)
02037 {
02038 <font class="comment">// Clean the form</font>
02039 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a2">clean</a> ();
02040
02041 <font class="comment">// Set the DFN</font>
02042 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m0">FormDfn</a> = (CFormDfn*)dfn;
02043
02044 <font class="comment">// Get the parents</font>
02045 vector<const CFormDfn*> arrayDfn;
02046 arrayDfn.reserve (dfn->countParentDfn ());
02047 dfn->getParentDfn (arrayDfn);
02048
02049 <font class="comment">// Count element</font>
02050 uint elementCount = 0;
02051 uint dfnIndex;
02052 <font class="keywordflow">for</font> (dfnIndex=0; dfnIndex<arrayDfn.size(); dfnIndex++)
02053 {
02054 elementCount += arrayDfn[dfnIndex]->getNumEntry();
02055 }
02056
02057 <font class="comment">// Resize the element array</font>
02058 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>.resize (elementCount);
02059
02060 elementCount = 0;
02061 <font class="keywordflow">for</font> (dfnIndex=0; dfnIndex<arrayDfn.size(); dfnIndex++)
02062 {
02063 <font class="comment">// For each element</font>
02064 <font class="keywordflow">for</font> (uint elm=0; elm<arrayDfn[dfnIndex]->Entries.size(); elm++)
02065 {
02066 <font class="comment">// Copy the name</font>
02067 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[elementCount].Name = arrayDfn[dfnIndex]->Entries[elm].Name;
02068 elementCount++;
02069 }
02070 }
02071 }
02072
02073 <font class="comment">// ***************************************************************************</font>
02074
<a name="l02075"></a><a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a11">02075</a> <font class="keywordtype">void</font> CFormElmStruct::unlink (CFormElm *child)
02076 {
02077 uint i;
02078 <font class="keywordflow">for</font> (i=0; i<<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>.size (); i++)
02079 {
02080 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[i].Element == child)
02081 {
02082 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[i].Element = NULL;
02083 <font class="keywordflow">break</font>;
02084 }
02085 }
02086
02087 <font class="comment">// Element not found!</font>
02088 <a class="code" href="debug_8h.html#a6">nlassert</a> (i != <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>.size ());
02089 }
02090
02091 <font class="comment">// ***************************************************************************</font>
02092
<a name="l02093"></a><a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a12">02093</a> <font class="keywordtype">void</font> CFormElmStruct::getFormName (std::string &result, <font class="keyword">const</font> CFormElm *child)<font class="keyword"> const</font>
02094 <font class="keyword"></font>{
02095 <font class="comment">// Reset the result</font>
02096 <font class="keywordflow">if</font> (child == NULL)
02097 {
02098 result = <font class="stringliteral">""</font>;
02099 result.reserve (50);
02100 }
02101
02102 <font class="comment">// Get parent form name</font>
02103 <font class="keywordflow">if</font> (ParentNode)
02104 <a class="code" href="classNLGEORGES_1_1CFormElm.html#n1">ParentNode</a>->getFormName (result, <font class="keyword">this</font>);
02105
02106 <font class="comment">// Get node name</font>
02107 <font class="keywordflow">if</font> (child)
02108 {
02109 <font class="comment">// Look for the child</font>
02110 uint i;
02111 <font class="keywordflow">for</font> (i=0; i<<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>.size (); i++)
02112 {
02113 <font class="comment">// This one ?</font>
02114 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[i].Element == child)
02115 {
02116 <font class="comment">// Add the field name</font>
02117 result += <font class="stringliteral">"."</font>;
02118 result += <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[i].Name;
02119 <font class="keywordflow">break</font>;
02120 }
02121 }
02122
02123 <font class="comment">// Draw some warning</font>
02124 <font class="keywordflow">if</font> (i==<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>.size ())
02125 {
02126 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a14">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getFormName"</font>, <font class="stringliteral">"Child node not found."</font>);
02127 }
02128 }
02129 }
02130
02131 <font class="comment">// ***************************************************************************</font>
02132
<a name="l02133"></a><a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a14">02133</a> <font class="keywordtype">void</font> CFormElmStruct::warning (<font class="keywordtype">bool</font> exception, <font class="keyword">const</font> <font class="keywordtype">char</font> *function, <font class="keyword">const</font> <font class="keywordtype">char</font> *<a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a>, ... )<font class="keyword"> const</font>
02134 <font class="keyword"></font>{
02135 <font class="comment">// Make a buffer string</font>
02136 va_list args;
02137 va_start( args, <a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a> );
02138 <font class="keywordtype">char</font> buffer[1024];
02139 sint ret = vsnprintf( buffer, 1024, <a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a>, args );
02140 va_end( args );
02141
02142 <font class="comment">// Set the warning</font>
02143 string formName;
02144 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a12">getFormName</a> (formName, NULL);
02145 <a class="code" href="namespaceNLGEORGES.html#a0">NLGEORGES::warning</a> (exception, <font class="stringliteral">"(CFormElmStruct::%s) on node (%s) in form (%s) : %s"</font>, function, formName.c_str (), <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>->getFilename ().c_str (), buffer);
02146 }
02147
02148 <font class="comment">// ***************************************************************************</font>
02149 <font class="comment">// class CFormElmVirtualStruct</font>
02150 <font class="comment">// ***************************************************************************</font>
02151
<a name="l02152"></a><a class="code" href="classNLGEORGES_1_1CFormElmVirtualStruct.html#a0">02152</a> CFormElmVirtualStruct::CFormElmVirtualStruct (CForm *form, CFormElm *parentNode, <font class="keyword">const</font> CFormDfn *parentDfn, uint parentIndex) : CFormElmStruct (form, parentNode, parentDfn, parentIndex)
02153 {
02154 }
02155
02156 <font class="comment">// ***************************************************************************</font>
02157
<a name="l02158"></a><a class="code" href="classNLGEORGES_1_1CFormElmVirtualStruct.html#a4">02158</a> xmlNodePtr CFormElmVirtualStruct::write (xmlNodePtr root, <font class="keyword">const</font> CForm *form, <font class="keyword">const</font> <font class="keywordtype">char</font> *structName, <font class="keywordtype">bool</font> forceWrite)<font class="keyword"> const</font>
02159 <font class="keyword"></font>{
02160 <font class="comment">// Is used ?</font>
02161 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmVirtualStruct.html#a3">isUsed</a> (form) || forceWrite)
02162 {
02163 <font class="comment">// *** Header</font>
02164 xmlNodePtr node = xmlNewChild ( root, NULL, (<font class="keyword">const</font> xmlChar*)<font class="stringliteral">"VSTRUCT"</font>, NULL);
02165
02166 <font class="comment">// Write the DFN filename in the node</font>
02167 xmlSetProp (node, (<font class="keyword">const</font> xmlChar*)<font class="stringliteral">"DfnName"</font>, (<font class="keyword">const</font> xmlChar*)<a class="code" href="classNLGEORGES_1_1CFormElmVirtualStruct.html#m0">DfnFilename</a>.c_str());
02168
02169 <font class="comment">// Element name</font>
02170 <font class="keywordflow">if</font> (structName != NULL)
02171 {
02172 <font class="comment">// Struct name</font>
02173 xmlSetProp (node, (<font class="keyword">const</font> xmlChar*)<font class="stringliteral">"Name"</font>, (<font class="keyword">const</font> xmlChar*)structName);
02174 }
02175
02176 <font class="comment">// For each elements of the structure</font>
02177 uint elm;
02178 <font class="keywordflow">for</font> (elm=0; elm<<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>.size(); elm++)
02179 {
02180 <font class="comment">// Create a node if it exist</font>
02181 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[elm].Element)
02182 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[elm].Element->write (node, form, <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m1">Elements</a>[elm].Name.c_str());
02183 }
02184
02185 <font class="comment">// Return the new node</font>
02186 <font class="keywordflow">return</font> node;
02187 }
02188 <font class="keywordflow">return</font> NULL;
02189 }
02190
02191 <font class="comment">// ***************************************************************************</font>
02192
<a name="l02193"></a><a class="code" href="classNLGEORGES_1_1CFormElmVirtualStruct.html#a5">02193</a> <font class="keywordtype">void</font> CFormElmVirtualStruct::read (xmlNodePtr node, CFormLoader &loader, CForm *form)
02194 {
02195 <font class="comment">// Get the DFN filename</font>
02196 <font class="keyword">const</font> <font class="keywordtype">char</font> *filename = (<font class="keyword">const</font> <font class="keywordtype">char</font>*)xmlGetProp (node, (xmlChar*)<font class="stringliteral">"DfnName"</font>);
02197 <font class="keywordflow">if</font> (filename)
02198 {
02199 <font class="comment">// Set the name</font>
02200 <a class="code" href="classNLGEORGES_1_1CFormElmVirtualStruct.html#m0">DfnFilename</a> = filename;
02201
02202 <font class="comment">// Delete the value</font>
02203 xmlFree ((<font class="keywordtype">void</font>*)filename);
02204
02205 <font class="comment">// Load the dfn</font>
02206 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m0">FormDfn</a> = loader.loadFormDfn (<a class="code" href="classNLGEORGES_1_1CFormElmVirtualStruct.html#m0">DfnFilename</a>.c_str (), <font class="keyword">false</font>);
02207 <font class="keywordflow">if</font> (!<a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m0">FormDfn</a>)
02208 {
02209 <font class="comment">// Throw exception</font>
02210 <a class="code" href="classNLGEORGES_1_1CFormElmVirtualStruct.html#a6">warning</a> (<font class="keyword">true</font>, <font class="stringliteral">"read"</font>, <font class="stringliteral">"Can't find DFN filename (%s)."</font>, <a class="code" href="classNLGEORGES_1_1CFormElmVirtualStruct.html#m0">DfnFilename</a>.c_str ());
02211 }
02212 }
02213 <font class="keywordflow">else</font>
02214 {
02215 <font class="comment">// Throw exception</font>
02216 <a class="code" href="classNLGEORGES_1_1CFormElmVirtualStruct.html#a6">warning</a> (<font class="keyword">true</font>, <font class="stringliteral">"read"</font>, <font class="stringliteral">"XML Syntax error in virtual struct in block line %d, should have a DfnName property."</font>,
02217 (<font class="keywordtype">int</font>)node->content, node->name);
02218 }
02219
02220 <font class="comment">// Read the parent</font>
02221 CFormElmStruct::read (node, loader, <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#m0">FormDfn</a>, form);
02222 }
02223
02224 <font class="comment">// ***************************************************************************</font>
02225
<a name="l02226"></a><a class="code" href="classNLGEORGES_1_1CFormElmVirtualStruct.html#a1">02226</a> <font class="keywordtype">bool</font> CFormElmVirtualStruct::isVirtualStruct ()<font class="keyword"> const</font>
02227 <font class="keyword"></font>{
02228 <font class="keywordflow">return</font> <font class="keyword">true</font>;
02229 }
02230
02231 <font class="comment">// ***************************************************************************</font>
02232
<a name="l02233"></a><a class="code" href="classNLGEORGES_1_1CFormElmVirtualStruct.html#a2">02233</a> <font class="keywordtype">bool</font> CFormElmVirtualStruct::getDfnName (std::string &dfnName )<font class="keyword"> const</font>
02234 <font class="keyword"></font>{
02235 dfnName = <a class="code" href="classNLGEORGES_1_1CFormElmVirtualStruct.html#m0">DfnFilename</a>;
02236 <font class="keywordflow">return</font> <font class="keyword">true</font>;
02237 }
02238
02239 <font class="comment">// ***************************************************************************</font>
02240
<a name="l02241"></a><a class="code" href="classNLGEORGES_1_1CFormElmVirtualStruct.html#a3">02241</a> <font class="keywordtype">bool</font> CFormElmVirtualStruct::isUsed (<font class="keyword">const</font> CForm *form)<font class="keyword"> const</font>
02242 <font class="keyword"></font>{
02243 <font class="keywordflow">return</font> <font class="keyword">true</font>;
02244 }
02245
02246 <font class="comment">// ***************************************************************************</font>
02247
<a name="l02248"></a><a class="code" href="classNLGEORGES_1_1CFormElmVirtualStruct.html#a6">02248</a> <font class="keywordtype">void</font> CFormElmVirtualStruct::warning (<font class="keywordtype">bool</font> exception, <font class="keyword">const</font> <font class="keywordtype">char</font> *function, <font class="keyword">const</font> <font class="keywordtype">char</font> *<a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a>, ... )<font class="keyword"> const</font>
02249 <font class="keyword"></font>{
02250 <font class="comment">// Make a buffer string</font>
02251 va_list args;
02252 va_start( args, <a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a> );
02253 <font class="keywordtype">char</font> buffer[1024];
02254 sint ret = vsnprintf( buffer, 1024, <a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a>, args );
02255 va_end( args );
02256
02257 <font class="comment">// Set the warning</font>
02258 string formName;
02259 <a class="code" href="classNLGEORGES_1_1CFormElmStruct.html#a12">getFormName</a> (formName, NULL);
02260 <a class="code" href="namespaceNLGEORGES.html#a0">NLGEORGES::warning</a> (exception, <font class="stringliteral">"(CFormElmVirtualStruct::%s) on node (%s) in form (%s) : %s"</font>, function, formName.c_str (), <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>->getFilename ().c_str (), buffer);
02261 }
02262
02263 <font class="comment">// ***************************************************************************</font>
02264 <font class="comment">// class CFormElmArray</font>
02265 <font class="comment">// ***************************************************************************</font>
02266
<a name="l02267"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a0">02267</a> CFormElmArray::CFormElmArray (CForm *form, <font class="keyword">const</font> CFormDfn *formDfn, <font class="keyword">const</font> CType *<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>, CFormElm *parentNode, <font class="keyword">const</font> CFormDfn *parentDfn, uint parentIndex) : CFormElm (form, parentNode, parentDfn, parentIndex)
02268 {
02269 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m0">FormDfn</a> = (CFormDfn*)formDfn;
02270 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m1">Type</a> = <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>;
02271 }
02272
02273 <font class="comment">// ***************************************************************************</font>
02274
<a name="l02275"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a1">02275</a> CFormElmArray::~CFormElmArray ()
02276 {
02277 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a2">clean</a> ();
02278 }
02279
02280 <font class="comment">// ***************************************************************************</font>
02281
<a name="l02282"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a2">02282</a> <font class="keywordtype">void</font> CFormElmArray::clean ()
02283 {
02284 <font class="comment">// For each element of the array</font>
02285 uint elm;
02286 <font class="keywordflow">for</font> (elm =0; elm<<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>.size(); elm++)
02287 {
02288 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[elm].Element)
02289 <font class="keyword">delete</font> <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[elm].Element;
02290 }
02291 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>.clear ();
02292 }
02293
02294 <font class="comment">// ***************************************************************************</font>
02295
<a name="l02296"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a3">02296</a> <font class="keywordtype">bool</font> CFormElmArray::isArray ()<font class="keyword"> const </font>
02297 <font class="keyword"></font>{
02298 <font class="keywordflow">return</font> <font class="keyword">true</font>;
02299 };
02300
02301 <font class="comment">// ***************************************************************************</font>
02302
<a name="l02303"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a4">02303</a> <font class="keywordtype">bool</font> CFormElmArray::getArraySize (uint &size)<font class="keyword"> const </font>
02304 <font class="keyword"></font>{
02305 size = <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>.size ();
02306 <font class="keywordflow">return</font> <font class="keyword">true</font>;
02307 };
02308
02309 <font class="comment">// ***************************************************************************</font>
02310
<a name="l02311"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a5">02311</a> <font class="keywordtype">bool</font> CFormElmArray::getArrayNode (<font class="keyword">const</font> UFormElm **result, uint arrayIndex)<font class="keyword"> const </font>
02312 <font class="keyword"></font>{
02313 <font class="keywordflow">if</font> (arrayIndex<<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>.size())
02314 {
02315 *result = <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[arrayIndex].Element;
02316 <font class="keywordflow">return</font> <font class="keyword">true</font>;
02317 }
02318 <font class="keywordflow">else</font>
02319 {
02320 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a25">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayNode"</font>, <font class="stringliteral">"Index (%d) out of bound (%d)."</font>, arrayIndex, <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>.size() );
02321 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02322 }
02323 };
02324
02325 <font class="comment">// ***************************************************************************</font>
02326
<a name="l02327"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a7">02327</a> <font class="keywordtype">bool</font> CFormElmArray::getArrayNodeName (std::string &result, uint arrayIndex)<font class="keyword"> const</font>
02328 <font class="keyword"></font>{
02329 <font class="keywordflow">if</font> (arrayIndex<<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>.size())
02330 {
02331 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[arrayIndex].Name.empty ())
02332 result = <font class="stringliteral">"#"</font> + toString (arrayIndex);
02333 <font class="keywordflow">else</font>
02334 result = <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[arrayIndex].Name;
02335 <font class="keywordflow">return</font> <font class="keyword">true</font>;
02336 }
02337 <font class="keywordflow">else</font>
02338 {
02339 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a25">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayNodeName"</font>, <font class="stringliteral">"Index (%d) out of bound (%d)."</font>, arrayIndex, <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>.size() );
02340 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02341 }
02342 }
02343
02344 <font class="comment">// ***************************************************************************</font>
02345
<a name="l02346"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a6">02346</a> <font class="keywordtype">bool</font> CFormElmArray::getArrayNode (UFormElm **result, uint arrayIndex)
02347 {
02348 <font class="keywordflow">if</font> (arrayIndex<<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>.size())
02349 {
02350 *result = <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[arrayIndex].Element;
02351 <font class="keywordflow">return</font> <font class="keyword">true</font>;
02352 }
02353 <font class="keywordflow">else</font>
02354 {
02355 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a25">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayNode"</font>, <font class="stringliteral">"Index (%d) out of bound (%d)."</font>, arrayIndex, <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>.size() );
02356 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02357 }
02358 };
02359
02360
02361 <font class="comment">// ***************************************************************************</font>
02362
<a name="l02363"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a8">02363</a> <font class="keywordtype">bool</font> CFormElmArray::getArrayValue (std::string &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
02364 <font class="keyword"></font>{
02365 <font class="keywordflow">if</font> (Type)
02366 {
02367 <font class="keywordflow">return</font> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m1">Type</a>->getValue (result, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, safe_cast<const CFormElmAtom*> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[arrayIndex].Element), *<a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>, evaluate, (uint32*)where, <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++, NULL));
02368 }
02369 <font class="keywordflow">else</font>
02370 {
02371 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a25">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This array is not an array of atom. This is an array of structure."</font>);
02372 }
02373
02374 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02375 }
02376
02377 <font class="comment">// ***************************************************************************</font>
02378
<a name="l02379"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a9">02379</a> <font class="keywordtype">bool</font> CFormElmArray::getArrayValue (sint8 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
02380 <font class="keyword"></font>{
02381 <font class="keywordflow">if</font> (Type)
02382 {
02383 string str;
02384 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m1">Type</a>->getValue (str, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, safe_cast<const CFormElmAtom*> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[arrayIndex].Element), *<a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>, evaluate, (uint32*)where, <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++, NULL))
02385 {
02386 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, str.c_str ());
02387 }
02388 }
02389 <font class="keywordflow">else</font>
02390 {
02391 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a25">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This array is not an array of atom. This is an array of structure."</font>);
02392 }
02393
02394 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02395 }
02396
02397 <font class="comment">// ***************************************************************************</font>
02398
<a name="l02399"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a10">02399</a> <font class="keywordtype">bool</font> CFormElmArray::getArrayValue (uint8 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
02400 <font class="keyword"></font>{
02401 <font class="keywordflow">if</font> (Type)
02402 {
02403 string str;
02404 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m1">Type</a>->getValue (str, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, safe_cast<const CFormElmAtom*> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[arrayIndex].Element), *<a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>, evaluate, (uint32*)where, <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++, NULL))
02405 {
02406 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, str.c_str ());
02407 }
02408 }
02409 <font class="keywordflow">else</font>
02410 {
02411 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a25">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This array is not an array of atom. This is an array of structure."</font>);
02412 }
02413
02414 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02415 }
02416
02417 <font class="comment">// ***************************************************************************</font>
02418
<a name="l02419"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a11">02419</a> <font class="keywordtype">bool</font> CFormElmArray::getArrayValue (sint16 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
02420 <font class="keyword"></font>{
02421 <font class="keywordflow">if</font> (Type)
02422 {
02423 string str;
02424 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m1">Type</a>->getValue (str, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, safe_cast<const CFormElmAtom*> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[arrayIndex].Element), *<a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>, evaluate, (uint32*)where, <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++, NULL))
02425 {
02426 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, str.c_str ());
02427 }
02428 }
02429 <font class="keywordflow">else</font>
02430 {
02431 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a25">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This array is not an array of atom. This is an array of structure."</font>);
02432 }
02433
02434 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02435 }
02436
02437 <font class="comment">// ***************************************************************************</font>
02438
<a name="l02439"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a12">02439</a> <font class="keywordtype">bool</font> CFormElmArray::getArrayValue (uint16 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
02440 <font class="keyword"></font>{
02441 <font class="keywordflow">if</font> (Type)
02442 {
02443 string str;
02444 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m1">Type</a>->getValue (str, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, safe_cast<const CFormElmAtom*> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[arrayIndex].Element), *<a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>, evaluate, (uint32*)where, <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++, NULL))
02445 {
02446 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, str.c_str ());
02447 }
02448 }
02449 <font class="keywordflow">else</font>
02450 {
02451 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a25">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This array is not an array of atom. This is an array of structure."</font>);
02452 }
02453
02454 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02455 }
02456
02457 <font class="comment">// ***************************************************************************</font>
02458
<a name="l02459"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a13">02459</a> <font class="keywordtype">bool</font> CFormElmArray::getArrayValue (sint32 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
02460 <font class="keyword"></font>{
02461 <font class="keywordflow">if</font> (Type)
02462 {
02463 string str;
02464 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m1">Type</a>->getValue (str, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, safe_cast<const CFormElmAtom*> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[arrayIndex].Element), *<a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>, evaluate, (uint32*)where, <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++, NULL))
02465 {
02466 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, str.c_str ());
02467 }
02468 }
02469 <font class="keywordflow">else</font>
02470 {
02471 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a25">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This array is not an array of atom. This is an array of structure."</font>);
02472 }
02473
02474 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02475 }
02476
02477 <font class="comment">// ***************************************************************************</font>
02478
<a name="l02479"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a14">02479</a> <font class="keywordtype">bool</font> CFormElmArray::getArrayValue (uint32 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
02480 <font class="keyword"></font>{
02481 <font class="keywordflow">if</font> (Type)
02482 {
02483 string str;
02484 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m1">Type</a>->getValue (str, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, safe_cast<const CFormElmAtom*> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[arrayIndex].Element), *<a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>, evaluate, (uint32*)where, <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++, NULL))
02485 {
02486 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, str.c_str ());
02487 }
02488 }
02489 <font class="keywordflow">else</font>
02490 {
02491 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a25">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This array is not an array of atom. This is an array of structure."</font>);
02492 }
02493
02494 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02495 }
02496
02497 <font class="comment">// ***************************************************************************</font>
02498
<a name="l02499"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a15">02499</a> <font class="keywordtype">bool</font> CFormElmArray::getArrayValue (<font class="keywordtype">float</font> &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
02500 <font class="keyword"></font>{
02501 <font class="keywordflow">if</font> (Type)
02502 {
02503 string str;
02504 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m1">Type</a>->getValue (str, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, safe_cast<const CFormElmAtom*> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[arrayIndex].Element), *<a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>, evaluate, (uint32*)where, <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++, NULL))
02505 {
02506 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, str.c_str ());
02507 }
02508 }
02509 <font class="keywordflow">else</font>
02510 {
02511 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a25">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This array is not an array of atom. This is an array of structure."</font>);
02512 }
02513
02514 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02515 }
02516
02517 <font class="comment">// ***************************************************************************</font>
02518
<a name="l02519"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a16">02519</a> <font class="keywordtype">bool</font> CFormElmArray::getArrayValue (<font class="keywordtype">double</font> &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
02520 <font class="keyword"></font>{
02521 <font class="keywordflow">if</font> (Type)
02522 {
02523 string str;
02524 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m1">Type</a>->getValue (str, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, safe_cast<const CFormElmAtom*> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[arrayIndex].Element), *<a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>, evaluate, (uint32*)where, <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++, NULL))
02525 {
02526 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, str.c_str ());
02527 }
02528 }
02529 <font class="keywordflow">else</font>
02530 {
02531 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a25">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This array is not an array of atom. This is an array of structure."</font>);
02532 }
02533
02534 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02535 }
02536
02537 <font class="comment">// ***************************************************************************</font>
02538
<a name="l02539"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a17">02539</a> <font class="keywordtype">bool</font> CFormElmArray::getArrayValue (<font class="keywordtype">bool</font> &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
02540 <font class="keyword"></font>{
02541 <font class="keywordflow">if</font> (Type)
02542 {
02543 string str;
02544 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m1">Type</a>->getValue (str, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, safe_cast<const CFormElmAtom*> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[arrayIndex].Element), *<a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>, evaluate, (uint32*)where, <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++, NULL))
02545 {
02546 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, str.c_str ());
02547 }
02548 }
02549 <font class="keywordflow">else</font>
02550 {
02551 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a25">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This array is not an array of atom. This is an array of structure."</font>);
02552 }
02553
02554 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02555 }
02556
02557 <font class="comment">// ***************************************************************************</font>
02558
<a name="l02559"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a18">02559</a> <font class="keywordtype">bool</font> CFormElmArray::getArrayValue (<a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where)<font class="keyword"> const</font>
02560 <font class="keyword"></font>{
02561 <font class="keywordflow">if</font> (Type)
02562 {
02563 string str;
02564 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m1">Type</a>->getValue (str, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, safe_cast<const CFormElmAtom*> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[arrayIndex].Element), *<a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>, evaluate, (uint32*)where, <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++, NULL))
02565 {
02566 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, str.c_str ());
02567 }
02568 }
02569 <font class="keywordflow">else</font>
02570 {
02571 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a25">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getArrayValue"</font>, <font class="stringliteral">"This array is not an array of atom. This is an array of structure."</font>);
02572 }
02573
02574 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02575 }
02576
02577 <font class="comment">// ***************************************************************************</font>
02578
<a name="l02579"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a19">02579</a> xmlNodePtr CFormElmArray::write (xmlNodePtr root, <font class="keyword">const</font> CForm *form, <font class="keyword">const</font> <font class="keywordtype">char</font> *structName, <font class="keywordtype">bool</font> forceWrite)<font class="keyword"> const</font>
02580 <font class="keyword"></font>{
02581 <font class="comment">// Arrau is used ?</font>
02582 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a22">isUsed</a> (form) || forceWrite)
02583 {
02584 <font class="comment">// *** Header</font>
02585 xmlNodePtr node = xmlNewChild ( root, NULL, (<font class="keyword">const</font> xmlChar*)<font class="stringliteral">"ARRAY"</font>, NULL);
02586
02587 <font class="comment">// Element name</font>
02588 <font class="keywordflow">if</font> (structName != NULL)
02589 {
02590 <font class="comment">// Struct name</font>
02591 xmlSetProp (node, (<font class="keyword">const</font> xmlChar*)<font class="stringliteral">"Name"</font>, (<font class="keyword">const</font> xmlChar*)structName);
02592 }
02593
02594 <font class="comment">// For each elements of the structure</font>
02595 uint elm;
02596 <font class="keywordflow">for</font> (elm=0; elm<<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>.size(); elm++)
02597 {
02598 <font class="comment">// Create a node</font>
02599 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[elm].Element)
02600 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[elm].Element->write (node, form, <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[elm].Name.empty ()?NULL:<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[elm].Name.c_str (), <font class="keyword">true</font>);
02601 }
02602
02603 <font class="comment">// Return the new node</font>
02604 <font class="keywordflow">return</font> node;
02605 }
02606
02607 <font class="keywordflow">return</font> NULL;
02608 }
02609
02610 <font class="comment">// ***************************************************************************</font>
02611
<a name="l02612"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a24">02612</a> <font class="keywordtype">void</font> CFormElmArray::read (xmlNodePtr node, CFormLoader &loader, CForm *form)
02613 {
02614 <font class="comment">// Clean the form</font>
02615 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a2">clean</a> ();
02616
02617 <font class="comment">// Count child</font>
02618 <font class="keywordflow">if</font> (node)
02619 {
02620 <font class="comment">// Type of DFN array</font>
02621 <font class="keywordflow">if</font> (Type)
02622 {
02623 <a class="code" href="debug_8h.html#a6">nlassert</a> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m0">FormDfn</a> == NULL);
02624
02625 <font class="comment">// Count children</font>
02626 uint childCount = CIXml::countChildren (node, <font class="stringliteral">"ATOM"</font>);
02627
02628 <font class="comment">// Resize the table</font>
02629 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>.resize (childCount);
02630
02631 <font class="comment">// For each children</font>
02632 uint childNum=0;
02633 xmlNodePtr child = CIXml::getFirstChildNode (node, <font class="stringliteral">"ATOM"</font>);
02634 <font class="keywordflow">while</font> (child)
02635 {
02636 <font class="comment">// Get node name</font>
02637 <font class="keyword">const</font> <font class="keywordtype">char</font> *name = (<font class="keyword">const</font> <font class="keywordtype">char</font>*)xmlGetProp (child, (xmlChar*)<font class="stringliteral">"Name"</font>);
02638
02639 <font class="comment">// Create a new node</font>
02640 CFormElmAtom *newElt = <font class="keyword">new</font> CFormElmAtom (form, <font class="keyword">this</font>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>);
02641 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[childNum].Element = newElt;
02642 <font class="keywordflow">if</font> (name)
02643 {
02644 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[childNum].Name = name;
02645 xmlFree ((<font class="keywordtype">void</font>*)name);
02646 }
02647 newElt->read (child, loader, <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m1">Type</a>, form);
02648
02649 <font class="comment">// Next child</font>
02650 child = CIXml::getNextChildNode (child, <font class="stringliteral">"ATOM"</font>);
02651 childNum++;
02652 }
02653 }
02654 <font class="keywordflow">else</font>
02655 {
02656 <a class="code" href="debug_8h.html#a6">nlassert</a> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m0">FormDfn</a>);
02657 <a class="code" href="debug_8h.html#a6">nlassert</a> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m1">Type</a> == NULL);
02658
02659 <font class="comment">// Count children</font>
02660 uint childCount = CIXml::countChildren (node, <font class="stringliteral">"STRUCT"</font>);
02661
02662 <font class="comment">// Resize the table</font>
02663 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>.resize (childCount);
02664
02665 <font class="comment">// For each children</font>
02666 uint childNum=0;
02667 xmlNodePtr child = CIXml::getFirstChildNode (node, <font class="stringliteral">"STRUCT"</font>);
02668 <font class="keywordflow">while</font> (child)
02669 {
02670 <font class="comment">// Get node name</font>
02671 <font class="keyword">const</font> <font class="keywordtype">char</font> *name = (<font class="keyword">const</font> <font class="keywordtype">char</font>*)xmlGetProp (child, (xmlChar*)<font class="stringliteral">"Name"</font>);
02672
02673 <font class="comment">// Create a new node</font>
02674 CFormElmStruct *newElt = <font class="keyword">new</font> CFormElmStruct (form, <font class="keyword">this</font>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>);
02675 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[childNum].Element = newElt;
02676 <font class="keywordflow">if</font> (name)
02677 {
02678 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[childNum].Name = name;
02679 xmlFree ((<font class="keywordtype">void</font>*)name);
02680 }
02681 newElt->read (child, loader, <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m0">FormDfn</a>, form);
02682
02683 <font class="comment">// Next child</font>
02684 child = CIXml::getNextChildNode (child, <font class="stringliteral">"STRUCT"</font>);
02685 childNum++;
02686 }
02687 }
02688 }
02689 }
02690
02691 <font class="comment">// ***************************************************************************</font>
02692
<a name="l02693"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a20">02693</a> <font class="keywordtype">bool</font> CFormElmArray::setParent (CFormElm *parent)
02694 {
02695 <font class="keywordflow">return</font> <font class="keyword">true</font>;
02696 }
02697
02698 <font class="comment">// ***************************************************************************</font>
02699
<a name="l02700"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a21">02700</a> <font class="keywordtype">void</font> CFormElmArray::unlink (CFormElm *child)
02701 {
02702 uint i;
02703 <font class="keywordflow">for</font> (i=0; i<<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>.size (); i++)
02704 {
02705 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[i].Element == child)
02706 {
02707 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[i].Element = NULL;
02708 <font class="keywordflow">break</font>;
02709 }
02710 }
02711
02712 <font class="comment">// Element not found!</font>
02713 <a class="code" href="debug_8h.html#a6">nlassert</a> (i != <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>.size ());
02714 }
02715
02716 <font class="comment">// ***************************************************************************</font>
02717
<a name="l02718"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a22">02718</a> <font class="keywordtype">bool</font> CFormElmArray::isUsed (<font class="keyword">const</font> CForm *form)<font class="keyword"> const</font>
02719 <font class="keyword"></font>{
02720 <font class="comment">/*for (uint i=0; i<Elements.size(); i++)</font>
02721 <font class="comment"> {</font>
02722 <font class="comment"> if (Elements[i] && Elements[i]->isUsed (form))</font>
02723 <font class="comment"> return true;</font>
02724 <font class="comment"> }*/</font>
02725 <font class="keywordflow">return</font> form == <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>;
02726 }
02727
02728 <font class="comment">// ***************************************************************************</font>
02729
<a name="l02730"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a23">02730</a> <font class="keywordtype">void</font> CFormElmArray::getFormName (std::string &result, <font class="keyword">const</font> CFormElm *child)<font class="keyword"> const</font>
02731 <font class="keyword"></font>{
02732 <font class="comment">// Reset the result</font>
02733 <font class="keywordflow">if</font> (child == NULL)
02734 {
02735 result = <font class="stringliteral">""</font>;
02736 result.reserve (50);
02737 }
02738
02739 <font class="comment">// Get parent form name</font>
02740 <font class="keywordflow">if</font> (ParentNode)
02741 <a class="code" href="classNLGEORGES_1_1CFormElm.html#n1">ParentNode</a>->getFormName (result, <font class="keyword">this</font>);
02742
02743 <font class="comment">// Get node name</font>
02744 <font class="keywordflow">if</font> (child)
02745 {
02746 <font class="comment">// Look for the child</font>
02747 uint i;
02748 <font class="keywordflow">for</font> (i=0; i<<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>.size (); i++)
02749 {
02750 <font class="comment">// This one ?</font>
02751 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>[i].Element == child)
02752 {
02753 <font class="keywordtype">char</font> name[512];
02754 <a class="code" href="namespaceNLMISC.html#a211">smprintf</a> (name, 512, <font class="stringliteral">"[%d]"</font>, i);
02755
02756 <font class="comment">// Add the field name</font>
02757 result += name;
02758 <font class="keywordflow">break</font>;
02759 }
02760 }
02761
02762 <font class="comment">// Draw some warning</font>
02763 <font class="keywordflow">if</font> (i==<a class="code" href="classNLGEORGES_1_1CFormElmArray.html#m2">Elements</a>.size ())
02764 {
02765 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a25">warning</a> (<font class="keyword">false</font>, <font class="stringliteral">"getFormName"</font>, <font class="stringliteral">"Child node not found."</font>);
02766 }
02767 }
02768 }
02769
02770 <font class="comment">// ***************************************************************************</font>
02771
<a name="l02772"></a><a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a25">02772</a> <font class="keywordtype">void</font> CFormElmArray::warning (<font class="keywordtype">bool</font> exception, <font class="keyword">const</font> <font class="keywordtype">char</font> *function, <font class="keyword">const</font> <font class="keywordtype">char</font> *<a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a>, ... )<font class="keyword"> const</font>
02773 <font class="keyword"></font>{
02774 <font class="comment">// Make a buffer string</font>
02775 va_list args;
02776 va_start( args, <a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a> );
02777 <font class="keywordtype">char</font> buffer[1024];
02778 sint ret = vsnprintf( buffer, 1024, <a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a>, args );
02779 va_end( args );
02780
02781 <font class="comment">// Set the warning</font>
02782 string formName;
02783 <a class="code" href="classNLGEORGES_1_1CFormElmArray.html#a23">getFormName</a> (formName, NULL);
02784 <a class="code" href="namespaceNLGEORGES.html#a0">NLGEORGES::warning</a> (exception, <font class="stringliteral">"(CFormElmArray::%s) on node (%s) in form (%s) : %s"</font>, function, formName.c_str (), <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>->getFilename ().c_str (), buffer);
02785 }
02786
02787 <font class="comment">// ***************************************************************************</font>
02788 <font class="comment">// CFormElmAtom</font>
02789 <font class="comment">// ***************************************************************************</font>
02790
<a name="l02791"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a0">02791</a> CFormElmAtom::CFormElmAtom (CForm *form, CFormElm *parentNode, <font class="keyword">const</font> CFormDfn *parentDfn, uint parentIndex) : CFormElm (form, parentNode, parentDfn, parentIndex)
02792 {
02793 <a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#m0">Type</a> = NULL;
02794 }
02795
02796 <font class="comment">// ***************************************************************************</font>
02797
<a name="l02798"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a5">02798</a> <font class="keywordtype">bool</font> CFormElmAtom::isAtom ()<font class="keyword"> const</font>
02799 <font class="keyword"></font>{
02800 <font class="keywordflow">return</font> <font class="keyword">true</font>;
02801 }
02802
02803 <font class="comment">// ***************************************************************************</font>
02804
<a name="l02805"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a6">02805</a> <font class="keywordtype">bool</font> CFormElmAtom::getValue (string &result, TEval evaluate)<font class="keyword"> const</font>
02806 <font class="keyword"></font>{
02807 <a class="code" href="debug_8h.html#a6">nlassert</a> (<a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#m0">Type</a>);
02808
02809 <font class="comment">// Evale</font>
02810 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#m0">Type</a>->getValue (result, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>, <font class="keyword">this</font>, *<a class="code" href="classNLGEORGES_1_1CFormElm.html#n2">ParentDfn</a>, <a class="code" href="classNLGEORGES_1_1CFormElm.html#n3">ParentIndex</a>, evaluate, NULL, <a class="code" href="classNLGEORGES_1_1CFormElm.html#p0">LastRound</a>++, <font class="stringliteral">""</font>);
02811 }
02812
02813 <font class="comment">// ***************************************************************************</font>
02814
<a name="l02815"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a7">02815</a> <font class="keywordtype">bool</font> CFormElmAtom::getValue (sint8 &result, TEval evaluate)<font class="keyword"> const</font>
02816 <font class="keyword"></font>{
02817 <font class="comment">// Get the string value</font>
02818 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
02819 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a6">getValue</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, evaluate))
02820 {
02821 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
02822 }
02823
02824 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02825 }
02826
02827 <font class="comment">// ***************************************************************************</font>
02828
<a name="l02829"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a8">02829</a> <font class="keywordtype">bool</font> CFormElmAtom::getValue (uint8 &result, TEval evaluate)<font class="keyword"> const</font>
02830 <font class="keyword"></font>{
02831 <font class="comment">// Get the string value</font>
02832 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
02833 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a6">getValue</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, evaluate))
02834 {
02835 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
02836 }
02837
02838 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02839 }
02840
02841 <font class="comment">// ***************************************************************************</font>
02842
<a name="l02843"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a9">02843</a> <font class="keywordtype">bool</font> CFormElmAtom::getValue (sint16 &result, TEval evaluate)<font class="keyword"> const</font>
02844 <font class="keyword"></font>{
02845 <font class="comment">// Get the string value</font>
02846 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
02847 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a6">getValue</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, evaluate))
02848 {
02849 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
02850 }
02851
02852 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02853 }
02854
02855 <font class="comment">// ***************************************************************************</font>
02856
<a name="l02857"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a10">02857</a> <font class="keywordtype">bool</font> CFormElmAtom::getValue (uint16 &result, TEval evaluate)<font class="keyword"> const</font>
02858 <font class="keyword"></font>{
02859 <font class="comment">// Get the string value</font>
02860 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
02861 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a6">getValue</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, evaluate))
02862 {
02863 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
02864 }
02865
02866 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02867 }
02868
02869 <font class="comment">// ***************************************************************************</font>
02870
<a name="l02871"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a11">02871</a> <font class="keywordtype">bool</font> CFormElmAtom::getValue (sint32 &result, TEval evaluate)<font class="keyword"> const</font>
02872 <font class="keyword"></font>{
02873 <font class="comment">// Get the string value</font>
02874 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
02875 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a6">getValue</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, evaluate))
02876 {
02877 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
02878 }
02879
02880 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02881 }
02882
02883 <font class="comment">// ***************************************************************************</font>
02884
<a name="l02885"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a12">02885</a> <font class="keywordtype">bool</font> CFormElmAtom::getValue (uint32 &result, TEval evaluate)<font class="keyword"> const</font>
02886 <font class="keyword"></font>{
02887 <font class="comment">// Get the string value</font>
02888 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
02889 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a6">getValue</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, evaluate))
02890 {
02891 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
02892 }
02893
02894 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02895 }
02896
02897 <font class="comment">// ***************************************************************************</font>
02898
<a name="l02899"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a13">02899</a> <font class="keywordtype">bool</font> CFormElmAtom::getValue (<font class="keywordtype">float</font> &result, TEval evaluate)<font class="keyword"> const</font>
02900 <font class="keyword"></font>{
02901 <font class="comment">// Get the string value</font>
02902 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
02903 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a6">getValue</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, evaluate))
02904 {
02905 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
02906 }
02907
02908 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02909 }
02910
02911 <font class="comment">// ***************************************************************************</font>
02912
<a name="l02913"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a14">02913</a> <font class="keywordtype">bool</font> CFormElmAtom::getValue (<font class="keywordtype">double</font> &result, TEval evaluate)<font class="keyword"> const</font>
02914 <font class="keyword"></font>{
02915 <font class="comment">// Get the string value</font>
02916 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
02917 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a6">getValue</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, evaluate))
02918 {
02919 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
02920 }
02921
02922 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02923 }
02924
02925 <font class="comment">// ***************************************************************************</font>
02926
<a name="l02927"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a15">02927</a> <font class="keywordtype">bool</font> CFormElmAtom::getValue (<font class="keywordtype">bool</font> &result, TEval evaluate)<font class="keyword"> const</font>
02928 <font class="keyword"></font>{
02929 <font class="comment">// Get the string value</font>
02930 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
02931 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a6">getValue</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, evaluate))
02932 {
02933 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
02934 }
02935
02936 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02937 }
02938
02939 <font class="comment">// ***************************************************************************</font>
02940
<a name="l02941"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a16">02941</a> <font class="keywordtype">bool</font> CFormElmAtom::getValue (<a class="code" href="classNLMISC_1_1CRGBA.html">NLMISC::CRGBA</a> &result, TEval evaluate)<font class="keyword"> const</font>
02942 <font class="keyword"></font>{
02943 <font class="comment">// Get the string value</font>
02944 string <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
02945 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a6">getValue</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>, evaluate))
02946 {
02947 <font class="keywordflow">return</font> <a class="code" href="classNLGEORGES_1_1CFormElm.html#a65">convertValue</a> (result, <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>.c_str ());
02948 }
02949
02950 <font class="keywordflow">return</font> <font class="keyword">false</font>;
02951 }
02952
02953 <font class="comment">// ***************************************************************************</font>
02954
<a name="l02955"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a1">02955</a> xmlNodePtr CFormElmAtom::write (xmlNodePtr root, <font class="keyword">const</font> CForm *form, <font class="keyword">const</font> <font class="keywordtype">char</font> *structName, <font class="keywordtype">bool</font> forceWrite)<font class="keyword"> const</font>
02956 <font class="keyword"></font>{
02957 <font class="comment">// Atom is used ?</font>
02958 <font class="keywordflow">if</font> (<a class="code" href="classNLGEORGES_1_1CFormElm.html#a3">isUsed</a> (form) || forceWrite)
02959 {
02960 <font class="comment">// *** Header</font>
02961 xmlNodePtr node = xmlNewChild ( root, NULL, (<font class="keyword">const</font> xmlChar*)<font class="stringliteral">"ATOM"</font>, NULL);
02962
02963 <font class="comment">// Element name</font>
02964 <font class="keywordflow">if</font> (structName != NULL)
02965 {
02966 <font class="comment">// Struct name</font>
02967 xmlSetProp (node, (<font class="keyword">const</font> xmlChar*)<font class="stringliteral">"Name"</font>, (<font class="keyword">const</font> xmlChar*)structName);
02968 }
02969
02970 <font class="comment">// The value</font>
02971 <font class="keywordflow">if</font> (!<a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#o0">Value</a>.empty ())
02972 {
02973 <font class="keywordflow">if</font> (COXml::isStringValidForProperties (<a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#o0">Value</a>.c_str ()))
02974 xmlSetProp (node, (<font class="keyword">const</font> xmlChar*)<font class="stringliteral">"Value"</font>, (<font class="keyword">const</font> xmlChar*)<a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#o0">Value</a>.c_str());
02975 <font class="keywordflow">else</font>
02976 {
02977 xmlNodePtr textNode = xmlNewText ((<font class="keyword">const</font> xmlChar *)<a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#o0">Value</a>.c_str ());
02978 xmlAddChild (node, textNode);
02979 }
02980 }
02981
02982 <font class="comment">// Return the new node</font>
02983 <font class="keywordflow">return</font> node;
02984 }
02985 <font class="keywordflow">return</font> NULL;
02986 }
02987
02988 <font class="comment">// ***************************************************************************</font>
02989
<a name="l02990"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a4">02990</a> <font class="keywordtype">void</font> CFormElmAtom::read (xmlNodePtr node, CFormLoader &loader, <font class="keyword">const</font> CType *<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>, CForm *form)
02991 {
02992 <font class="comment">// Set the type</font>
02993 <a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#m0">Type</a> = <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>;
02994
02995 <font class="comment">// Set the value ?</font>
02996 <font class="keywordflow">if</font> (node)
02997 {
02998 <font class="comment">// Get the value</font>
02999 <font class="keyword">const</font> <font class="keywordtype">char</font> *<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a> = (<font class="keyword">const</font> <font class="keywordtype">char</font>*)xmlGetProp (node, (xmlChar*)<font class="stringliteral">"Value"</font>);
03000 <font class="keywordflow">if</font> (value)
03001 {
03002 <font class="comment">// Active value</font>
03003 <a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a17">setValue</a> (<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>);
03004
03005 <font class="comment">// Delete the value</font>
03006 xmlFree ((<font class="keywordtype">void</font>*)<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>);
03007 }
03008 <font class="keywordflow">else</font>
03009 {
03010 <font class="comment">// Get content</font>
03011 <font class="keyword">const</font> <font class="keywordtype">char</font> *valueText = (<font class="keyword">const</font> <font class="keywordtype">char</font>*)xmlNodeGetContent (node);
03012 <font class="keywordflow">if</font> (valueText)
03013 {
03014 <a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a17">setValue</a> (valueText);
03015
03016 <font class="comment">// Delete the value</font>
03017 xmlFree ((<font class="keywordtype">void</font>*)valueText);
03018 }
03019 }
03020 }
03021 }
03022
03023 <font class="comment">// ***************************************************************************</font>
03024
<a name="l03025"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a17">03025</a> <font class="keywordtype">void</font> CFormElmAtom::setValue (<font class="keyword">const</font> <font class="keywordtype">char</font> *<a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>)
03026 {
03027 <a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#o0">Value</a> = <a class="code" href="driver__opengl__extension__def_8h.html#a415">value</a>;
03028 }
03029
03030 <font class="comment">// ***************************************************************************</font>
03031
<a name="l03032"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a3">03032</a> <font class="keywordtype">void</font> CFormElmAtom::getFormName (std::string &result, <font class="keyword">const</font> CFormElm *child)<font class="keyword"> const</font>
03033 <font class="keyword"></font>{
03034 <font class="comment">// Must be NULL</font>
03035 <a class="code" href="debug_8h.html#a6">nlassert</a> (child == NULL);
03036 result = <font class="stringliteral">""</font>;
03037 result.reserve (50);
03038
03039 <font class="comment">// Get parent form name</font>
03040 <font class="keywordflow">if</font> (ParentNode)
03041 <a class="code" href="classNLGEORGES_1_1CFormElm.html#n1">ParentNode</a>->getFormName (result, <font class="keyword">this</font>);
03042 }
03043
03044 <font class="comment">// ***************************************************************************</font>
03045
<a name="l03046"></a><a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#c0">03046</a> <font class="keywordtype">void</font> CFormElmAtom::warning (<font class="keywordtype">bool</font> exception, <font class="keyword">const</font> <font class="keywordtype">char</font> *function, <font class="keyword">const</font> <font class="keywordtype">char</font> *<a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a>, ... )<font class="keyword"> const</font>
03047 <font class="keyword"></font>{
03048 <font class="comment">// Make a buffer string</font>
03049 va_list args;
03050 va_start( args, <a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a> );
03051 <font class="keywordtype">char</font> buffer[1024];
03052 sint ret = vsnprintf( buffer, 1024, <a class="code" href="driver__opengl__extension__def_8h.html#a398">format</a>, args );
03053 va_end( args );
03054
03055 <font class="comment">// Set the warning</font>
03056 string formName;
03057 <a class="code" href="classNLGEORGES_1_1CFormElmAtom.html#a3">getFormName</a> (formName, NULL);
03058 <a class="code" href="namespaceNLGEORGES.html#a0">NLGEORGES::warning</a> (exception, <font class="stringliteral">"(CFormElmAtom::%s) on node (%s) in form (%s) : %s"</font>, function, formName.c_str (), <a class="code" href="classNLGEORGES_1_1CFormElm.html#n0">Form</a>->getFilename ().c_str (), buffer);
03059 }
03060
03061 <font class="comment">// ***************************************************************************</font>
03062
03063 } <font class="comment">// NLGEORGES</font>
</pre></div>
<!-- footer -->
<BR><FONT Size=+5> </FONT>
</TD>
<TD WIDTH=15><IMG SRC=/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD>
</TR>
</TABLE>
</BODY>
</HTML>
|