aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a05383.html
blob: 06cfaf805481fb1ff3825cf47db5270069043276 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>NeL: STRING_MANAGER Namespace Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex">  <form class="search" action="search.php" method="get">
<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a>  | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>STRING_MANAGER Namespace Reference</h1>
<p>

<p>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>class &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02833.html">CMakeDiff</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02834.html">CMakeDiff::IDiffCallback</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03901.html">TClause</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03904.html">TGetHashValue</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03905.html">TGetIdentifier</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03906.html">TGetWorksheetHashValue</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03907.html">TGetWorksheetIdentifier</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03910.html">TPhrase</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03911.html">TPhraseDiffContext</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03912.html">TStringDiffContext</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03913.html">TStringInfo</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03914.html">TTestItem</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03915.html">TTestWorksheetItem</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03918.html">TWordsDiffContext</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>struct &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03919.html">TWorksheet</a></td></tr>

<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="a02833.html">CMakeDiff</a>&lt; <a class="el" href="a03910.html">TPhrase</a>,<br>
 <a class="el" href="a03911.html">TPhraseDiffContext</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05383.html#a2">TPhraseDiff</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="a02833.html">CMakeDiff</a>&lt; <a class="el" href="a03913.html">TStringInfo</a>,<br>
 <a class="el" href="a03912.html">TStringDiffContext</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05383.html#a1">TStringDiff</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="a02833.html">CMakeDiff</a>&lt; <a class="el" href="a03919.html#STRING__MANAGER_1_1TWorksheetw1">TWorksheet::TRow</a>,<br>
 <a class="el" href="a03918.html">TWordsDiffContext</a>, <a class="el" href="a03907.html">TGetWorksheetIdentifier</a>,<br>
 <a class="el" href="a03906.html">TGetWorksheetHashValue</a>, <a class="el" href="a03915.html">TTestWorksheetItem</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05383.html#a3">TWorkSheetDiff</a></td></tr>

<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05383.html#a11">loadExcelSheet</a> (const string <a class="el" href="a04560.html#a1">filename</a>, <a class="el" href="a03919.html">TWorksheet</a> &amp;worksheet, bool checkUnique)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05383.html#a6">loadStringFile</a> (const std::string <a class="el" href="a04560.html#a1">filename</a>, vector&lt; <a class="el" href="a03913.html">TStringInfo</a> &gt; &amp;stringInfos, bool forceRehash, <a class="el" href="a05167.html#a18">ucchar</a> openMark, <a class="el" href="a05167.html#a18">ucchar</a> closeMark, bool specialCase)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05383.html#a13">makeHashCode</a> (<a class="el" href="a03919.html">TWorksheet</a> &amp;sheet, bool forceRehash)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a13">uint64</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05383.html#a4">makePhraseHash</a> (const <a class="el" href="a03910.html">TPhrase</a> &amp;phrase)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05383.html#a5">parseHashFromComment</a> (const <a class="el" href="a03924.html">ucstring</a> &amp;comments, <a class="el" href="a04558.html#a13">uint64</a> &amp;hashValue)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03924.html">ucstring</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05383.html#a14">prepareExcelSheet</a> (const <a class="el" href="a03919.html">TWorksheet</a> &amp;worksheet)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03924.html">ucstring</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05383.html#a16">preparePhraseFile</a> (const std::vector&lt; <a class="el" href="a03910.html">TPhrase</a> &gt; &amp;phrases, bool removeDiffComments)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03924.html">ucstring</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05383.html#a10">preparePhraseFile</a> (const vector&lt; <a class="el" href="a03910.html">TPhrase</a> &gt; &amp;phrases, bool removeDiffComments)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03924.html">ucstring</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05383.html#a15">prepareStringFile</a> (const std::vector&lt; <a class="el" href="a03913.html">TStringInfo</a> &gt; &amp;strings, bool removeDiffComments)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03924.html">ucstring</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05383.html#a7">prepareStringFile</a> (const vector&lt; <a class="el" href="a03913.html">TStringInfo</a> &gt; &amp;strings, bool removeDiffComments)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05383.html#a12">readExcelSheet</a> (const <a class="el" href="a03924.html">ucstring</a> &amp;str, <a class="el" href="a03919.html">TWorksheet</a> &amp;worksheet, bool checkUnique)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05383.html#a8">readPhraseFile</a> (const std::string &amp;<a class="el" href="a04560.html#a1">filename</a>, vector&lt; <a class="el" href="a03910.html">TPhrase</a> &gt; &amp;phrases, bool forceRehash)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03924.html">ucstring</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05383.html#a9">tabLines</a> (<a class="el" href="a04558.html#a15">uint</a> nbTab, const <a class="el" href="a03924.html">ucstring</a> &amp;str)</td></tr>

<tr><td colspan=2><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03924.html">ucstring</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a05383.html#a0">nl</a> ("\r\n")</td></tr>

</table>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="a2" doxytag="STRING_MANAGER::TPhraseDiff" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef <a class="el" href="a02833.html">CMakeDiff</a>&lt;<a class="el" href="a03910.html">TPhrase</a>, <a class="el" href="a03911.html">TPhraseDiffContext</a>&gt; <a class="el" href="a02833.html">STRING_MANAGER::TPhraseDiff</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05635.html#l00493">493</a> of file <a class="el" href="a05635.html">diff_tool.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a1" doxytag="STRING_MANAGER::TStringDiff" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef <a class="el" href="a02833.html">CMakeDiff</a>&lt;<a class="el" href="a03913.html">TStringInfo</a>, <a class="el" href="a03912.html">TStringDiffContext</a>&gt; <a class="el" href="a02833.html">STRING_MANAGER::TStringDiff</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05635.html#l00492">492</a> of file <a class="el" href="a05635.html">diff_tool.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a3" doxytag="STRING_MANAGER::TWorkSheetDiff" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef <a class="el" href="a02833.html">CMakeDiff</a>&lt;<a class="el" href="a03919.html#STRING__MANAGER_1_1TWorksheetw1">TWorksheet::TRow</a>, <a class="el" href="a03918.html">TWordsDiffContext</a>, <a class="el" href="a03907.html">TGetWorksheetIdentifier</a>, <a class="el" href="a03906.html">TGetWorksheetHashValue</a>, <a class="el" href="a03915.html">TTestWorksheetItem</a>&gt; <a class="el" href="a02833.html">STRING_MANAGER::TWorkSheetDiff</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05635.html#l00494">494</a> of file <a class="el" href="a05635.html">diff_tool.h</a>.    </td>
  </tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="a11" doxytag="STRING_MANAGER::loadExcelSheet" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool STRING_MANAGER::loadExcelSheet </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const string&nbsp;</td>
          <td class="mdname" nowrap> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>TWorksheet &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>worksheet</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>checkUnique</em> = true</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05634.html#l00558">558</a> of file <a class="el" href="a05634.html">diff_tool.cpp</a>.
