summaryrefslogtreecommitdiffstats
path: root/addon/configgen/configgen.cpp
blob: a94d85284d0b1fe12250f02736e6869c7c97773c (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
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
/******************************************************************************
 *
 * 
 *
 * Copyright (C) 2000 by Joerg Baumann & Dimitri van Heesch.
 *
 * Permission to use, copy, modify, and distribute this software and its
 * documentation under the terms of the GNU General Public License is hereby 
 * granted. No representations are made about the suitability of this software 
 * for any purpose. It is provided "as is" without express or implied warranty.
 * See the GNU General Public License for more details.
 *
 * All output generated with Doxygen is not covered by this license.
 *
 */

// includes

#include "qtbc.h" 
#include <qtextstream.h>
#include <qfile.h>
#include <qlist.h>
#include <qdict.h>
#include <qstrlist.h>
#include <qdatetime.h>

#include <stdio.h>
#include <stdlib.h>

#define MAX_OPTION_LENGTH 23

static QString spaces="                                                ";

void init(); // defined below

// Iterate over all options calling the spezified method
#define FORALL(x) \
{\
  ConfigOption *co=ConfigOption::optionList.first();\
  while (co)\
  {\
    co->x;\
    co=ConfigOption::optionList.next();\
  }\
}

/*! convert a normal string \a s into a string that can be embedded in C code.
 * The \a prefix string will be placed before each string line and the
 * \a postfix string will be placed after each string.
 */
static void stringToC(QTextStream &t,QCString &s,
                      const char *prefix,const char *postfix)
{
  int i=0,l=s.length();
  bool eol=TRUE;
  for (i=0;i<l;i++)
  {
    char c;
    switch ((c=s[i]))
    {
      case '\n':
        t << postfix << endl; 
        eol=TRUE;
        break;
      case '\\':
      case '"':
        if (eol) t << prefix;
        t << "\\" << (char)c;
        eol=FALSE;
        break;
      default:
        if (eol) t << prefix;
        eol=FALSE;
        t << (char)c; 
        break;
    }
  }
  if (!eol) t << postfix << endl;
}

class ConfigBool;

/*! baseclass for options */
class ConfigOption
{
  public:
    static QList<ConfigOption> optionList;
    static QDict<ConfigOption> optionDict;
    QCString getVarName() const { return varName; }

    virtual ~ConfigOption() {}
    
    virtual void printHeader(QTextStream &t)
    {
      t << "  static " << type << " " << varName 
        << "; // " << shortDesc << endl;
    }
    virtual void printStatic(QTextStream &) {}
    virtual void printConfig(QTextStream &t)
    {
      t << type << " Config::" << varName;
      if (!defaultValue.isEmpty()) t << " = \"" << defaultValue << "\"";
      t << ";" << endl;
    }
    virtual void printRules(QTextStream &)
    {
    }
    virtual void printDump(QTextStream &) 
    {
    }
    virtual void printCheck(QTextStream &t)
    {
      // FIXME
      if (!check.isEmpty()) t << check << endl;
    }
    virtual void printInit(QTextStream &t)
    {
      t << "  Config::" << varName << " = " 
        << defaultValue << ";" << endl;
    }
    virtual void printTemplate(QTextStream &t)
    {
      t << "  if (!sl)" << endl;
      t << "  {" << endl;
      t << "    t << \"\\n\";" << endl;
      stringToC(t,longDesc,"    t << \"# ","\\n\";");
      t << "    t << \"\\n\";" << endl;
      t << "  }" << endl;
      t << "  t << \"" << cfgName;
      t << spaces.left(MAX_OPTION_LENGTH-cfgName.length());
      t << "= \";" << endl;
      t << "  " << writeFunc << "(t,Config::" << varName << ");" << endl;
      t << "  t << \"\\n\";" << endl;
    }
    virtual void printSubstEnv(QTextStream &) {}
    virtual void printWidgets(QTextStream &,int) = 0;
    virtual void addDependency(ConfigOption *)
    {
      fprintf(stderr,"Error: dependency add for non boolean option!\n");
    }
    void setDependsOn(ConfigBool *b) { depends=b; }

  protected:
    ConfigOption(const char * var,const char * cfg,const char * value,
                 const char * short_,const char * long_,const char * type_,
                 const char * type2_,const char * writeFunc_
                ):
      varName(var), cfgName(cfg), defaultValue(value), shortDesc(short_),
      longDesc(long_), type(type_), type2(type2_), writeFunc(writeFunc_)
    {
      if (optionDict.find(var)!=0)
      {
        fprintf(stderr,"Error: configuration variable found more than once!\n");
      }
      else
      {
        optionList.append(this);
        optionDict.insert(var,this);
      }
      depends=0;
    }

    void tclQuote(QTextStream &t,const char *s)
    {
      t << "{";
      for (const char *p=s;*p!=0;p++)
      {
        if (strchr("{}",*p)) t << '\\';
        t << (*p);
      }
      t << "} ";
    }

    QCString varName; // name as in Config::name
    QCString cfgName; // name as in cfgfile
    QCString defaultValue; // default value
    QCString shortDesc; // short description
    QCString longDesc;  // long description
    QCString type,type2; //
    QCString writeFunc; //
    QCString check; //
    ConfigBool *depends;
};

QList<ConfigOption> ConfigOption::optionList;
QDict<ConfigOption> ConfigOption::optionDict;

void addDependency(const char *src,const char *dst)
{
  ConfigOption *sopt = ConfigOption::optionDict.find(src);
  ConfigOption *dopt = ConfigOption::optionDict.find(dst);
  if (!sopt)
  {
    fprintf(stderr,"Error: option %s not defined!\n",src); 
  }
  if (!dopt)
  {
    fprintf(stderr,"Error: option %s not defined!\n",dst);
  }
  dopt->addDependency(sopt);
  sopt->setDependsOn((ConfigBool *)dopt);
}


class ConfigInfo : public ConfigOption
{
  public:
    ConfigInfo(const char *var,const char * short_)
      : ConfigOption(var,"","",short_,"","","","") {}
    static void add(const char *var,const char * short_);
    void printHeader(QTextStream &) {}
    void printConfig(QTextStream &) {}
    void printRules(QTextStream &) {}
    virtual void printTemplate(QTextStream &t)
    {
      t << "  if (!sl)" << endl;
      t << "  {" << endl;
      t << "    t << \"\\n\";" << endl;
      t << "  }" << endl;
      t << "  t << \"#---------------------------------------------------------------------------\\n\";" << endl;
      t << "  t << \"# " << shortDesc << "\\n\";" << endl;
      t << "  t << \"#---------------------------------------------------------------------------\\n\";" << endl;
    }
    virtual void printInit(QTextStream &) {}
    virtual void printDump(QTextStream &t) 
    {
      t << "  printf(\"# " << shortDesc << "\\n\");" << endl;
    }
    virtual void printWidgets(QTextStream &t,int pass)
    {
      switch(pass)
      {
        case 0:
          t << "  PageWidget *" << varName << " = new PageWidget( tab, \"" 
            << varName << "\" );" << endl;
          break;
        case 1:
          t << "  " << varName << "->addStretch(1);" << endl;
          break;
        default:
          break;
      }
    }
    QCString getVarName() { return varName; }
};

class ConfigList : public ConfigOption
{
  public:
    enum WidgetType { String, File, Dir, FileAndDir };
    ConfigList(ConfigInfo *parent,const char * var,const char * cfg,const char * value,
               const char * short_,const char * long_, WidgetType w)
      : ConfigOption(var,cfg,value,short_,long_,"QStrList","List","writeStringList"), 
        m_parent(parent),
        m_widgetType(w)
    {
    }
    static void add(const char * var,const char * cfg,const char * value,
                    const char * short_,const char * long_,WidgetType w=String);
    virtual void printRules(QTextStream &t)
    {
      // rule for assignment
      t << "<Start>\"" << cfgName << "\"[ \\t]*\"=\"";
      t << spaces.left(MAX_OPTION_LENGTH-cfgName.length());
      t << "{ BEGIN(GetStrList); l=&Config::" << varName;
      t << "; l->clear(); elemStr=\"\"; }" << endl;

      // rule for appending
      t << "<Start>\"" << cfgName << "\"[ \\t]*\"+=\"";
      t << spaces.left(MAX_OPTION_LENGTH-cfgName.length()-1);
      t << "{ BEGIN(GetStrList); l=&Config::" << varName;
      t << "; elemStr=\"\"; }" << endl;
    }
    virtual void printInit(QTextStream &t)
    {
      t << "  Config::" << varName;
      if (!defaultValue.isEmpty())
      {
        t << " = \"" << defaultValue << "\"";
      }
      else 
      {
        t << ".clear()";
      }
      t << ";" << endl;
    }
    virtual void printDump(QTextStream &t) 
    {
      t << "  {" << endl;
      t << "    char *is=Config::" << varName << ".first();" << endl;
      t << "    while (is)" << endl;
      t << "    {" << endl;
      t << "      printf(\"" << varName << "=`%s'\\n\",is);" << endl;
      t << "      is=Config::" << varName << ".next();" << endl;
      t << "    }" << endl;
      t << "  }" << endl;
    }
    virtual void printSubstEnv(QTextStream &t)
    {
      t << "  substEnvVarsInStrList( Config::" << varName << " );" << endl;
    }
    virtual void printWidgets(QTextStream &t,int pass)
    {
      switch (pass)
      {
        case 0:
          {
            t << "  " << varName << " = new InputStrList( \"" << cfgName 
              << "\", " << m_parent->getVarName() << ", Config::" << varName;
            if (m_widgetType!=String)
            {
              t << ",";
              switch(m_widgetType)
              {
                case File:       t << "InputStrList::ListFile"; break;
                case Dir:        t << "InputStrList::ListDir"; break;
                case FileAndDir: t << "InputStrList::ListFileDir"; break;
                default: break;
              }
            }
            t << " );" << endl;
            t << "  QWhatsThis::add(" << varName << ", " << endl;
            stringToC(t,longDesc,"    \"","\"");
            t << "  );" << endl;
            t << "  connect(" << varName 
              << ",SIGNAL(changed()),this,SIGNAL(changed()));" << endl;
          }
          break;
        case 2:
          {
            t << "    InputStrList *" << varName << ";" << endl; 
          }
          break;
        case 5:
          {
            t << "  " << varName << "->init();" << endl;
          }
          break;
        default:
          break;
      }
    }
  private:
    ConfigInfo *m_parent;
    WidgetType m_widgetType;
};

class ConfigString : public ConfigOption
{
  public:
    enum WidgetType { String, File, Dir };
    ConfigString(ConfigInfo *parent, const char * var,const char * cfg,const char * value,
                 const char * short_,const char * long_, WidgetType w
                )
      : ConfigOption(var,cfg,value,short_,long_,
                     "QCString","String","writeStringValue"
                    ), 
        m_parent(parent), 
        m_widgetType(w)
    {
    }
    
    static void add(const char * var,const char * cfg,const char * value,
                    const char * short_,const char * long_,WidgetType w=String);
    static void addFixedValue(const char *var, const char *value);
    
    virtual void printRules(QTextStream &t)
    {
      t << "<Start>\"" << cfgName << "\"[ \\t]*\"=\"";
      t << spaces.left(MAX_OPTION_LENGTH-cfgName.length());
      t << "{ BEGIN(GetString); s=&Config::" << varName;
      t << "; s->resize(0); }" << endl;
    }
    virtual void printInit(QTextStream &t)
    {
      t << "  Config::" << varName;
      if (!defaultValue.isEmpty()) t << " = \"" << defaultValue << "\"";
      else t << ".resize(0)";
      t << ";" << endl;
    }
    virtual void printDump(QTextStream &t) 
    {
      t << "  printf(\"" << varName << "=`%s'\\n\",Config::" << varName << ".data());" << endl;
    }
    virtual void printSubstEnv(QTextStream &t)
    {
      t << "  substEnvVarsInString( Config::" << varName << " );" << endl;
    }
    virtual void printWidgets(QTextStream &t,int pass)
    {
      switch (pass)
      {
        case 0:
          {
            t << "  " << varName << " = new InputString( \"" << cfgName 
              << "\", " << m_parent->getVarName() << ", Config::" << varName;
            if (m_widgetType!=String || m_values.count()>0)
            {
              t << ",";
              switch (m_widgetType)
              {
                case File:
                  t << "InputString::StringFile"; 
                  break;
                case Dir:
                  t << "InputString::StringDir"; 
                  break;
                default:
                  t << "InputString::StringFixed";
                  break;
              }
            }

            t << " );" << endl;
            t << "  QWhatsThis::add(" << varName << ", " << endl;
            stringToC(t,longDesc,"    \"","\"");
            t << "  );" << endl;
            t << "  connect(" << varName 
              << ",SIGNAL(changed()),this,SIGNAL(changed()));" << endl;
            if (m_values.count()>0)
            {
              char *s = m_values.first();
              while (s)
              {
                t << "  " << varName << "->addValue(\"" << s << "\");" << endl;
                s = m_values.next();
              }
            }
          }  
          break;
        case 2:
          {
            t << "    InputString *" << varName << ";" << endl;
          }
          break;
        case 5:
          {
            t << "  " << varName << "->init();" << endl;
          }
          break;
        default:
          break;
      }
    }
    void addValue(const char *val)
    {
      m_values.append(val);
    }
  private:
    ConfigInfo *m_parent;
    WidgetType m_widgetType;
    QStrList m_values;
};

class ConfigInt : public ConfigOption
{
  public:
    ConfigInt(ConfigInfo *parent,const char * var,const char * cfg,const char * value,
            const char * short_,const char * long_,int minVal,int maxVal)
      : ConfigOption(var,cfg,value,short_,long_,"int     ","Int","writeIntValue"), 
        m_parent(parent), m_minVal(minVal), m_maxVal(maxVal) 
    {
    }
    static void add(const char * var,const char * cfg,const char * value,
                    const char * short_,const char * long_,int minVal,int maxVal);
    virtual void printConfig(QTextStream &t)
    {
      t << type << " Config::" << varName;
      if (!defaultValue.isEmpty()) t << " = " << defaultValue;
      t << ";" << endl;
    }
    virtual void printRules(QTextStream &t)
    {
      t << "<Start>\"" << cfgName << "\"[ \\t]*\"=\"";
      t << spaces.left(MAX_OPTION_LENGTH-cfgName.length());
      t << "{ BEGIN(GetString); s=&" << varName;
      t << "String; s->resize(0); }" << endl;
    }
    virtual void printStatic(QTextStream &t)
    {
      t << "static QCString     " << varName << "String;" << endl;
    }
    virtual void printDump(QTextStream &t) 
    {
      t << "  printf(\"" << varName << "=`%d'\\n\",Config::" << varName << ");" << endl;
    }
    virtual void printWidgets(QTextStream &t,int pass)
    {
      switch (pass)
      {
        case 0:
          {
            t << "  " << varName << " = new InputInt( \"" << cfgName 
              << "\", " << m_parent->getVarName() << ", Config::" 
              << varName << "," << m_minVal << "," << m_maxVal << " );" << endl;
            t << "  QWhatsThis::add(" << varName << ", " << endl;
            stringToC(t,longDesc,"    \"","\"");
            t << "  );" << endl;
            t << "  connect(" << varName 
              << ",SIGNAL(changed()),this,SIGNAL(changed()));" << endl;
          }  
          break;
        case 2:
          {
            t << "    InputInt *" << varName << ";" << endl;
          }
          break;
        case 5:
          {
            t << "  " << varName << "->init();" << endl;
          }
          break;
        default:
          break;
      }
    }
  private:
    ConfigInfo *m_parent;
    int m_minVal;
    int m_maxVal;
}; 

class ConfigBool : public ConfigOption
{
  public:
    ConfigBool(ConfigInfo *parent,const char * var,const char * cfg,const char * value,
               const char * short_,const char * long_)
     : ConfigOption(var,cfg,value,short_,long_,"bool    ","Bool","writeBoolValue"),
       m_parent(parent) {}
    static void add(const char * var,const char * cfg,const char * value,
                  const char * short_,const char * long_);
    virtual void printConfig(QTextStream &t)
    {
      t << type << " Config::" << varName;
      if (!defaultValue.isEmpty()) t << " = " << defaultValue;
      t << ";" << endl;
    }
    virtual void printRules(QTextStream &t)
    {
      t << "<Start>\"" << cfgName << "\"[ \\t]*\"=\"";
      t << spaces.left(MAX_OPTION_LENGTH-cfgName.length());
      t << "{ BEGIN(GetBool); b=&Config::" << varName;
      t << "; }" << endl;
    }
    virtual void printDump(QTextStream &t) 
    {
      t << "  printf(\"" << varName << "=`%d'\\n\",Config::" << varName << ");" << endl;
    }
    virtual void printWidgets(QTextStream &t,int pass)
    {
      switch (pass)
      {
        case 0:
          {
            t << "  " << varName << " = new InputBool( \"" << cfgName 
              << "\", " << m_parent->getVarName() << ", Config::" << varName << " );" << endl;
            t << "  QWhatsThis::add(" << varName << ", " << endl;
            stringToC(t,longDesc,"    \"","\"");
            t << "  );" << endl;
            t << "  connect(" << varName 
              << ",SIGNAL(changed()),this,SIGNAL(changed()));" << endl;
            if (dependencies.count()>0)
            {
              t << "  connect(" << varName << ",SIGNAL(toggled(bool)),SLOT(" 
                << varName << "Toggle(bool)));" << endl;
            }
          }
          break;
        case 1:
          {
            if (dependencies.count()>0)
            {
              t << "  " << varName << "Toggle(Config::" << varName << ");" << endl;
            }
          }
          break;
        case 2:
          {
            t << "    InputBool *" << varName << ";" << endl; 
          }
          break;
        case 3:
          {
            if (dependencies.count()>0)
            {
              t << "    void " << varName << "Toggle(bool);" << endl;
            }
          }
          break;
        case 4:
          {
            if (dependencies.count()>0)
            {
              t << "void ConfigFile::" << varName << "Toggle(bool state)" << endl;
              t << "{" << endl;
              ConfigOption *o=dependencies.first();
              while (o)
              {
                t << "  " << o->getVarName() << "->setEnabled(state);" << endl;
                o=dependencies.next();
              }
              t << "}" << endl << endl;
            }
          }
          break;
        case 5:
          {
            t << "  " << varName << "->init();" << endl;
          }
        default:
          break;
      }
    }
    virtual void addDependency(ConfigOption *o)
    {
      dependencies.append(o);
    }
  private:
    ConfigInfo *m_parent;
    QList<ConfigOption> dependencies;
};

static ConfigInfo *g_lastConfigInfo;

void ConfigList::add(const char * var,const char * cfg,const char * value,
                  const char * short_,const char * long_,WidgetType w)
{
  ConfigOption* o=new ConfigList(g_lastConfigInfo,var,cfg,value,short_,long_,w);
  ASSERT(o!=0);
  ASSERT(g_lastConfigInfo!=0);
  //optionList.append(o);
}

void ConfigString::add(const char * var,const char * cfg,const char * value,
                  const char * short_,const char * long_,WidgetType w)
{
  ConfigOption* o=new ConfigString(g_lastConfigInfo,var,cfg,value,short_,long_,w);
  ASSERT(o!=0);
  ASSERT(g_lastConfigInfo!=0);
  //optionList.append(o);
}

void ConfigInt::add(const char * var,const char * cfg,const char * value,
                  const char * short_,const char * long_,int minVal, int maxVal)
{
  ConfigOption* o=new ConfigInt(g_lastConfigInfo,var,cfg,value,
                                short_,long_,minVal,maxVal);
  ASSERT(o!=0);
  ASSERT(g_lastConfigInfo!=0);
  //optionList.append(o);
}

void ConfigBool::add(const char * var,const char * cfg,const char * value,
                  const char * short_,const char * long_)
{
  ConfigOption* o=new ConfigBool(g_lastConfigInfo,var,cfg,value,short_,long_);
  ASSERT(o!=0);
  ASSERT(g_lastConfigInfo!=0);
  //optionList.append(o);
}

void ConfigInfo::add(const char * var,const char * short_)
{
  g_lastConfigInfo =new ConfigInfo(var,short_);
  ASSERT(g_lastConfigInfo!=0);
  //optionList.append(g_lastConfigInfo);
}

void ConfigString::addFixedValue(const char *var, const char *value)
{
  ConfigString *cs = (ConfigString *)optionDict[var];
  if (cs==0)
  {
    fprintf(stderr,"ConfigString::addFixedValue: unknown variable %s\n",var);
  }
  else
  {
    cs->addValue(value);
  }
}


int main(int argc,char * argv[])
{
  // check arguments
  if (argc!=2) 
  {
    fprintf(stderr,"usage: %s config-template\n",argv[0]);
    exit(1);
  }

  init(); // create options
  QFile ctfile(argv[1]);
  
  // open template file
  if (!ctfile.open(IO_ReadOnly)) 
  {
    fprintf(stderr,"Error: couldn´t open file %s\n",argv[1]);
    exit(1);
  }
  const int maxLineLen=10000;
  char buf[maxLineLen];

  QFile f;
  f.open(IO_WriteOnly,stdout);
  QTextStream t(&f);

  t << "/* This file was generated by configgen on " 
    << QDateTime::currentDateTime().toString()
    << "\n * from " << argv[1] << "\n *\n * DO NOT EDIT!\n */\n\n";
  
  // process template file
  while (!ctfile.atEnd()) 
  {
    int l=ctfile.readLine(buf,maxLineLen-1);
    if (buf[l-2]--'\r') // remove the \r for the folks using Windows
    {
      buf[l-2]='\n';
      buf[l-1]='\r';
    }
    if      (QCString("#CONFIG Config\n"  )==buf) FORALL(printConfig(t))
    else if (QCString("#CONFIG Static\n"  )==buf) FORALL(printStatic(t))
    else if (QCString("#CONFIG Rules\n"   )==buf) FORALL(printRules(t))
    else if (QCString("#CONFIG Dump\n"    )==buf) FORALL(printDump(t))
    else if (QCString("#CONFIG Init\n"    )==buf) FORALL(printInit(t))
    else if (QCString("#CONFIG Template\n")==buf) FORALL(printTemplate(t))
    else if (QCString("#CONFIG Check\n"   )==buf) FORALL(printCheck(t))
    else if (QCString("#CONFIG Header\n"  )==buf) FORALL(printHeader(t))
    else if (QCString("#CONFIG Substenv\n")==buf) FORALL(printSubstEnv(t))
    else if (QCString("#CONFIG Widgets0\n"       )==buf) FORALL(printWidgets(t,0))
    else if (QCString("#CONFIG Widgets1\n"       )==buf) FORALL(printWidgets(t,1))
    else if (QCString("#CONFIG WidgetVars\n"     )==buf) FORALL(printWidgets(t,2))
    else if (QCString("#CONFIG WidgetSlots\n"    )==buf) FORALL(printWidgets(t,3))
    else if (QCString("#CONFIG WidgetSlotImpl\n" )==buf) FORALL(printWidgets(t,4))
    else if (QCString("#CONFIG WidgetInit\n"     )==buf) FORALL(printWidgets(t,5))
    else t << buf;
  }
  ctfile.close();
  return 0;
}

void init()
{
  // option definitions
  //-----------------------------------------------------------------------------------------------
  ConfigInfo::add("General","General configuration options");
  //-----------------------------------------------------------------------------------------------
  
  ConfigString::add("projectName",
                    "PROJECT_NAME",
                    "",
                    "the name of the project",
                    "The PROJECT_NAME tag is a single word (or a sequence of words surrounded \n"
                    "by quotes) that should identify the project. "
                   );
  ConfigString::add("projectNumber",
                    "PROJECT_NUMBER",
                    "",
                    "the number of the project",
                    "The PROJECT_NUMBER tag can be used to enter a project or revision number. \n"
                    "This could be handy for archiving the generated documentation or \n"
                    "if some version control system is used.\n"
                   );
  ConfigString::add("outputDir",
                    "OUTPUT_DIRECTORY",
                    "",
                    "the global output directory",
                    "The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) \n"
                    "base path where the generated documentation will be put. \n"
                    "If a relative path is entered, it will be relative to the location \n"
                    "where doxygen was started. If left blank the current directory will be used.\n",
                    ConfigString::Dir
                   );
  ConfigString::add("outputLanguage",
                    "OUTPUT_LANGUAGE",
                    "English",
                    "the output language",
                    "The OUTPUT_LANGUAGE tag is used to specify the language in which all \n"
                    "documentation generated by doxygen is written. Doxygen will use this \n"
                    "information to generate all constant output in the proper language. \n"
                    "The default language is English, other supported languages are: \n"
                    "Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese, \n"
                    "Korean, Hungarian, Norwegian, Spanish, Romanian, Russian, Croatian, \n"
                    "Polish, Portuguese and Slovene.\n"
                   );
  ConfigString::addFixedValue("outputLanguage","Croatian");
  ConfigString::addFixedValue("outputLanguage","Czech");
  ConfigString::addFixedValue("outputLanguage","Dutch");
  ConfigString::addFixedValue("outputLanguage","English");
  ConfigString::addFixedValue("outputLanguage","French");
  ConfigString::addFixedValue("outputLanguage","Finnish");
  ConfigString::addFixedValue("outputLanguage","German");
  ConfigString::addFixedValue("outputLanguage","Hungarian");
  ConfigString::addFixedValue("outputLanguage","Italian");
  ConfigString::addFixedValue("outputLanguage","Japanese");
  ConfigString::addFixedValue("outputLanguage","Korean");
  ConfigString::addFixedValue("outputLanguage","Norwegian");
  ConfigString::addFixedValue("outputLanguage","Romanian");
  ConfigString::addFixedValue("outputLanguage","Russian");
  ConfigString::addFixedValue("outputLanguage","Polish");
  ConfigString::addFixedValue("outputLanguage","Portuguese");
  ConfigString::addFixedValue("outputLanguage","Slovene");
  ConfigString::addFixedValue("outputLanguage","Spanish");
  ConfigString::addFixedValue("outputLanguage","Swedish");
  ConfigBool::add(  "extractAllFlag",
                    "EXTRACT_ALL",
                    "FALSE",
                    "generate docs for all classes flag",
                    "If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in \n"
                    "documentation are documented, even if no documentation was available. \n"
                    "Private class members and static file members will be hidden unless \n"
                    "the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES \n"
                 );
  ConfigBool::add(  "extractPrivateFlag",
                    "EXTRACT_PRIVATE",
                    "FALSE",
                    "generate docs for private members flag",
                    "If the EXTRACT_PRIVATE tag is set to YES all private members of a class \n"
                    "will be included in the documentation. \n"
                 );
  ConfigBool::add(  "extractStaticFlag",
                    "EXTRACT_STATIC",
                    "FALSE",
                    "generate docs for static members flag",
                    "If the EXTRACT_STATIC tag is set to YES all static members of a file \n"
                    "will be included in the documentation. \n"
                 );
  ConfigBool::add(  "hideMemberFlag",
                    "HIDE_UNDOC_MEMBERS",
                    "FALSE",
                    "hide undocumented members.",
                    "If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all \n"
                    "undocumented members of documented classes, files or namespaces. \n"
                    "If set to NO (the default) these members will be included in the \n"
                    "various overviews, but no documentation section is generated. \n"
                    "This option has no effect if EXTRACT_ALL is enabled. \n"
                 );
  ConfigBool::add(  "hideClassFlag",
                    "HIDE_UNDOC_CLASSES",
                    "FALSE",
                    "hide undocumented members.",
                    "If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all \n"
                    "undocumented classes that are normally visible in the class hierarchy. \n"
                    "If set to NO (the default) these class will be included in the various \n"
                    "overviews. This option has no effect if EXTRACT_ALL is enabled. \n"
                 );
  ConfigBool::add(  "briefMemDescFlag",
                    "BRIEF_MEMBER_DESC",
                    "TRUE",
                    "enable `inline' brief member descr.",
                    "If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will \n"
                    "include brief member descriptions after the members that are listed in \n"
                    "the file and class documentation (similar to JavaDoc). \n"
                    "Set to NO to disable this. \n"
                 );
  ConfigBool::add(  "repeatBriefFlag",
                    "REPEAT_BRIEF",
                    "TRUE",
                    "repeat brief descriptions.",
                    "If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend \n"
                    "the brief description of a member or function before the detailed description. \n"
                    "Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the \n"
                    "brief descriptions will be completely suppressed. \n"
                 );
  ConfigBool::add(  "alwaysDetailsFlag",
                    "ALWAYS_DETAILED_SEC",
                    "FALSE",
                    "show details description even if there is only a brief description?",
                    "If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then \n"
                    "Doxygen will generate a detailed section even if there is only a brief \n"
                    "description. \n"
                 );
  ConfigBool::add(  "fullPathNameFlag",
                    "FULL_PATH_NAMES",
                    "FALSE",
                    "using full path name in output",
                    "If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full \n"
                    "path before files name in the file list and in the header files. If set \n"
                    "to NO the shortest path that makes the file name unique will be used. \n"
                 );
  ConfigList::add(  "stripFromPath",
                    "STRIP_FROM_PATH",
                    "",
                    "list of candidates to strip from the file path",
                    "If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag \n"
                    "can be used to strip a user defined part of the path. Stripping is \n"
                    "only done if one of the specified strings matches the left-hand part of \n"
                    "the path. It is allowed to use relative paths in the argument list.\n"
                 );
  addDependency("stripFromPath","fullPathNameFlag");
  ConfigBool::add(  "internalDocsFlag",
                    "INTERNAL_DOCS",
                    "FALSE",
                    "determines what happens to internal docs.",
                    "The INTERNAL_DOCS tag determines if documentation \n"
                    "that is typed after a \\internal command is included. If the tag is set \n"
                    "to NO (the default) then the documentation will be excluded. \n"
                    "Set it to YES to include the internal documentation. \n"
                 );
  ConfigBool::add(  "classDiagramFlag",
                    "CLASS_DIAGRAMS",
                    "TRUE",
                    "enable the generation of class diagrams.",
                    "If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will \n"
                    "generate a class diagram (in Html and LaTeX) for classes with base or \n"
                    "super classes. Setting the tag to NO turns the diagrams off. \n"
                 );
  ConfigBool::add(  "sourceBrowseFlag",
                    "SOURCE_BROWSER",
                    "FALSE",
                    "include source code in documentation.",
                    "If the SOURCE_BROWSER tag is set to YES then a list of source files will \n"
                    "be generated. Documented entities will be cross-referenced with these sources. \n"
                 );
  ConfigBool::add(  "inlineSourceFlag",
                    "INLINE_SOURCES",
                    "FALSE",
                    "inline the definition bodies in the docs?",
                    "Setting the INLINE_SOURCES tag to YES will include the body \n"
                    "of functions and classes directly in the documentation. \n"
                 );
  ConfigBool::add(  "stripCommentsFlag",
                    "STRIP_CODE_COMMENTS",
                    "TRUE",
                    "strip special comments from code fragments?",
                    "Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct \n"
                    "doxygen to hide any special comment blocks from generated source code \n"
                    "fragments. Normal C and C++ comments will always remain visible. \n"
                 );
  ConfigBool::add(  "caseSensitiveNames",
                    "CASE_SENSE_NAMES",
                    "TRUE",
                    "determines if output can be mixed case.",
                    "If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate \n"
                    "file names in lower case letters. If set to YES upper case letters are also \n"
                    "allowed. This is useful if you have classes or files whose names only differ \n"
                    "in case and if your file system supports case sensitive file names. Windows \n"
                    "users are adviced to set this option to NO.\n"
                 );
  ConfigBool::add(  "hideScopeNames",
                    "HIDE_SCOPE_NAMES",
                    "FALSE",
                    "hide the name of the scope.",
                    "If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen \n"
                    "will show members with their full class and namespace scopes in the \n"
                    "documentation. If set to YES the scope will be hidden. \n"
                 );
  ConfigBool::add(  "verbatimHeaderFlag",
                    "VERBATIM_HEADERS",
                    "TRUE",
                    "enable/disable generation of verb headers.",
                    "If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen \n"
                    "will generate a verbatim copy of the header file for each class for \n"
                    "which an include is specified. Set to NO to disable this. \n"
                 );
  ConfigBool::add(  "showIncFileFlag",
                    "SHOW_INCLUDE_FILES",
                    "TRUE",
                    "show include file in file documentation?",
                    "If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen \n"
                    "will put list of the files that are included by a file in the documentation \n"
                    "of that file. \n"
                 );
  ConfigBool::add(  "autoBriefFlag",
                    "JAVADOC_AUTOBRIEF",
                    "FALSE",
                    "should javadoc comments behaves as Qt comments.",
                    "If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen \n"
                    "will interpret the first line (until the first dot) of a JavaDoc-style \n"
                    "comment as the brief description. If set to NO, the JavaDoc \n"
                    "comments  will behave just like the Qt-style comments (thus requiring an \n"
                    "explict @brief command for a brief description. \n"
                 );
  ConfigBool::add(  "inheritDocsFlag",
                    "INHERIT_DOCS",
                    "TRUE",
                    "inheritance of documentation enabled?",
                    "If the INHERIT_DOCS tag is set to YES (the default) then an undocumented \n"
                    "member inherits the documentation from any documented member that it \n"
                    "reimplements. \n"
                 );
  ConfigBool::add(  "inlineInfoFlag",
                    "INLINE_INFO",
                    "TRUE",
                    "show info about inline members?",
                    "If the INLINE_INFO tag is set to YES (the default) then a tag [inline] \n"
                    "is inserted in the documentation for inline members. \n"
                 );
  ConfigBool::add(  "sortMembersFlag",
                    "SORT_MEMBER_DOCS",
                    "TRUE",
                    "sort members alphabetically?",
                    "If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen \n"
                    "will sort the (detailed) documentation of file and class members \n"
                    "alphabetically by member name. If set to NO the members will appear in \n"
                    "declaration order. \n"
                 );
  ConfigBool::add(  "distributeDocFlag",
                    "DISTRIBUTE_GROUP_DOC",
                    "FALSE",
                    "distribute docs over member group?",
                    "If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC \n"
                    "tag is set to YES, then doxygen will reuse the documentation of the first \n"
                    "member in the group (if any) for the other members of the group. By default \n"
                    "all members of a group must be documented explicitly.\n"  
                 );
  ConfigInt::add(   "tabSize",
                    "TAB_SIZE",
                    "8",
                    "number of spaces in a tab",
                    "The TAB_SIZE tag can be used to set the number of spaces in a tab. \n"
                    "Doxygen uses this value to replace tabs by spaces in code fragments. \n",
                    1,16
                );
  ConfigList::add(  "sectionFilterList",
                    "ENABLED_SECTIONS",
                    "",
                    "list of section filters that are enabled",
                    "The ENABLE_SECTIONS tag can be used to enable conditional \n"
                    "documentation sections, marked by \\if sectionname ... \\endif. \n"
                 );
  ConfigBool::add(  "generateTodoList",
                    "GENERATE_TODOLIST",
                    "TRUE",
                    "do we want a todo list?",
                    "The GENERATE_TODOLIST tag can be used to enable (YES) or \n"
                    "disable (NO) the todo list. This list is created by putting \\todo \n"
                    "commands in the documentation.\n"
                 );
  ConfigBool::add(  "generateTestList",
                    "GENERATE_TESTLIST",
                    "TRUE",
                    "do we want a test list?",
                    "The GENERATE_TESTLIST tag can be used to enable (YES) or \n"
                    "disable (NO) the test list. This list is created by putting \\test \n"
                    "commands in the documentation.\n"
                 );
  ConfigList::add(  "aliasList",
                    "ALIASES",
                    "",
                    "list of aliases",
                    "This tag can be used to specify a number of aliases that acts \n"
                    "as commands in the documentation. An alias has the form \"name=value\". \n"
                    "For example adding \"sideeffect=\\par Side Effects:\\n\" will allow you to \n"
                    "put the command \\sideeffect (or @sideeffect) in the documentation, which \n"
                    "will result in a user defined paragraph with heading \"Side Effects:\". \n"
                    "You can put \\n's in the value part of an alias to insert newlines. \n" 
                 );
  //-----------------------------------------------------------------------------------------------
  ConfigInfo::add(  "Messages","configuration options related to warning and progress messages");
  //-----------------------------------------------------------------------------------------------
  ConfigBool::add(  "quietFlag",
                    "QUIET",
                    "FALSE",
                    "generate progress messages flag",
                    "The QUIET tag can be used to turn on/off the messages that are generated \n"
                    "by doxygen. Possible values are YES and NO. If left blank NO is used. \n"
                 );
  ConfigBool::add(  "warningFlag",
                    "WARNINGS",
                    "TRUE",
                    "generate warnings flag",
                    "The WARNINGS tag can be used to turn on/off the warning messages that are \n"
                    "generated by doxygen. Possible values are YES and NO. If left blank \n"
                    "NO is used. \n"
                 );
  ConfigBool::add(  "warningUndocFlag",
                    "WARN_IF_UNDOCUMENTED",
                    "TRUE",
                    "generate undocumented warnings",
                    "If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings \n"
                    "for undocumented members. If EXTRACT_ALL is set to YES then this flag will \n"
                    "automatically be disabled. \n"
                 );
  ConfigString::add("warnFormat",
                    "WARN_FORMAT",
                    "$file:$line: $text",
                    "format of the warning messages",
                    "The WARN_FORMAT tag determines the format of the warning messages that \n"
                    "doxygen can produce. The string should contain the $file, $line, and $text \n"
                    "tags, which will be replaced by the file and line number from which the \n"
                    "warning originated and the warning text. \n"
                   ); 
  ConfigString::add("warnLogFile",
                    "WARN_LOGFILE",
                    "",
                    "log file to write warning to",
                    "The WARN_LOGFILE tag can be used to specify a file to which warning \n"
                    "and error messages should be written. If left blank the output is written \n"
                    "to stderr. \n"
                   );
  //-----------------------------------------------------------------------------------------------
  ConfigInfo::add(  "Input","configuration options related to the input files");
  //-----------------------------------------------------------------------------------------------
  ConfigList::add(  "inputSources",
                    "INPUT",
                    "",
                    "list of input files",
                    "The INPUT tag can be used to specify the files and/or directories that contain \n"
                    "documented source files. You may enter file names like \"myfile.cpp\" or \n"
                    "directories like \"/usr/src/myproject\". Separate the files or directories \n"
                    "with spaces. \n",
                    ConfigList::FileAndDir
                 );
  ConfigList::add(  "filePatternList",
                    "FILE_PATTERNS",
                    "",
                    "list of file patterns",
                    "If the value of the INPUT tag contains directories, you can use the \n"
                    "FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp \n"
                    "and *.h) to filter out the source-files in the directories. If left \n"
                    "blank all files are included. \n"
                 );
  ConfigBool::add(  "recursiveFlag",
                    "RECURSIVE",
                    "FALSE",
                    "scan directories recursively",
                    "The RECURSIVE tag can be used to turn specify whether or not subdirectories \n"
                    "should be searched for input files as well. Possible values are YES and NO. \n"
                    "If left blank NO is used. \n"
                 );
  ConfigList::add(  "excludeSources",
                    "EXCLUDE",
                    "",
                    "list of files to exclude from the input",
                    "The EXCLUDE tag can be used to specify files and/or directories that should \n"
                    "excluded from the INPUT source files. This way you can easily exclude a \n"
                    "subdirectory from a directory tree whose root is specified with the INPUT tag. \n",
                    ConfigList::FileAndDir
                 );
  ConfigList::add(  "excludePatternList",
                    "EXCLUDE_PATTERNS",
                    "",
                    "list of patterns to exclude from input",
                    "If the value of the INPUT tag contains directories, you can use the \n"
                    "EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude \n"
                    "certain files from those directories. \n"
                 );
  ConfigList::add(  "examplePath",
                    "EXAMPLE_PATH",
                    "",
                    "list of example paths",
                    "The EXAMPLE_PATH tag can be used to specify one or more files or \n"
                    "directories that contain example code fragments that are included (see \n"
                    "the \\include command). \n",
                    ConfigList::Dir
                 );
  ConfigList::add(  "examplePatternList",
                    "EXAMPLE_PATTERNS",
                    "",
                    "list of example patterns",
                    "If the value of the EXAMPLE_PATH tag contains directories, you can use the \n"
                    "EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp \n"
                    "and *.h) to filter out the source-files in the directories. If left \n"
                    "blank all files are included. \n"
                 );
  ConfigList::add(  "imagePath",
                    "IMAGE_PATH",
                    "",
                    "list of image paths",
                    "The IMAGE_PATH tag can be used to specify one or more files or \n"
                    "directories that contain image that are included in the documentation (see \n"
                    "the \\image command). \n",
                    ConfigList::Dir
                 );
  ConfigString::add("inputFilter",
                    "INPUT_FILTER",
                    "",
                    "a filter command that is applied to input files",
                    "The INPUT_FILTER tag can be used to specify a program that doxygen should \n"
                    "invoke to filter for each input file. Doxygen will invoke the filter program \n"
                    "by executing (via popen()) the command <filter> <input-file>, where <filter> \n"
                    "is the value of the INPUT_FILTER tag, and <input-file> is the name of an \n"
                    "input file. Doxygen will then use the output that the filter program writes \n"
                    "to standard output. \n",
                    ConfigString::File
                   );
  ConfigBool::add(  "filterForSourceFlag",
                    "FILTER_SOURCE_FILES",
                    "FALSE",
                    "do we filter source files?",
                    "If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using \n"
                    "INPUT_FILTER) will be used to filter the input files when producing source \n"
                    "files to browse. \n"
                );    
  
  //-----------------------------------------------------------------------------------------------
  ConfigInfo::add(  "Index","configuration options related to the alphabetical class index");
  //-----------------------------------------------------------------------------------------------
  
  ConfigBool::add(  "alphaIndexFlag",
                    "ALPHABETICAL_INDEX",
                    "FALSE",
                    "should an alphabetical index be generated?",
                    "If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index \n"
                    "of all compounds will be generated. Enable this if the project \n"
                    "contains a lot of classes, structs, unions or interfaces. \n"
                 );
  ConfigInt::add(   "colsInAlphaIndex",
                    "COLS_IN_ALPHA_INDEX",
                    "5",
                    "number of columns in the alphabetical index",
                    "If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then \n"
                    "the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns \n"
                    "in which this list will be split (can be a number in the range [1..20]) \n",
                    1,20
                );
  ConfigList::add(  "ignorePrefixList",
                    "IGNORE_PREFIX",
                    "",
                    "list of prefixes to ignore for the alphabetical index",
                    "In case all classes in a project start with a common prefix, all \n"
                    "classes will be put under the same header in the alphabetical index. \n"
                    "The IGNORE_PREFIX tag can be used to specify one or more prefixes that \n"
                    "should be ignored while generating the index headers. \n"
                 );
  //-----------------------------------------------------------------------------------------------
  ConfigInfo::add(  "HTML","configuration options related to the HTML output");
  //-----------------------------------------------------------------------------------------------
  ConfigBool::add(  "generateHtml",
                    "GENERATE_HTML",
                    "TRUE",
                    "generate HTML output",
                    "If the GENERATE_HTML tag is set to YES (the default) Doxygen will \n"
                    "generate HTML output. \n"
                 );
  ConfigString::add("htmlOutputDir",
                    "HTML_OUTPUT",
                    "html",
                    "the directory to put the HTML files",
                    "The HTML_OUTPUT tag is used to specify where the HTML docs will be put. \n"
                    "If a relative path is entered the value of OUTPUT_DIRECTORY will be \n"
                    "put in front of it. If left blank `html' will be used as the default path. \n",
                    ConfigString::Dir
                   );
  addDependency("htmlOutputDir","generateHtml");
  ConfigString::add("headerFile",
                    "HTML_HEADER",
                    "",
                    "the name of the personal HTML header",
                    "The HTML_HEADER tag can be used to specify a personal HTML header for \n"
                    "each generated HTML page. If it is left blank doxygen will generate a \n"
                    "standard header.\n",
                    ConfigString::File
                   );
  addDependency("headerFile","generateHtml");
  ConfigString::add("footerFile",
                    "HTML_FOOTER",
                    "",
                    "the name of the personal HTML footer",
                    "The HTML_FOOTER tag can be used to specify a personal HTML footer for \n"
                    "each generated HTML page. If it is left blank doxygen will generate a \n"
                    "standard footer.\n",
                    ConfigString::File
                   );
  addDependency("footerFile","generateHtml");
  ConfigString::add("htmlStyleSheet",
                    "HTML_STYLESHEET",
                    "",
                    "user defined cascading style sheet",
                    "The HTML_STYLESHEET tag can be used to specify a user defined cascading \n"
                    "style sheet that is used by each HTML page. It can be used to \n"
                    "fine-tune the look of the HTML output. If the tag is left blank doxygen \n"
                    "will generate a default style sheet \n",
                    ConfigString::File
                   );
  addDependency("htmlStyleSheet","generateHtml");
  ConfigBool::add(  "htmlAlignMemberFlag",
                    "HTML_ALIGN_MEMBERS",
                    "TRUE",
                    "align members in HTML using tables.",
                    "If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, \n"
                    "files or namespaces will be aligned in HTML using tables. If set to \n"
                    "NO a bullet list will be used. \n"
                 );
  addDependency("htmlAlignMemberFlag","generateHtml");
  ConfigBool::add(  "htmlHelpFlag",
                    "GENERATE_HTMLHELP",
                    "FALSE",
                    "should html help files be generated?",
                    "If the GENERATE_HTMLHELP tag is set to YES, additional index files \n"
                    "will be generated that can be used as input for tools like the \n"
                    "Microsoft HTML help workshop to generate a compressed HTML help file (.chm) \n"
                    "of the generated HTML documentation. \n"
                 );
  addDependency("htmlHelpFlag","generateHtml");
  ConfigBool::add(  "noIndexFlag",
                    "DISABLE_INDEX",
                    "FALSE",
                    "generate condensed index flag",
                    "The DISABLE_INDEX tag can be used to turn on/off the condensed index at \n"
                    "top of each HTML page. The value NO (the default) enables the index and \n"
                    "the value YES disables it. \n"
                 );
  addDependency("noIndexFlag","generateHtml");
  ConfigInt::add(   "enumValuesPerLine",
                    "ENUM_VALUES_PER_LINE",
                    "4",
                    "number of enum values that are put on one line",
                    "This tag can be used to set the number of enum values (range [1..20]) \n"
                    "that doxygen will group on one line in the generated HTML documentation. \n",
                    1,20
                );
  addDependency("enumValuesPerLine","generateHtml");
  //-----------------------------------------------------------------------------------------------
  ConfigInfo::add(  "LaTeX","configuration options related to the LaTeX output");
  //-----------------------------------------------------------------------------------------------
  ConfigBool::add(  "generateLatex",
                    "GENERATE_LATEX",
                    "TRUE",
                    "generate Latex output",
                    "If the GENERATE_LATEX tag is set to YES (the default) Doxygen will \n"
                    "generate Latex output. \n"
                 );
  ConfigString::add("latexOutputDir",
                    "LATEX_OUTPUT",
                    "latex",
                    "the directory to put the Latex files",
                    "The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. \n"
                    "If a relative path is entered the value of OUTPUT_DIRECTORY will be \n"
                    "put in front of it. If left blank `latex' will be used as the default path. \n",
                    ConfigString::Dir
                   );
  addDependency("latexOutputDir","generateLatex");
  ConfigBool::add(  "compactLatexFlag",
                    "COMPACT_LATEX",
                    "FALSE",
                    "generate compact LaTeX documentation.",
                    "If the COMPACT_LATEX tag is set to YES Doxygen generates more compact \n"
                    "LaTeX documents. This may be useful for small projects and may help to \n"
                    "save some trees in general. \n"
                 );
  addDependency("compactLatexFlag","generateLatex");
  ConfigString::add("paperType",
                    "PAPER_TYPE",
                    "a4wide",
                    "the page type to generate docs for",
                    "The PAPER_TYPE tag can be used to set the paper type that is used \n"
                    "by the printer. Possible values are: a4, a4wide, letter, legal and \n"
                    "executive. If left blank a4wide will be used. \n"
                   );
  ConfigString::addFixedValue("paperType","a4");
  ConfigString::addFixedValue("paperType","a4wide");
  ConfigString::addFixedValue("paperType","letter");
  ConfigString::addFixedValue("paperType","legal");
  ConfigString::addFixedValue("paperType","executive");
  addDependency("paperType","generateLatex");
  ConfigList::add(  "extraPackageList",
                    "EXTRA_PACKAGES",
                    "",
                    "list of extra LaTeX packages.",
                    "The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX \n"
                    "packages that should be included in the LaTeX output. \n"
                 );
  addDependency("extraPackageList","generateLatex");
  ConfigString::add("latexHeaderFile",
                    "LATEX_HEADER",
                    "",
                    "the name of the personal LaTeX header",
                    "The LATEX_HEADER tag can be used to specify a personal LaTeX header for \n"
                    "the generated latex document. The header should contain everything until \n"
                    "the first chapter. If it is left blank doxygen will generate a \n"
                    "standard header. Notice: only use this tag if you know what you are doing! \n",
                    ConfigString::File
                 );
  addDependency("latexHeaderFile","generateLatex");
  ConfigBool::add(  "pdfHyperFlag",
                    "PDF_HYPERLINKS",
                    "FALSE",
                    "generate latex prepared creating hyperlinked pdfs.",
                    "If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated \n"
                    "is prepared for conversion to pdf (using ps2pdf). The pdf file will \n"
                    "contain links (just like the HTML output) instead of page references \n"
                    "This makes the output suitable for online browsing using a pdf viewer. \n"
                 );
  addDependency("pdfHyperFlag","generateLatex");
  ConfigBool::add(  "usePDFLatexFlag",
                    "USE_PDFLATEX",
                    "FALSE",
                    "use pdflatex instead of plain latex",
                    "If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of \n"
                    "plain latex in the generated Makefile. Set this option to YES to get a \n"
                    "higher quality PDF documentation. \n"
                 );   
  addDependency("usePDFLatexFlag","generateLatex");
  ConfigBool::add(  "latexBatchModeFlag",
                    "LATEX_BATCHMODE",
                    "FALSE",
                    "continue after latex errors?",
                    "If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\\\batchmode. \n"
                    "command to the generated LaTeX files. This will instruct LaTeX to keep \n"
                    "running if errors occur, instead of asking the user for help. \n"
                    "This option is also used when generating formulas in HTML. \n"
                 );
  addDependency("latexBatchModeFlag","generateLatex");
  //-----------------------------------------------------------------------------------------------
  ConfigInfo::add(  "RTF","configuration options related to the RTF output");
  //-----------------------------------------------------------------------------------------------
  ConfigBool::add(  "generateRTF",
                    "GENERATE_RTF",
                    "TRUE",
                    "generate RTF flag",
                    "If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output \n"
                    "The RTF output is optimised for Word 97 and may not look very pretty with \n"
                    "other RTF readers or editors.\n"
                 );
  ConfigString::add("rtfOutputDir",
                    "RTF_OUTPUT",
                    "rtf",
                    "the directory to put the RTF files",
                    "The RTF_OUTPUT tag is used to specify where the RTF docs will be put. \n"
                    "If a relative path is entered the value of OUTPUT_DIRECTORY will be \n"
                    "put in front of it. If left blank `rtf' will be used as the default path. \n",
                    ConfigString::Dir
                 );
  addDependency("rtfOutputDir","generateRTF");
  ConfigBool::add(  "compactRTFFlag",
                    "COMPACT_RTF",
                    "FALSE",
                    "generate more compact RTF",
                    "If the COMPACT_RTF tag is set to YES Doxygen generates more compact \n"
                    "RTF documents. This may be useful for small projects and may help to \n"
                    "save some trees in general. \n"
                 );
  addDependency("compactRTFFlag","generateRTF");
  ConfigBool::add(  "rtfHyperFlag",
                    "RTF_HYPERLINKS",
                    "FALSE",
                    "generate hyper links in RTF",
                    "If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated \n"
                    "will contain hyperlink fields. The RTF file will \n"
                    "contain links (just like the HTML output) instead of page references. \n"
                    "This makes the output suitable for online browsing using a WORD or other. \n"
                    "programs which support those fields. \n"
                    "Note: wordpad (write) and others do not support links. \n"
                 );
  addDependency("rtfHyperFlag","generateRTF");
  ConfigString::add("rtfStylesheetFile",
                    "RTF_STYLESHEET_FILE",
                    "",
                    "file to load stylesheet definitions from",
                    "Load stylesheet definitions from file. Syntax is similar to doxygen's \n"
                    "config file, i.e. a series of assigments. You only have to provide \n"
                    "replacements, missing definitions are set to their default value. \n",
                    ConfigString::File
                   );
  addDependency("rtfStylesheetFile","generateRTF");                  
  //-----------------------------------------------------------------------------------------------
  ConfigInfo::add(  "Man","configuration options related to the man page output");
  //-----------------------------------------------------------------------------------------------
  ConfigBool::add(  "generateMan",
                    "GENERATE_MAN",
                    "TRUE",
                    "generate Man pages",
                    "If the GENERATE_MAN tag is set to YES (the default) Doxygen will \n"
                    "generate man pages \n"
                   );
  ConfigString::add("manOutputDir",
                    "MAN_OUTPUT",
                    "man",
                    "the directory to put the man pages",
                    "The MAN_OUTPUT tag is used to specify where the man pages will be put. \n"
                    "If a relative path is entered the value of OUTPUT_DIRECTORY will be \n"
                    "put in front of it. If left blank `man' will be used as the default path. \n",
                    ConfigString::Dir
                   );
  addDependency("manOutputDir","generateMan");
  ConfigString::add("manExtension",
                    "MAN_EXTENSION",
                    ".3",
                    "extension the man page files",
                    "The MAN_EXTENSION tag determines the extension that is added to \n"
                    "the generated man pages (default is the subroutine's section .3) \n"
                   );
  addDependency("manExtension","generateMan");
  //-----------------------------------------------------------------------------------------------
  ConfigInfo::add(  "XML","configuration options related to the XML output");
  //-----------------------------------------------------------------------------------------------
  ConfigBool::add(  "generateXML",
                    "GENERATE_XML",
                    "FALSE",
                    "generate XML output",
                    "If the GENERATE_XML tag is set to YES Doxygen will \n"
                    "generate an XML file that captures the structure of \n"
                    "the code including all documentation. Warning: This feature \n"
                    "is still experimental and very incomplete.\n"
                 );
  //-----------------------------------------------------------------------------------------------
  ConfigInfo::add(  "Preprocessor","Configuration options related to the preprocessor   ");
  //-----------------------------------------------------------------------------------------------
  ConfigBool::add(  "preprocessingFlag",
                    "ENABLE_PREPROCESSING",
                    "TRUE",
                    "enable preprocessing",
                    "If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will \n"
                    "evaluate all C-preprocessor directives found in the sources and include \n"
                    "files. \n"
                 );
  ConfigBool::add(  "macroExpansionFlag",
                    "MACRO_EXPANSION",
                    "FALSE",
                    "expand macros in the source.",
                    "If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro \n"
                    "names in the source code. If set to NO (the default) only conditional \n"
                    "compilation will be performed. Macro expansion can be done in a controlled \n"
                    "way by setting EXPAND_ONLY_PREDEF to YES. \n"
                 );
  addDependency("macroExpansionFlag","preprocessingFlag");
  ConfigBool::add(  "onlyPredefinedFlag",
                    "EXPAND_ONLY_PREDEF",
                    "FALSE",
                    "expand only predefined macros",
                    "If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES \n"
                    "then the macro expansion is limited to the macros specified with the \n"
                    "PREDEFINED and EXPAND_AS_PREDEFINED tags. \n"
                 );
  addDependency("onlyPredefinedFlag","preprocessingFlag");
  ConfigBool::add(  "searchIncludeFlag",
                    "SEARCH_INCLUDES",
                    "TRUE",
                    "search for included files",
                    "If the SEARCH_INCLUDES tag is set to YES (the default) the includes files \n"
                    "in the INCLUDE_PATH (see below) will be search if a #include is found. \n"
                 );
  addDependency("searchIncludeFlag","preprocessingFlag");
  ConfigList::add(  "includePath",
                    "INCLUDE_PATH",
                    "",
                    "list of include paths",
                    "The INCLUDE_PATH tag can be used to specify one or more directories that \n"
                    "contain include files that are not input files but should be processed by \n"
                    "the preprocessor. \n",
                    ConfigList::Dir
                 );
  addDependency("includePath","preprocessingFlag");
  ConfigList::add(  "includeFilePatternList",
                    "INCLUDE_FILE_PATTERNS",
                    "",
                    "list of include file patterns",
                    "You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard \n"
                    "patterns (like *.h and *.hpp) to filter out the header-files in the \n"
                    "directories. If left blank, the patterns specified with FILE_PATTERNS will \n"
                    "be used. \n"
                 );
  addDependency("includeFilePatternList","preprocessingFlag");
  ConfigList::add(  "predefined",
                    "PREDEFINED",
                    "",
                    "list of predefined macro names.",
                    "The PREDEFINED tag can be used to specify one or more macro names that \n"
                    "are defined before the preprocessor is started (similar to the -D option of \n"
                    "gcc). The argument of the tag is a list of macros of the form: name \n"
                    "or name=definition (no spaces). If the definition and the = are \n"
                    "omitted =1 is assumed. \n"
                 );
  addDependency("predefined","preprocessingFlag");
  ConfigList::add(  "expandAsDefinedList",
                    "EXPAND_AS_DEFINED",
                    "",
                    "list of defines to expand",
                    "If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then \n"
                    "this tag can be used to specify a list of macro names that should be expanded. \n"
                    "The macro definition that is found in the sources will be used. \n"
                    "Use the PREDEFINED tag if you want to use a different macro definition. \n" 
                 );
  //-----------------------------------------------------------------------------------------------
  ConfigInfo::add(  "External","Configuration::addtions related to external references   ");
  //-----------------------------------------------------------------------------------------------
  ConfigList::add(  "tagFileList",
                    "TAGFILES",
                    "",
                    "list of tag files",
                    "The TAGFILES tag can be used to specify one or more tagfiles. \n",
                    ConfigList::File
                 );
  ConfigString::add("genTagFile",
                    "GENERATE_TAGFILE",
                    "",
                    "the tag file to generate",
                    "When a file name is specified after GENERATE_TAGFILE, doxygen will create \n"
                    "a tag file that is based on the input files it reads. \n",
                    ConfigString::File
                   );
  ConfigBool::add(  "allExtFlag",
                    "ALLEXTERNALS",
                    "FALSE",
                    "include all external classes flag",
                    "If the ALLEXTERNALS tag is set to YES all external classes will be listed \n"
                    "in the class index. If set to NO only the inherited external classes \n"
                    "will be listed. \n"
                 );
  ConfigString::add("perlPath",
                    "PERL_PATH",
                    "/usr/bin/perl",
                    "the absolute path to perl",
                    "The PERL_PATH should be the absolute path and name of the perl script \n"
                    "interpreter (i.e. the result of `which perl'). \n",
                    ConfigString::Dir
                   );
  //-----------------------------------------------------------------------------------------------
  ConfigInfo::add(  "Dot","Configuration options related to the dot tool   ");
  //-----------------------------------------------------------------------------------------------
  ConfigBool::add(  "haveDotFlag",
                    "HAVE_DOT",
                    "FALSE",
                    "indicates wether or not dot is present",
                    "If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is \n"
                    "available from the path. This tool is part of Graphviz, a graph visualization \n"
                    "toolkit from AT&T and Lucent Bell Labs. The other options in this section \n"
                    "have no effect if this option is set to NO (the default) \n"
                 );
  ConfigBool::add(  "classGraphFlag",
                    "CLASS_GRAPH",
                    "TRUE",
                    "class graph",
                    "If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen \n"
                    "will generate a graph for each documented class showing the direct and \n"
                    "indirect inheritance relations. Setting this tag to YES will force the \n"
                    "the CLASS_DIAGRAMS tag to NO.\n"
                 );
  addDependency("classGraphFlag","haveDotFlag");
  ConfigBool::add(  "collGraphFlag",
                    "COLLABORATION_GRAPH",
                    "TRUE",
                    "collaboration graph",
                    "If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen \n"
                    "will generate a graph for each documented class showing the direct and \n"
                    "indirect implementation dependencies (inheritance, containment, and \n"
                    "class references variables) of the class with other documented classes. \n"
                 );
  addDependency("collGraphFlag","haveDotFlag");
  ConfigBool::add(  "includeGraphFlag",
                    "INCLUDE_GRAPH",
                    "TRUE",
                    "include graph",
                    "If the ENABLE_PREPROCESSING, INCLUDE_GRAPH, and HAVE_DOT tags are set to \n"
                    "YES then doxygen will generate a graph for each documented file showing \n"
                    "the direct and indirect include dependencies of the file with other \n"
                    "documented files. \n"
                 );
  addDependency("includeGraphFlag","haveDotFlag");
  ConfigBool::add(  "includedByGraphFlag",
                    "INCLUDED_BY_GRAPH",
                    "TRUE",
                    "depends on include graph",
                    "If the ENABLE_PREPROCESSING, INCLUDED_BY_GRAPH, and HAVE_DOT tags are set to \n"
                    "YES then doxygen will generate a graph for each documented header file showing \n"
                    "the documented files that directly or indirectly include this file \n"
                 );
  addDependency("includedByGraphFlag","haveDotFlag");
  ConfigBool::add(  "gfxHierarchyFlag",
                    "GRAPHICAL_HIERARCHY",
                    "TRUE",
                    "flag to enable graphical hierarchy",
                    "If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen \n"
                    "will graphical hierarchy of all classes instead of a textual one. \n"
                 );
  addDependency("gfxHierarchyFlag","haveDotFlag");
  ConfigString::add("dotPath",
                    "DOT_PATH",
                    "",
                    "path to the dot tool",
                    "The tag DOT_PATH can be used to specify the path where the dot tool can be \n"
                    "found. If left blank, it is assumed the dot tool can be found on the path. \n",
                    ConfigString::Dir
                   );
  addDependency("dotPath","haveDotFlag");
  ConfigInt::add(   "maxDotGraphWidth",
                    "MAX_DOT_GRAPH_WIDTH",
                    "1024",
                    "max dot graph width",
                    "The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width \n"
                    "(in pixels) of the graphs generated by dot. If a graph becomes larger than \n"
                    "this value, doxygen will try to truncate the graph, so that it fits within \n"
                    "the specified constraint. Beware that most browsers cannot cope with very \n"
                    "large images. \n",
                    100,30000
                );
  addDependency("maxDotGraphWidth","haveDotFlag");
  ConfigInt::add(   "maxDotGraphHeight",
                    "MAX_DOT_GRAPH_HEIGHT",
                    "1024",
                    "max dot graph height",
                    "The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height \n"
                    "(in pixels) of the graphs generated by dot. If a graph becomes larger than \n"
                    "this value, doxygen will try to truncate the graph, so that it fits within \n"
                    "the specified constraint. Beware that most browsers cannot cope with very \n"
                    "large images. \n",
                    100,30000
                );
  addDependency("maxDotGraphHeight","haveDotFlag");
  ConfigBool::add(  "generateLegend",
                    "GENERATE_LEGEND",
                    "TRUE",
                    "generate legend page",
                    "If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will \n"
                    "generate a legend page explaining the meaning of the various boxes and \n"
                    "arrows in the dot generated graphs. \n"
                 );
  addDependency("generateLegend","haveDotFlag");

  //-----------------------------------------------------------------------------------------------
  ConfigInfo::add(  "Search","Configuration::addtions related to the search engine   ");
  //-----------------------------------------------------------------------------------------------
  ConfigBool::add(  "searchEngineFlag",
                    "SEARCHENGINE",
                    "FALSE",
                    "generate search engine flag",
                    "The SEARCHENGINE tag specifies whether or not a search engine should be \n"
                    "used. If set to NO the values of all tags below this one will be ignored. \n"
                 );
  ConfigString::add("cgiName",
                    "CGI_NAME",
                    "search.cgi",
                    "the name of the CGI binary",
                    "The CGI_NAME tag should be the name of the CGI script that \n"
                    "starts the search engine (doxysearch) with the correct parameters. \n"
                    "A script with this name will be generated by doxygen. \n"
                   );
  addDependency("cgiName","searchEngineFlag");
  ConfigString::add("cgiURL",
                    "CGI_URL",
                    "",
                    "the absolute URL to the CGI binary",
                    "The CGI_URL tag should be the absolute URL to the directory where the \n"
                    "cgi binaries are located. See the documentation of your http daemon for \n"
                    "details. \n"
                   );
  addDependency("cgiURL","searchEngineFlag");
  ConfigString::add("docURL",
                    "DOC_URL",
                    "",
                    "the absolute URL to the documentation",
                    "The DOC_URL tag should be the absolute URL to the directory where the \n"
                    "documentation is located. If left blank the absolute path to the \n"
                    "documentation, with file:// prepended to it, will be used. \n"
                   );
  addDependency("docURL","searchEngineFlag");
  ConfigString::add("docAbsPath",
                    "DOC_ABSPATH",
                    "",
                    "the absolute path to the documentation",
                    "The DOC_ABSPATH tag should be the absolute path to the directory where the \n"
                    "documentation is located. If left blank the directory on the local machine \n"
                    "will be used. \n",
                    ConfigString::Dir
                   );
  addDependency("docAbsPath","searchEngineFlag");
  ConfigString::add("binAbsPath",
                    "BIN_ABSPATH",
                    "/usr/local/bin/",
                    "the absolute path to the doxysearch",
                    "The BIN_ABSPATH tag must point to the directory where the doxysearch binary \n"
                    "is installed. \n",
                    ConfigString::Dir
                   );
  addDependency("binAbsPath","searchEngineFlag");
  ConfigList::add(  "extDocPathList",
                    "EXT_DOC_PATHS",
                    "",
                    "list of external doc. directories.",
                    "The EXT_DOC_PATHS tag can be used to specify one or more paths to \n"
                    "documentation generated for other projects. This allows doxysearch to search \n"
                    "the documentation for these projects as well. \n",
                    ConfigList::Dir
                 );
  addDependency("extDocPathList","searchEngineFlag");

  // The IMAGE_PATTERNS tag is now officially obsolete.
}