<p>
References <a class="el" href="a05708.html#l00255">NLMISC::CIFile::close()</a>, <a class="el" href="a05622.html#l00101">nldebug</a>, <a class="el" href="a05708.html#l00135">NLMISC::CIFile::open()</a>, and <a class="el" href="a05634.html#l00578">readExcelSheet()</a>.
<p>
Referenced by <a class="el" href="a06753.html#l00052">NLMISC::CWordsDictionary::init()</a>.
<p>
<div class="fragment"><pre>00559 {
00560         <span class="comment">// Yoyo: must test with CIFile because can be packed into a .bnp on client...</span>
00561         <a class="code" href="a02653.html">CIFile</a>  fp;
00562         <span class="keywordflow">if</span>(!fp.<a class="code" href="a02653.html#NLMISC_1_1CIFilea12">open</a>(filename))
00563         {
00564                 <a class="code" href="a04199.html#a0">nldebug</a>(<span class="stringliteral">"DT: Can't open file [%s]\n"</span>, <a class="code" href="a05377.html#a2">filename</a>.c_str());
00565                 <span class="keywordflow">return</span> <span class="keyword">true</span>;
00566         }
00567         fp.<a class="code" href="a02653.html#NLMISC_1_1CIFilea3">close</a>();
00568                                 
00569         <a class="code" href="a03924.html">ucstring</a> str;
00570         CI18N::readTextFile(filename, str, <span class="keyword">false</span>, <span class="keyword">false</span>);
00571         
00572         <span class="keywordflow">if</span> (!<a class="code" href="a05383.html#a12">readExcelSheet</a>(str, worksheet, checkUnique))
00573                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00574         
00575         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00576 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a6" doxytag="STRING_MANAGER::loadStringFile" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool STRING_MANAGER::loadStringFile </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string&nbsp;</td>
          <td class="mdname" nowrap> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>std::vector&lt; TStringInfo &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>stringInfos</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>forceRehash</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a05167.html#a18">ucchar</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>openMark</em> = '[', </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a05167.html#a18">ucchar</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>closeMark</em> = ']', </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>specialCase</em> = false</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05634.html#l00071">71</a> of file <a class="el" href="a05634.html">diff_tool.cpp</a>.
<p>
References <a class="el" href="a05635.html#l00040">STRING_MANAGER::TStringInfo::Comments</a>, <a class="el" href="a05635.html#l00041">STRING_MANAGER::TStringInfo::HashValue</a>, <a class="el" href="a05635.html#l00037">STRING_MANAGER::TStringInfo::Identifier</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05634.html#l00054">parseHashFromComment()</a>, <a class="el" href="a05635.html#l00038">STRING_MANAGER::TStringInfo::Text</a>, <a class="el" href="a05635.html#l00039">STRING_MANAGER::TStringInfo::Text2</a>, <a class="el" href="a06590.html#l00236">ucchar</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00072 {
00073 <span class="comment">/*      uint8 *buffer = 0;</span>
00074 <span class="comment">        uint    size;</span>
00075 <span class="comment"></span>
00076 <span class="comment">        try</span>
00077 <span class="comment">        {</span>
00078 <span class="comment">                CIFile fp(filename);</span>
00079 <span class="comment">                size = fp.getFileSize();</span>
00080 <span class="comment">                buffer = new uint8[size];</span>
00081 <span class="comment">                fp.serialBuffer(buffer, size);</span>
00082 <span class="comment">        }</span>
00083 <span class="comment">        catch(Exception &amp;e)</span>
00084 <span class="comment">        {</span>
00085 <span class="comment">                nlinfo("Can't open file [%s] (%s)\n", filename.c_str(), e.what());</span>
00086 <span class="comment">                return true;</span>
00087 <span class="comment">        }</span>
00088 <span class="comment">*/</span>
00089 <span class="comment">/*      FILE *fp = fopen(filename.c_str(), "rb");</span>
00090 <span class="comment"></span>
00091 <span class="comment">        if (fp == NULL)</span>
00092 <span class="comment">        {</span>
00093 <span class="comment">                nlinfo("Can't open file [%s]\n", filename.c_str());</span>
00094 <span class="comment">                if (buffer != 0)</span>
00095 <span class="comment">                        delete [] buffer;</span>
00096 <span class="comment">                return true;</span>
00097 <span class="comment">        }</span>
00098 <span class="comment"></span>
00099 <span class="comment">        // move to end of file</span>
00100 <span class="comment">        fseek(fp, 0, SEEK_END);</span>
00101 <span class="comment"></span>
00102 <span class="comment">        fpos_t  pos;</span>
00103 <span class="comment">        fgetpos(fp, &amp;pos);</span>
00104 <span class="comment"></span>
00105 <span class="comment">        uint8 *buffer = new uint8[uint(pos)];</span>
00106 <span class="comment"></span>
00107 <span class="comment">        rewind(fp);</span>
00108 <span class="comment">        uint size = fread(buffer, 1, uint(pos), fp);</span>
00109 <span class="comment">        fclose (fp);</span>
00110 <span class="comment">*/</span>
00111         <a class="code" href="a03924.html">ucstring</a> text;
00112 
00113         CI18N::readTextFile(filename, text, <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">true</span>);
00114 <span class="comment">//      CI18N::readTextBuffer(buffer, size, text);</span>
00115 <span class="comment">//      delete [] buffer;</span>
00116 
00117         <span class="comment">// ok, parse the file now.</span>
00118         ucstring::const_iterator first(text.begin()), last(text.end());
00119         std::string lastLabel(<span class="stringliteral">"nothing"</span>);
00120 
00121         <span class="keywordflow">while</span> (first != last)
00122         {
00123                 TStringInfo si;
00124                 CI18N::skipWhiteSpace(first, last, &amp;si.Comments);
00125 
00126                 <span class="keywordflow">if</span> (first == last)
00127                 {
00128                         <span class="comment">// check if there is only swap command remaining in comment</span>
00129                         <span class="keywordflow">if</span> (si.Comments.find(<a class="code" href="a03924.html">ucstring</a>(<span class="stringliteral">"// DIFF SWAP "</span>)) != ucstring::npos)
00130                         {
00131                                 stringInfos.push_back(si);
00132                         }
00133                         <span class="keywordflow">break</span>;
00134                 }
00135 
00136                 <span class="keywordflow">if</span> (!CI18N::parseLabel(first, last, si.Identifier))
00137                 {
00138                         <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"DT: Fatal : Invalid label will reading %s after %s\n"</span>, <a class="code" href="a05377.html#a2">filename</a>.c_str(), lastLabel.c_str());
00139                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00140                 }
00141                 lastLabel = si.Identifier;
00142 
00143                 CI18N::skipWhiteSpace(first, last, &amp;si.Comments);
00144 
00145                 <span class="keywordflow">if</span> (!CI18N::parseMarkedString(openMark, closeMark, first, last, si.Text))
00146                 {
00147                         <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"DT: Fatal : Invalid text value reading %s for label %s\n"</span>, <a class="code" href="a05377.html#a2">filename</a>.c_str(), lastLabel.c_str());
00148                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00149                 }
00150 
00151                 <span class="keywordflow">if</span> (specialCase)
00152                 {
00153                         CI18N::skipWhiteSpace(first, last, &amp;si.Comments);
00154 
00155                         <span class="keywordflow">if</span> (!CI18N::parseMarkedString(openMark, closeMark, first, last, si.Text2))
00156                         {
00157                                 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"DT: Fatal : Invalid text2 value reading %s for label %s\n"</span>, <a class="code" href="a05377.html#a2">filename</a>.c_str(), lastLabel.c_str());
00158                                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00159                         }
00160 
00161                 }
00162 
00163                 <span class="keywordflow">if</span> (forceRehash || !<a class="code" href="a05383.html#a5">parseHashFromComment</a>(si.Comments, si.HashValue))
00164                 {
00165                         <span class="comment">// compute the hash value from text.</span>
00166                         si.HashValue = CI18N::makeHash(si.Text);
00167 <span class="comment">//                      nldebug("Generating hash for %s as %s", si.Identifier.c_str(), CI18N::hashToString(si.HashValue).c_str());</span>
00168                 }
00169                 <span class="keywordflow">else</span>
00170                 {
00171 <span class="comment">//                      nldebug("Comment = [%s]", si.Comments.toString().c_str());</span>
00172 <span class="comment">//                      nldebug("Retreiving hash for %s as %s", si.Identifier.c_str(), CI18N::hashToString(si.HashValue).c_str());</span>
00173                 }
00174                 stringInfos.push_back(si);
00175         }
00176 
00177 
00178         <span class="comment">// check identifier uniqueness</span>
00179         {
00180                 <span class="keywordtype">bool</span> error = <span class="keyword">false</span>;
00181                 set&lt;string&gt;     unik;
00182                 set&lt;string&gt;::iterator it;
00183                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;stringInfos.size(); ++i)
00184                 {
00185                         it = unik.find(stringInfos[i].Identifier); 
00186                         <span class="keywordflow">if</span> (it != unik.end())
00187                         {
00188                                 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"DT: loadStringFile : identifier '%s' exist twice"</span>, stringInfos[i].Identifier.c_str() );
00189                                 error = <span class="keyword">true</span>;
00190                         }
00191                         <span class="keywordflow">else</span>
00192                                 unik.insert(stringInfos[i].Identifier);
00193                                 
00194                 }
00195                 <span class="keywordflow">if</span> (error)
00196                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00197         }
00198 
00199         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00200 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a13" doxytag="STRING_MANAGER::makeHashCode" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void STRING_MANAGER::makeHashCode </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">TWorksheet &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>sheet</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>forceRehash</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05634.html#l00749">749</a> of file <a class="el" href="a05634.html">diff_tool.cpp</a>.
<p>
References <a class="el" href="a05635.html#l00097">STRING_MANAGER::TWorksheet::ColCount</a>, <a class="el" href="a05635.html#l00096">STRING_MANAGER::TWorksheet::Data</a>, <a class="el" href="a05646.html#l00225">index</a>, <a class="el" href="a05635.html#l00159">STRING_MANAGER::TWorksheet::insertColumn()</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00102">uint64</a>.
<p>
<div class="fragment"><pre>00750 {
00751         <span class="keywordflow">if</span> (!sheet.Data.empty())
00752         {
00753                 TWorksheet::TRow::iterator it = find(sheet.Data[0].begin(), sheet.Data[0].end(), <a class="code" href="a03924.html">ucstring</a>(<span class="stringliteral">"*HASH_VALUE"</span>));
00754                 <span class="keywordflow">if</span> (forceRehash || it == sheet.Data[0].end())
00755                 {
00756                         <span class="comment">// we need to generate HASH_VALUE column !</span>
00757                         <span class="keywordflow">if</span> (it == sheet.Data[0].end())
00758                         {
00759                                 sheet.insertColumn(0);
00760                                 sheet.Data[0][0] = <a class="code" href="a03924.html">ucstring</a>(<span class="stringliteral">"*HASH_VALUE"</span>);
00761                         }
00762 
00763                         <span class="comment">// Check columns</span>
00764                         vector&lt;bool&gt;    columnOk;
00765                         columnOk.resize(sheet.ColCount, <span class="keyword">false</span>);
00766                         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> k=1; k&lt;sheet.ColCount; ++k)
00767                         {
00768                                 <span class="keywordflow">if</span> (sheet.Data[0][k].find(<a class="code" href="a03924.html">ucstring</a>(<span class="stringliteral">"*"</span>)) != 0 &amp;&amp; sheet.Data[0][k].find(<a class="code" href="a03924.html">ucstring</a>(<span class="stringliteral">"DIFF "</span>)) != 0)
00769                                 {
00770                                         columnOk[k]= <span class="keyword">true</span>;
00771                                 }
00772                         }
00773                         
00774                         <span class="comment">// make hash for each line</span>
00775                         <a class="code" href="a03924.html">ucstring</a> str;
00776                         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> j=1; j&lt;sheet.Data.size(); ++j)
00777                         {
00778                                 str.erase();
00779                                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> k=1; k&lt;sheet.ColCount; ++k)
00780                                 {
00781                                         <span class="keywordflow">if</span> (columnOk[k])
00782                                         {
00783                                                 str += sheet.Data[j][k];
00784                                         }
00785                                 }
00786                                 <a class="code" href="a04558.html#a13">uint64</a> hash = CI18N::makeHash(str);
00787                                 CI18N::hashToUCString(hash, sheet.Data[j][0]);
00788                         }
00789                 }
00790                 <span class="keywordflow">else</span>
00791                 {
00792                         <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a566">index</a> = it - sheet.Data[0].begin();
00793                         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> j=1; j&lt;sheet.Data.size(); ++j)
00794                         {
00795                                 <a class="code" href="a03924.html">ucstring</a> &amp;field = sheet.Data[j][<a class="code" href="a04223.html#a566">index</a>];
00796 
00797                                 <span class="keywordflow">if</span> (!field.empty() &amp;&amp; field[0] == <span class="charliteral">'_'</span>)
00798                                         field = field.substr(1);
00799                         }
00800                 }
00801         }
00802 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a4" doxytag="STRING_MANAGER::makePhraseHash" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a13">uint64</a> STRING_MANAGER::makePhraseHash </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const TPhrase &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>phrase</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05634.html#l00037">37</a> of file <a class="el" href="a05634.html">diff_tool.cpp</a>.
<p>
References <a class="el" href="a05635.html#l00073">STRING_MANAGER::TPhrase::Clauses</a>, <a class="el" href="a05635.html#l00071">STRING_MANAGER::TPhrase::Parameters</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00102">uint64</a>.
<p>
Referenced by <a class="el" href="a05634.html#l00279">readPhraseFile()</a>.
<p>
<div class="fragment"><pre>00038 {
00039         <a class="code" href="a03924.html">ucstring</a> text;
00040         text = phrase.Parameters;
00041         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;phrase.Clauses.size(); ++i)
00042         {
00043                 text += phrase.Clauses[i].Conditions;
00044                 text += phrase.Clauses[i].Identifier;
00045                 text += phrase.Clauses[i].Text;
00046         }
00047 
00048         <span class="keywordflow">return</span> CI18N::makeHash(text);
00049 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a5" doxytag="STRING_MANAGER::parseHashFromComment" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool STRING_MANAGER::parseHashFromComment </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03924.html">ucstring</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>comments</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a04558.html#a13">uint64</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>hashValue</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05634.html#l00054">54</a> of file <a class="el" href="a05634.html">diff_tool.cpp</a>.
<p>
References <a class="el" href="a06640.html#l00133">ucstring::toString()</a>, and <a class="el" href="a05981.html#l00102">uint64</a>.
<p>
Referenced by <a class="el" href="a05634.html#l00071">loadStringFile()</a>, and <a class="el" href="a05634.html#l00279">readPhraseFile()</a>.
<p>
<div class="fragment"><pre>00055 {
00056         string str = comments.<a class="code" href="a03924.html#ucstringa11">toString</a>();
00057 
00058         string::size_type pos = str.find(<span class="stringliteral">"HASH_VALUE "</span>);
00059         <span class="keywordflow">if</span> (pos == string::npos)
00060                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00061 
00062         string hashStr = str.substr(pos + 11, 16);
00063 
00064         hashValue = CI18N::stringToHash(hashStr);
00065         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00066 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a14" doxytag="STRING_MANAGER::prepareExcelSheet" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03924.html">ucstring</a> STRING_MANAGER::prepareExcelSheet </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const TWorksheet &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>worksheet</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05634.html#l00804">804</a> of file <a class="el" href="a05634.html">diff_tool.cpp</a>.
<p>
References <a class="el" href="a05635.html#l00096">STRING_MANAGER::TWorksheet::Data</a>, <a class="el" href="a05383.html#a0">nl</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00805 {
00806         <span class="keywordflow">if</span>(worksheet.Data.empty())
00807                 <span class="keywordflow">return</span> <a class="code" href="a03924.html">ucstring</a>();
00808 
00809         <span class="comment">// **** First pass: count approx the size</span>
00810         <a class="code" href="a04558.html#a15">uint</a>    approxSize= 0;
00811         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;worksheet.Data.size(); ++i)
00812         {
00813                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> j=0; j&lt;worksheet.Data[i].size(); ++j)
00814                 {
00815                         approxSize+= worksheet.Data[i][j].size() + 1;
00816                 }
00817                 approxSize++;
00818         }
00819 
00820         <span class="comment">// Hash value for each column?</span>
00821         vector&lt;bool&gt;    hashValue;
00822         hashValue.resize(worksheet.Data[0].size());
00823         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> j=0; j&lt;worksheet.Data[0].size(); ++j)
00824         {
00825                 hashValue[j]= worksheet.Data[0][j] == <a class="code" href="a03924.html">ucstring</a>(<span class="stringliteral">"*HASH_VALUE"</span>);
00826         }
00827 
00828         <span class="comment">// **** Second pass: fill</span>
00829         <a class="code" href="a03924.html">ucstring</a> text;
00830         text.reserve(approxSize*2);
00831         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;worksheet.Data.size(); ++i)
00832         {
00833                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> j=0; j&lt;worksheet.Data[i].size(); ++j)
00834                 {
00835                         <span class="keywordflow">if</span> (i &gt; 0 &amp;&amp; hashValue[j])
00836                                 text += <span class="stringliteral">"_"</span>;
00837                         text += worksheet.Data[i][j];
00838                         <span class="keywordflow">if</span> (j != worksheet.Data[i].size()-1)
00839                                 text += <span class="charliteral">'\t'</span>;
00840                 }
00841                 text += <a class="code" href="a05383.html#a0">nl</a>;
00842         }
00843 
00844         <span class="keywordflow">return</span> text;
00845 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a16" doxytag="STRING_MANAGER::preparePhraseFile" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03924.html">ucstring</a> preparePhraseFile </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::vector&lt; TPhrase &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>phrases</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>removeDiffComments</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a10" doxytag="STRING_MANAGER::preparePhraseFile" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03924.html">ucstring</a> preparePhraseFile </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const vector&lt; TPhrase &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>phrases</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>removeDiffComments</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05634.html#l00472">472</a> of file <a class="el" href="a05634.html">diff_tool.cpp</a>.
<p>
References <a class="el" href="a05635.html#l00073">STRING_MANAGER::TPhrase::Clauses</a>, <a class="el" href="a04115.html#a118">comment()</a>, <a class="el" href="a05635.html#l00064">STRING_MANAGER::TClause::Comments</a>, <a class="el" href="a05635.html#l00072">STRING_MANAGER::TPhrase::Comments</a>, <a class="el" href="a05635.html#l00062">STRING_MANAGER::TClause::Conditions</a>, <a class="el" href="a05586.html#l00821">NLMISC::explode()</a>, <a class="el" href="a05635.html#l00074">STRING_MANAGER::TPhrase::HashValue</a>, <a class="el" href="a05635.html#l00061">STRING_MANAGER::TClause::Identifier</a>, <a class="el" href="a05635.html#l00070">STRING_MANAGER::TPhrase::Identifier</a>, <a class="el" href="a05383.html#a0">nl</a>, <a class="el" href="a05635.html#l00071">STRING_MANAGER::TPhrase::Parameters</a>, <a class="el" href="a05634.html#l00449">tabLines()</a>, <a class="el" href="a05635.html#l00063">STRING_MANAGER::TClause::Text</a>, <a class="el" href="a06640.html#l00133">ucstring::toString()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00473 {
00474         <a class="code" href="a03924.html">ucstring</a> ret;
00475         vector&lt;TPhrase&gt;::const_iterator first(phrases.begin()), last(phrases.end());
00476         <span class="keywordflow">for</span> (; first != last; ++first)
00477         {
00478                 <span class="keyword">const</span> TPhrase &amp;p = *first;
00479 
00480                 <span class="keywordflow">if</span> (removeDiffComments)
00481                 {
00482                         string <a class="code" href="a04115.html#a118">comment</a> = p.Comments.toString();
00483                         vector&lt;string&gt;  lines;
00484                         <a class="code" href="a05378.html#a281">explode</a>(comment, <span class="stringliteral">"\n"</span>, lines, <span class="keyword">true</span>);
00485 
00486                         <a class="code" href="a04558.html#a15">uint</a> i;
00487                         <span class="keywordflow">for</span> (i=0; i&lt;lines.size(); ++i)
00488                         {
00489                                 <span class="keywordflow">if</span> (lines[i].find(<span class="stringliteral">"// DIFF "</span>) != string::npos)
00490                                 {
00491                                         lines.erase(lines.begin()+i);
00492                                         --i;
00493                                 }
00494                         }
00495 
00496                         <a class="code" href="a04115.html#a118">comment</a>.erase();
00497                         <span class="keywordflow">for</span> (i=0; i&lt;lines.size(); ++i)
00498                         {
00499                                 <a class="code" href="a04115.html#a118">comment</a> += lines[i] + <span class="stringliteral">"\n"</span>;
00500                         }
00501                         p.Comments = <a class="code" href="a03924.html">ucstring</a>(comment);
00502                 }
00503                 ret += p.Comments;
00504 
00505                 <span class="keywordflow">if</span> (!p.Identifier.empty() || !p.Clauses.empty())
00506                 {
00507                         <span class="keywordflow">if</span> (p.Comments.find(<a class="code" href="a03924.html">ucstring</a>(<span class="stringliteral">"// HASH_VALUE "</span>)) == ucstring::npos)
00508                         {
00509                                 <span class="comment">// add the hash value.</span>
00510                                 ret += <a class="code" href="a03924.html">ucstring</a>(<span class="stringliteral">"// HASH_VALUE "</span>)+CI18N::hashToString(p.HashValue) + <a class="code" href="a05383.html#a0">nl</a>;
00511                         }
00512                         ret += p.Identifier + <span class="stringliteral">" ("</span>+p.Parameters + <span class="stringliteral">")"</span> + <a class="code" href="a05383.html#a0">nl</a>;
00513                         ret += <span class="charliteral">'{'</span>;
00514                         ret += <a class="code" href="a05383.html#a0">nl</a>;
00515                         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;p.Clauses.size(); ++i)
00516                         {
00517                                 <span class="keyword">const</span> TClause &amp;c = p.Clauses[i];
00518                                 <span class="keywordflow">if</span> (!c.Comments.empty())
00519                                 {
00520                                         <a class="code" href="a03924.html">ucstring</a> <a class="code" href="a04115.html#a118">comment</a> = <a class="code" href="a05383.html#a9">tabLines</a>(1, c.Comments);
00521                                         ret += <a class="code" href="a04115.html#a118">comment</a>; <span class="comment">// + '\r'+'\n';</span>
00522                                 }
00523                                 <span class="keywordflow">if</span> (!c.Conditions.empty())
00524                                 {
00525                                         <a class="code" href="a03924.html">ucstring</a> cond = <a class="code" href="a05383.html#a9">tabLines</a>(1, c.Conditions);
00526                                         ret += cond + <a class="code" href="a05383.html#a0">nl</a>;
00527                                 }
00528                                 ret += <span class="charliteral">'\t'</span>;
00529 <span class="comment">//                              ucstring text = CI18N::makeMarkedString('[', ']', c.Text);</span>
00530 
00531                                 <a class="code" href="a03924.html">ucstring</a> text = CI18N::makeMarkedString(<span class="charliteral">'['</span>, <span class="charliteral">']'</span>, c.Text);;
00532                                 <a class="code" href="a03924.html">ucstring</a> text2;
00533                                 <span class="comment">// add new line and tab after each \n tag</span>
00534                                 ucstring::size_type pos;
00535                                 <span class="keyword">const</span> <a class="code" href="a03924.html">ucstring</a> nlTag(<span class="stringliteral">"\\n"</span>);
00536                                 <span class="keywordflow">while</span> ((pos = text.find(nlTag)) != ucstring::npos)
00537                                 {
00538                                         text2 += text.substr(0, pos+2) + <a class="code" href="a05383.html#a0">nl</a>;
00539                                         text = text.substr(pos+2);
00540                                 }
00541                                 text2 += text;<span class="comment">//.substr(0, pos+2);</span>
00542                                 
00543                                 text.swap(text2);
00544                                 
00545                                 text = <a class="code" href="a05383.html#a9">tabLines</a>(3, text);
00546                                 <span class="comment">// remove begin tabs</span>
00547                                 text = text.substr(3);
00548                                 ret += <span class="charliteral">'\t'</span> + c.Identifier + <span class="charliteral">'\t'</span> + text + <a class="code" href="a05383.html#a0">nl</a> + <a class="code" href="a05383.html#a0">nl</a>;
00549                         }
00550                         ret += <span class="charliteral">'}'</span>;
00551                 }
00552                 ret += <a class="code" href="a05383.html#a0">nl</a> + <a class="code" href="a05383.html#a0">nl</a>;
00553         }
00554 
00555         <span class="keywordflow">return</span> ret;
00556 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a15" doxytag="STRING_MANAGER::prepareStringFile" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03924.html">ucstring</a> prepareStringFile </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::vector&lt; TStringInfo &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>strings</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>removeDiffComments</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a7" doxytag="STRING_MANAGER::prepareStringFile" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03924.html">ucstring</a> prepareStringFile </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const vector&lt; TStringInfo &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>strings</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>removeDiffComments</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05634.html#l00203">203</a> of file <a class="el" href="a05634.html">diff_tool.cpp</a>.
<p>
References <a class="el" href="a04115.html#a118">comment()</a>, <a class="el" href="a05635.html#l00040">STRING_MANAGER::TStringInfo::Comments</a>, <a class="el" href="a05586.html#l00821">NLMISC::explode()</a>, <a class="el" href="a05635.html#l00041">STRING_MANAGER::TStringInfo::HashValue</a>, <a class="el" href="a05635.html#l00037">STRING_MANAGER::TStringInfo::Identifier</a>, <a class="el" href="a05383.html#a0">nl</a>, <a class="el" href="a05635.html#l00038">STRING_MANAGER::TStringInfo::Text</a>, <a class="el" href="a06229.html#l02652">NLMISC::toString()</a>, <a class="el" href="a06640.html#l00133">ucstring::toString()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00204 {
00205         <a class="code" href="a03924.html">ucstring</a> diff;
00206 
00207         vector&lt;TStringInfo&gt;::const_iterator first(strings.begin()), last(strings.end());
00208         <span class="keywordflow">for</span> (; first != last; ++first)
00209         {
00210                 <a class="code" href="a03924.html">ucstring</a> str;
00211                 <span class="keyword">const</span> TStringInfo &amp;si = *first;
00212                 string <a class="code" href="a04115.html#a118">comment</a> = si.Comments.toString();
00213                 vector&lt;string&gt;  lines;
00214                 <a class="code" href="a05378.html#a281">explode</a>(comment, <span class="stringliteral">"\n"</span>, lines, <span class="keyword">true</span>);
00215 
00216                 <a class="code" href="a04558.html#a15">uint</a> i;
00217                 <span class="keywordflow">for</span> (i=0; i&lt;lines.size(); ++i)
00218                 {
00219                         <span class="keywordflow">if</span> (removeDiffComments)
00220                         {
00221                                 <span class="keywordflow">if</span> (lines[i].find(<span class="stringliteral">"// DIFF "</span>) != string::npos)
00222                                 {
00223                                         lines.erase(lines.begin()+i);
00224                                         --i;
00225                                         <span class="keywordflow">continue</span>;
00226                                 }
00227                         }
00228                         <span class="keywordflow">if</span> (lines[i].find(<span class="stringliteral">"// INDEX "</span>) != string::npos)
00229                         {
00230                                 lines.erase(lines.begin()+i);
00231                                 --i;
00232                         }
00233                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (lines[i].find(<span class="stringliteral">"// HASH_VALUE "</span>) != string::npos)
00234                         {
00235                                 lines.erase(lines.begin()+i);
00236                                 --i;
00237                         }
00238                 }
00239 
00240                 <a class="code" href="a04115.html#a118">comment</a>.erase();
00241                 <span class="keywordflow">for</span> (i=0; i&lt;lines.size(); ++i)
00242                 {
00243                         <a class="code" href="a04115.html#a118">comment</a> += lines[i] + <span class="stringliteral">"\n"</span>;
00244                 }
00245                 si.Comments = <a class="code" href="a03924.html">ucstring</a>(comment);
00246 
00247                 str = si.Comments;
00248                 <span class="keywordflow">if</span> (!si.Identifier.empty() || !si.Text.empty())
00249                 {
00250                         <span class="comment">// add hash value comment if needed</span>
00251 <span class="comment">//                      if (si.Comments.find(ucstring("// HASH_VALUE ")) == ucstring::npos)</span>
00252                         str += <a class="code" href="a03924.html">ucstring</a>(<span class="stringliteral">"// HASH_VALUE "</span>) + CI18N::hashToString(si.HashValue)+ <a class="code" href="a05383.html#a0">nl</a>;
00253                         str += <a class="code" href="a03924.html">ucstring</a>(<span class="stringliteral">"// INDEX "</span>) + <a class="code" href="a05378.html#a244">NLMISC::toString</a>(<span class="stringliteral">"%u"</span>, first-strings.begin())+ <a class="code" href="a05383.html#a0">nl</a>;
00254                         str += si.Identifier + <span class="charliteral">'\t'</span>;
00255 
00256                         <a class="code" href="a03924.html">ucstring</a> text = CI18N::makeMarkedString(<span class="charliteral">'['</span>, <span class="charliteral">']'</span>, si.Text);;
00257                         <a class="code" href="a03924.html">ucstring</a> text2;
00258                         <span class="comment">// add new line and tab after each \n tag</span>
00259                         ucstring::size_type pos;
00260                         <span class="keyword">const</span> <a class="code" href="a03924.html">ucstring</a> nlTag(<span class="stringliteral">"\\n"</span>);
00261                         <span class="keywordflow">while</span> ((pos = text.find(nlTag)) != ucstring::npos)
00262                         {
00263                                 text2 += text.substr(0, pos+2) + <a class="code" href="a05383.html#a0">nl</a> + <span class="stringliteral">"\t"</span>;
00264                                 text = text.substr(pos+2);
00265                         }
00266                         text2 += text;<span class="comment">//.substr(0, pos+2);</span>
00267                         str += text2 + <a class="code" href="a05383.html#a0">nl</a> + <a class="code" href="a05383.html#a0">nl</a>;
00268 <span class="comment">//                      str += CI18N::makeMarkedString('[', ']', si.Text) + nl + nl;</span>
00269                 }
00270 
00271 <span class="comment">//              nldebug("Adding string [%s]", str.toString().c_str());</span>
00272                 diff += str;
00273         }
00274 
00275         <span class="keywordflow">return</span> diff;
00276 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a12" doxytag="STRING_MANAGER::readExcelSheet" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool STRING_MANAGER::readExcelSheet </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03924.html">ucstring</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>text</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>TWorksheet &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>worksheet</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>checkUnique</em> = true</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
append last cell 
<p>
Definition at line <a class="el" href="a05634.html#l00578">578</a> of file <a class="el" href="a05634.html">diff_tool.cpp</a>.
<p>
References <a class="el" href="a05635.html#l00097">STRING_MANAGER::TWorksheet::ColCount</a>, <a class="el" href="a05635.html#l00265">STRING_MANAGER::TWorksheet::getData()</a>, <a class="el" href="a05635.html#l00159">STRING_MANAGER::TWorksheet::insertColumn()</a>, <a class="el" href="a05383.html#a0">nl</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05635.html#l00230">STRING_MANAGER::TWorksheet::resize()</a>, <a class="el" href="a05635.html#l00257">STRING_MANAGER::TWorksheet::setData()</a>, <a class="el" href="a05635.html#l00154">STRING_MANAGER::TWorksheet::size()</a>, <a class="el" href="a06640.html#l00133">ucstring::toString()</a>, <a class="el" href="a06590.html#l00236">ucchar</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06590.html#l00217">uint16</a>.
<p>
Referenced by <a class="el" href="a05634.html#l00558">loadExcelSheet()</a>.
<p>
<div class="fragment"><pre>00579 {
00580         <span class="keywordflow">if</span>(str.empty())
00581                 <span class="keywordflow">return</span> <span class="keyword">true</span>;
00582 
00583         <span class="comment">// copy the str to a big ucchar array =&gt; Avoid allocation / free</span>
00584         vector&lt;ucchar&gt;  strArray;
00585         <span class="comment">// append a '\0'</span>
00586         strArray.resize(str.size()+1);
00587         strArray[strArray.size()-1]= 0;
00588         memcpy(&amp;strArray[0], &amp;str[0], str.size()*<span class="keyword">sizeof</span>(<a class="code" href="a05167.html#a18">ucchar</a>));
00589 
00590 
00591         <span class="comment">// **** Build array of lines. just point to strArray, and fill 0 where appropriated</span>
00592         vector&lt;ucchar*&gt; lines;
00593         lines.reserve(500);
00594         ucstring::size_type pos = 0;
00595         ucstring::size_type lastPos = 0;
00596         <span class="keywordflow">while</span> ((pos = str.find(nl, lastPos)) != ucstring::npos)
00597         {
00598                 <span class="keywordflow">if</span> (pos&gt;lastPos)
00599                 {
00600                         strArray[pos]= 0;
00601 <span class="comment">//                      nldebug("Found line : [%s]", ucstring(&amp;strArray[lastPos]).toString().c_str());</span>
00602                         lines.push_back(&amp;strArray[lastPos]);
00603                 }
00604                 lastPos = pos + 2;
00605         }
00606 
00607         <span class="comment">// Must add last line if no \r\n ending</span>
00608         <span class="keywordflow">if</span> (lastPos &lt; str.size())
00609         {
00610                 pos= str.size();
00611                 strArray[pos]= 0;
00612 <span class="comment">//              nldebug("Found line : [%s]", ucstring(&amp;strArray[lastPos]).toString().c_str());</span>
00613                 lines.push_back(&amp;strArray[lastPos]);
00614         }
00615 
00616 <span class="comment">//      nldebug("Found %u lines", lines.size());</span>
00617 
00618         <span class="comment">// **** Do 2 pass.1st count the cell number, then fill. =&gt; avoid reallocation</span>
00619         <a class="code" href="a04558.html#a15">uint</a>            newColCount= 0;
00620         <a class="code" href="a04558.html#a15">uint</a>            i;
00621         <span class="keywordflow">for</span> (i=0; i&lt;lines.size(); ++i)
00622         {
00623                 <a class="code" href="a04558.html#a15">uint</a>    numCells;
00624                 numCells= 0;
00625 
00626                 <a class="code" href="a05167.html#a18">ucchar</a>  *first= lines[i];
00627                 <span class="keywordflow">for</span> (; *first != 0; ++first)
00628                 {
00629                         <span class="keywordflow">if</span> (*first == <span class="charliteral">'\t'</span>)
00630                         {
00631                                 numCells++;
00632                         }
00633                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (*first == <span class="charliteral">'"'</span> &amp;&amp; first==lines[i])
00634                         {
00635                                 <span class="comment">// read a quoted field.</span>
00636                                 first++;
00637                                 <span class="keywordflow">while</span> (*first != 0 &amp;&amp; *first != <span class="charliteral">'"'</span> &amp;&amp; *(first+1) != 0 &amp;&amp; *(first+1) != <span class="charliteral">'"'</span>)
00638                                 {
00639                                         first++;
00640                                         <span class="keywordflow">if</span> (*first != 0 &amp;&amp; *first == <span class="charliteral">'"'</span>)
00641                                         {
00642                                                 <span class="comment">// skip this</span>
00643                                                 first++;
00644                                         }
00645                                 }
00646                         }
00647                 }
00648                 <span class="comment">// last cell</span>
00649                 numCells++;
00650                 
00651                 <span class="comment">// take max cell of all lines</span>
00652                 newColCount= max(newColCount, numCells);
00653         }
00654 
00655         
00656         <span class="comment">// **** alloc / enlarge worksheet</span>
00657         <span class="comment">// enlarge Worksheet column size, as needed</span>
00658         <span class="keywordflow">while</span> (worksheet.ColCount &lt; newColCount)
00659                 worksheet.insertColumn(worksheet.ColCount);
00660 
00661         <span class="comment">// enlarge Worksheet row size, as needed</span>
00662         <a class="code" href="a04558.html#a15">uint</a>    startLine= worksheet.size();
00663         worksheet.resize(startLine + lines.size());
00664 
00665 
00666         <span class="comment">// **** fill worksheet</span>
00667         <a class="code" href="a03924.html">ucstring</a>        cell;
00668         <span class="keywordflow">for</span> (i=0; i&lt;lines.size(); ++i)
00669         {
00670                 <a class="code" href="a04558.html#a15">uint</a>    numCells;
00671                 numCells= 0;
00672                 cell.erase();
00673                 
00674                 <a class="code" href="a05167.html#a18">ucchar</a>  *first= lines[i];
00675                 <span class="keywordflow">for</span> (; *first != 0; ++first)
00676                 {
00677                         <span class="keywordflow">if</span> (*first == <span class="charliteral">'\t'</span>)
00678                         {
00679 <span class="comment">//                              nldebug("Found cell [%s]", cell.toString().c_str());</span>
00680                                 worksheet.setData(startLine + i, numCells, cell);
00681                                 numCells++;
00682                                 cell.erase();
00683                         }
00684                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (*first == <span class="charliteral">'"'</span> &amp;&amp; first==lines[i])
00685                         {
00686                                 <span class="comment">// read a quoted field.</span>
00687                                 first++;
00688                                 <span class="keywordflow">while</span> (*first != 0 &amp;&amp; *first != <span class="charliteral">'"'</span> &amp;&amp; *(first+1) != 0 &amp;&amp; *(first+1) != <span class="charliteral">'"'</span>)
00689                                 {
00690                                         cell += *first;
00691                                         first++;
00692                                         <span class="keywordflow">if</span> (*first != 0 &amp;&amp; *first == <span class="charliteral">'"'</span>)
00693                                         {
00694                                                 <span class="comment">// skip this</span>
00695                                                 first++;
00696                                         }
00697                                 }
00698                         }
00699                         <span class="keywordflow">else</span>
00700                         {
00701                                 cell += *first;
00702                         }
00703                 }
00704 <span class="comment">//              nldebug("Found cell [%s]", cell.toString().c_str());</span>
00706 <span class="comment"></span>                worksheet.setData(startLine + i, numCells, cell);
00707                 numCells++;
00708                 <a class="code" href="a04199.html#a6">nlassert</a>(numCells&lt;=newColCount);
00709 <span class="comment">//              nldebug("Found %u cells in line %u", numCells, i);</span>
00710         }
00711         
00712 
00713         <span class="comment">// **** identifier uniqueness checking.</span>
00714         <span class="keywordflow">if</span> (checkUnique)
00715         {
00716                 <span class="keywordflow">if</span> (worksheet.size() &gt; 0)
00717                 {
00718                         <span class="comment">// look for the first non '* tagged' or 'DIFF_CMD' column</span>
00719                         <a class="code" href="a04558.html#a15">uint</a> nameCol = 0;
00720                         <span class="keywordflow">while</span> (nameCol &lt; worksheet.ColCount &amp;&amp; (*worksheet.getData(0, nameCol).begin() == <a class="code" href="a05167.html#a11">uint16</a>(<span class="charliteral">'*'</span>) || worksheet.getData(0, nameCol) == <a class="code" href="a03924.html">ucstring</a>(<span class="stringliteral">"DIFF_CMD"</span>)))
00721                                 ++nameCol;
00722 
00723                         <span class="keywordflow">if</span> (nameCol &lt; worksheet.ColCount )
00724                         {
00725                                 <span class="comment">// ok we can check unikness</span>
00726                                 <span class="keywordtype">bool</span> error = <span class="keyword">false</span>;
00727                                 set&lt;ucstring&gt;   unik;
00728                                 set&lt;ucstring&gt;::iterator it;
00729                                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> j=0; j&lt;worksheet.size(); ++j)
00730                                 {
00731                                         it = unik.find(worksheet.getData(j, nameCol)); 
00732                                         <span class="keywordflow">if</span> (it != unik.end())
00733                                         {
00734                                                 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"DT: loadStringFile : identifier '%s' exist twice"</span>, worksheet.getData(j, nameCol).toString().c_str() );
00735                                                 error = <span class="keyword">true</span>;
00736                                         }
00737                                         <span class="keywordflow">else</span>
00738                                                 unik.insert(worksheet.getData(j, nameCol));
00739                                 }
00740                                 <span class="keywordflow">if</span> (error)
00741                                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00742                         }
00743                 }
00744         }
00745         
00746         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00747 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a8" doxytag="STRING_MANAGER::readPhraseFile" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> bool STRING_MANAGER::readPhraseFile </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>std::vector&lt; TPhrase &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>phrases</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>forceRehash</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05634.html#l00279">279</a> of file <a class="el" href="a05634.html">diff_tool.cpp</a>.
<p>
References <a class="el" href="a05635.html#l00073">STRING_MANAGER::TPhrase::Clauses</a>, <a class="el" href="a05635.html#l00064">STRING_MANAGER::TClause::Comments</a>, <a class="el" href="a05635.html#l00072">STRING_MANAGER::TPhrase::Comments</a>, <a class="el" href="a05635.html#l00062">STRING_MANAGER::TClause::Conditions</a>, <a class="el" href="a05635.html#l00074">STRING_MANAGER::TPhrase::HashValue</a>, <a class="el" href="a05635.html#l00061">STRING_MANAGER::TClause::Identifier</a>, <a class="el" href="a05635.html#l00070">STRING_MANAGER::TPhrase::Identifier</a>, <a class="el" href="a05634.html#l00037">makePhraseHash()</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05635.html#l00071">STRING_MANAGER::TPhrase::Parameters</a>, <a class="el" href="a05634.html#l00054">parseHashFromComment()</a>, <a class="el" href="a05635.html#l00063">STRING_MANAGER::TClause::Text</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00280 {
00281         <a class="code" href="a03924.html">ucstring</a> doc;
00282 
00283         CI18N::readTextFile(filename, doc, <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">true</span>);
00284 
00285 <span class="comment">//      CI18N::writeTextFile("test.txt", doc, false);</span>
00286 
00287 <span class="comment">/*      uint8 *buffer = 0;</span>
00288 <span class="comment">        uint    size;</span>
00289 <span class="comment">*/</span>
00290 
00291 <span class="comment">/*      try</span>
00292 <span class="comment">        {</span>
00293 <span class="comment">                CIFile fp(filename);</span>
00294 <span class="comment">                size = fp.getFileSize();</span>
00295 <span class="comment">                buffer = new uint8[size];</span>
00296 <span class="comment">                fp.serialBuffer(buffer, size);</span>
00297 <span class="comment">        }</span>
00298 <span class="comment">        catch(Exception &amp;e)</span>
00299 <span class="comment">        {</span>
00300 <span class="comment">                nlinfo("Can't open file [%s] (%s)\n", filename.c_str(), e.what());</span>
00301 <span class="comment">                return true;</span>
00302 <span class="comment">        }</span>
00303 <span class="comment">*/</span>
00304 <span class="comment">/*      FILE *fp = fopen(filename.c_str(), "rb");</span>
00305 <span class="comment">        if (fp == 0)</span>
00306 <span class="comment">        {</span>
00307 <span class="comment">                nlinfo("Could't not open %s\n", filename.c_str());</span>
00308 <span class="comment">                return true;</span>
00309 <span class="comment">        }</span>
00310 <span class="comment">        uint size = CFile::getFileSize(fp);</span>
00311 <span class="comment">        uint8 *buffer = new uint8[size];</span>
00312 <span class="comment">        fread(buffer, 1, size, fp);</span>
00313 <span class="comment">        fclose(fp);</span>
00314 <span class="comment">*/</span>
00315 <span class="comment">/*      CI18N::readTextBuffer(buffer, size, doc);</span>
00316 <span class="comment">        delete [] buffer;</span>
00317 <span class="comment">*/</span>
00318         std::string lastRead(<span class="stringliteral">"nothing"</span>);
00319 
00320         ucstring::const_iterator first(doc.begin()), last(doc.end());
00321         <span class="keywordflow">while</span> (first != last)
00322         {
00323                 TPhrase phrase;
00324                 <span class="comment">// parse the phrase</span>
00325                 CI18N::skipWhiteSpace(first, last, &amp;phrase.Comments);
00326 
00327                 <span class="keywordflow">if</span> (first == last)
00328                         <span class="keywordflow">break</span>;
00329                 <span class="keywordflow">if</span> (!CI18N::parseLabel(first, last, phrase.Identifier))
00330                 {
00331                         <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"DT: Error parsing phrase identifier after %s\n"</span>, lastRead.c_str());
00332                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00333                 }
00334 <span class="comment">//              nldebug("DT: parsing phrase '%s'", phrase.Identifier.c_str());</span>
00335                 lastRead = phrase.Identifier;
00336                 CI18N::skipWhiteSpace(first, last, &amp;phrase.Comments);
00337                 <span class="keywordflow">if</span> (!CI18N::parseMarkedString(<span class="charliteral">'('</span>, <span class="charliteral">')'</span>, first, last, phrase.Parameters))
00338                 {
00339                         <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"DT: Error parsing parameter list for phrase %s\n"</span>, phrase.Identifier.c_str());
00340                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00341                 }
00342                 CI18N::skipWhiteSpace(first, last, &amp;phrase.Comments);
00343                 <span class="keywordflow">if</span> (first == last || *first != <span class="charliteral">'{'</span>)
00344                 {
00345                         <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"DT: Error parsing block opening '{' in phase %s\n"</span>, phrase.Identifier.c_str());
00346                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00347                 }
00348                 ++first;
00349 
00350                 <a class="code" href="a03924.html">ucstring</a> temp;
00351 
00352                 <span class="keywordflow">while</span> (first != last &amp;&amp; *first != <span class="charliteral">'}'</span>)
00353                 {
00354                         TClause clause;
00355                         <span class="comment">// append the comment preread at previous pass</span>
00356                         clause.Comments = temp;
00357                         temp.erase();
00358                         <span class="comment">// parse the clauses</span>
00359                         CI18N::skipWhiteSpace(first, last, &amp;clause.Comments);
00360                         <span class="keywordflow">if</span> (first == last)
00361                         {
00362                                 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"DT: Found end of file in non closed block for phrase %s\n"</span>, phrase.Identifier.c_str());
00363                                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00364                         }
00365 
00366                         <span class="keywordflow">if</span> (*first == <span class="charliteral">'}'</span>)
00367                                 <span class="keywordflow">break</span>;
00368 
00369                         <span class="comment">// skip the conditionnal expression</span>
00370                         <a class="code" href="a03924.html">ucstring</a> cond;
00371                         <span class="keywordflow">while</span> (first != last &amp;&amp; *first == <span class="charliteral">'('</span>)
00372                         {
00373                                 <span class="keywordflow">if</span> (!CI18N::parseMarkedString(<span class="charliteral">'('</span>, <span class="charliteral">')'</span>, first, last, cond))
00374                                 {
00375                                         <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"DT: Error parsing conditionnal expression in phrase %s, clause %u\n"</span>, phrase.Identifier.c_str(), phrase.Clauses.size()+1);
00376                                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00377                                 }
00378                                 clause.Conditions += <span class="stringliteral">"("</span> + cond + <span class="stringliteral">") "</span>;
00379                                 CI18N::skipWhiteSpace(first, last, &amp;clause.Comments);
00380                         }
00381                         <span class="keywordflow">if</span> (first == last)
00382                         {
00383                                 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"DT: Found end of file in non closed block for phrase %s\n"</span>, phrase.Identifier.c_str());
00384                                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00385                         }
00386                         <span class="comment">// read the idnetifier (if any)</span>
00387                         CI18N::parseLabel(first, last, clause.Identifier);
00388                         CI18N::skipWhiteSpace(first, last, &amp;temp);
00389                         <span class="comment">// read the text</span>
00390                         <span class="keywordflow">if</span> (CI18N::parseMarkedString(<span class="charliteral">'['</span>, <span class="charliteral">']'</span>, first, last, clause.Text))
00391                         {
00392                                 <span class="comment">// the last read comment is for this clause.</span>
00393                                 clause.Comments += temp;
00394                                 temp.erase();
00395                         }
00396                         <span class="keywordflow">else</span>
00397                         {
00398                                 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"DT: Error reading text for clause %u (%s) in  phrase %s\n"</span>, 
00399                                         phrase.Clauses.size()+1, 
00400                                         clause.Identifier.c_str(), 
00401                                         phrase.Identifier.c_str());
00402                                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00403 
00404                         }
00405 
00406                         phrase.Clauses.push_back(clause);
00407                 }
00408                 CI18N::skipWhiteSpace(first, last);
00409                 <span class="keywordflow">if</span> (first == last || *first != <span class="charliteral">'}'</span>)
00410                 {
00411                         <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"DT: Missing block clogin tag '}' in phrase %s\n"</span>, phrase.Identifier.c_str());
00412                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00413                 }
00414                 ++first;
00415 
00416                 <span class="comment">// handle hash value.</span>
00417                 <span class="keywordflow">if</span> (forceRehash || !<a class="code" href="a05383.html#a5">parseHashFromComment</a>(phrase.Comments, phrase.HashValue))
00418                 {
00419                         <span class="comment">// the hash is not in the comment, compute it.</span>
00420                         phrase.HashValue = <a class="code" href="a05383.html#a4">makePhraseHash</a>(phrase);
00421                 }
00422 
00423 <span class="comment">//              nldebug("DT : storing phrase '%s'", phrase.Identifier.c_str());</span>
00424                 phrases.push_back(phrase);
00425         }
00426 
00427         <span class="comment">// check identifier uniqueness</span>
00428         {
00429                 <span class="keywordtype">bool</span> error = <span class="keyword">false</span>;
00430                 set&lt;string&gt;     unik;
00431                 set&lt;string&gt;::iterator it;
00432                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;phrases.size(); ++i)
00433                 {
00434                         it = unik.find(phrases[i].Identifier); 
00435                         <span class="keywordflow">if</span> (it != unik.end())
00436                         {
00437                                 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"DT: loadStringFile : identifier '%s' exist twice"</span>, phrases[i].Identifier.c_str() );
00438                                 error = <span class="keyword">true</span>;
00439                         }
00440                         <span class="keywordflow">else</span>
00441                                 unik.insert(phrases[i].Identifier);
00442                 }
00443                 <span class="keywordflow">if</span> (error)
00444                         <span class="keywordflow">return</span> <span class="keyword">false</span>;
00445         }
00446 
00447         <span class="keywordflow">return</span> <span class="keyword">true</span>;
00448 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="a9" doxytag="STRING_MANAGER::tabLines" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="a03924.html">ucstring</a> STRING_MANAGER::tabLines </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>nbTab</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="a03924.html">ucstring</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>str</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05634.html#l00449">449</a> of file <a class="el" href="a05634.html">diff_tool.cpp</a>.
<p>
References <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05634.html#l00472">preparePhraseFile()</a>.
<p>
<div class="fragment"><pre>00450 {
00451         <a class="code" href="a03924.html">ucstring</a> ret;
00452         <a class="code" href="a03924.html">ucstring</a> tabs;
00453 
00454         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i =0; i&lt;nbTab; ++i)
00455                 tabs.push_back(<span class="charliteral">'\t'</span>);
00456 
00457         ret = tabs;
00458         ucstring::const_iterator first(str.begin()), last(str.end());
00459         <span class="keywordflow">for</span> (; first != last; ++first)
00460         {
00461                 ret += *first;
00462                 <span class="keywordflow">if</span> (*first == <span class="charliteral">'\n'</span>)
00463                         ret += tabs;
00464         }
00465 
00466         <span class="keywordflow">while</span> (ret[ret.size()-1] == <span class="charliteral">'\t'</span>)
00467                 ret = ret.substr(0, ret.size()-1);
00468 
00469         <span class="keywordflow">return</span> ret;
00470 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="a0" doxytag="STRING_MANAGER::nl" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> const <a class="el" href="a03924.html">ucstring</a> <a class="el" href="a05383.html#a0">STRING_MANAGER::nl</a>("\r\n")
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Referenced by <a class="el" href="a05634.html#l00804">prepareExcelSheet()</a>, <a class="el" href="a05634.html#l00472">preparePhraseFile()</a>, <a class="el" href="a05634.html#l00203">prepareStringFile()</a>, and <a class="el" href="a05634.html#l00578">readExcelSheet()</a>.    </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 14:54:11 2004 for NeL by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.6 </small></address>
</body>
</html>