dochandler.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * $Id$
4  *
5  *
6  * Copyright (C) 1997-2015 by Dimitri van Heesch.
7  *
8  * Permission to use, copy, modify, and distribute this software and its
9  * documentation under the terms of the GNU General Public License is hereby
10  * granted. No representations are made about the suitability of this software
11  * for any purpose. It is provided "as is" without express or implied warranty.
12  * See the GNU General Public License for more details.
13  *
14  */
15 
16 #include <qmap.h>
17 
18 #include "dochandler.h"
19 #include "debug.h"
20 #include "linkedtexthandler.h"
21 
22 
23 //----------------------------------------------------------------------
24 
26 {
27  public:
29  {
30  m_map.insert("see", SimpleSectHandler::See);
31  m_map.insert("return", SimpleSectHandler::Return);
32  m_map.insert("author", SimpleSectHandler::Author);
34  m_map.insert("since", SimpleSectHandler::Since);
35  m_map.insert("date", SimpleSectHandler::Date);
36  m_map.insert("bug", SimpleSectHandler::Bug);
37  m_map.insert("note", SimpleSectHandler::Note);
38  m_map.insert("warning", SimpleSectHandler::Warning);
39  m_map.insert("par", SimpleSectHandler::Par);
40  m_map.insert("deprecated",SimpleSectHandler::Deprecated);
41  m_map.insert("pre", SimpleSectHandler::Pre);
42  m_map.insert("post", SimpleSectHandler::Post);
43  m_map.insert("invariant", SimpleSectHandler::Invar);
44  m_map.insert("remark", SimpleSectHandler::Remark);
45  m_map.insert("attention", SimpleSectHandler::Attention);
46  m_map.insert("todo", SimpleSectHandler::Todo);
47  m_map.insert("test", SimpleSectHandler::Test);
48  m_map.insert("rcs", SimpleSectHandler::RCS);
49  m_map.insert("enumvalues",SimpleSectHandler::EnumValues);
50  m_map.insert("examples", SimpleSectHandler::Examples);
51  }
52  SimpleSectHandler::Types stringToType(const QString &typeStr)
53  {
54  return m_map[typeStr];
55  }
56  private:
58 };
59 
61 {
62  public:
64  {
66  m_map.insert("keyword", HighlightHandler::Keyword);
67  m_map.insert("keywordtype", HighlightHandler::KeywordType);
68  m_map.insert("keywordflow", HighlightHandler::KeywordFlow);
69  m_map.insert("charliteral", HighlightHandler::CharLiteral);
70  m_map.insert("stringliteral", HighlightHandler::StringLiteral);
71  m_map.insert("preprocessor", HighlightHandler::Preprocessor);
72  }
73  HighlightHandler::HighlightKind stringToKind(const QString &kindStr)
74  {
75  return m_map[kindStr];
76  }
77  private:
79 };
80 
83 
85 {
86  s_typeMapper = new TypeNameMapper;
87  s_highlightMapper = new HighlightMapper;
88 }
89 
91 {
92  delete s_typeMapper;
93  delete s_highlightMapper;
94 }
95 
96 //----------------------------------------------------------------------
97 // MarkupHandler
98 //----------------------------------------------------------------------
99 
101  : m_children(children), m_curString(curString),
102  m_curMarkup(IDocMarkup::Normal), m_headingLevel(0)
103 {
106 
108  addEndHandler("emphasis",this,&MarkupHandler::endEmphasis);
109 
110  addStartHandler("computeroutput",this,&MarkupHandler::startComputerOutput);
111  addEndHandler("computeroutput",this,&MarkupHandler::endComputerOutput);
112 
114  addEndHandler("center",this,&MarkupHandler::endCenter);
115 
118 
120  addEndHandler("subscript",this,&MarkupHandler::endSubscript);
121 
123  addEndHandler("superscript",this,&MarkupHandler::endSuperscript);
124 
126  addEndHandler("preformatted",this,&MarkupHandler::endPreformatted);
127 
129  addEndHandler("heading1",this,&MarkupHandler::endHeading1);
130 
132  addEndHandler("heading2",this,&MarkupHandler::endHeading2);
133 
135  addEndHandler("heading3",this,&MarkupHandler::endHeading3);
136 
138  addEndHandler("heading4",this,&MarkupHandler::endHeading4);
139 
141  addEndHandler("heading5",this,&MarkupHandler::endHeading5);
142 
144  addEndHandler("heading6",this,&MarkupHandler::endHeading6);
145 }
146 
148 {
149 }
150 
152 {
153  if (!m_curString.isEmpty())
154  {
156  debug(2,"addTextNode() text=%s markup=%x\n",m_curString.data(),m_curMarkup);
157  m_curString="";
158  }
159 }
160 
161 void MarkupHandler::startBold(const QXmlAttributes & /*attrib*/)
162 {
163  addTextNode();
166 }
167 
169 {
170  addTextNode();
172  m_curMarkup &= ~IDocMarkup::Bold;
173 }
174 
176 {
177  addTextNode();
180 }
181 
183 {
184  addTextNode();
186  m_curMarkup &= ~IDocMarkup::Emphasis;
187 }
188 
190 {
191  addTextNode();
194 }
195 
197 {
198  addTextNode();
200  m_curMarkup &= ~IDocMarkup::ComputerOutput;
201 }
202 
204 {
205  addTextNode();
208 }
209 
211 {
212  addTextNode();
214  m_curMarkup &= ~IDocMarkup::Center;
215 }
216 
218 {
219  addTextNode();
222 }
223 
225 {
226  addTextNode();
228  m_curMarkup &= ~IDocMarkup::SmallFont;
229 }
230 
232 {
233  addTextNode();
236 }
237 
239 {
240  addTextNode();
242  m_curMarkup &= ~IDocMarkup::Subscript;
243 }
244 
246 {
247  addTextNode();
250 }
251 
253 {
254  addTextNode();
256  m_curMarkup &= ~IDocMarkup::Superscript;
257 }
258 
260 {
261  addTextNode();
264 }
265 
267 {
268  addTextNode();
270  m_curMarkup &= ~IDocMarkup::Preformatted;
271 }
272 
274 {
275  addTextNode();
278  m_headingLevel=1;
279 }
280 
282 {
283  addTextNode();
285  m_curMarkup &= ~IDocMarkup::Heading;
286  m_headingLevel=0;
287 }
288 
290 {
291  addTextNode();
294  m_headingLevel=2;
295 }
296 
298 {
299  addTextNode();
301  m_curMarkup &= ~IDocMarkup::Heading;
302  m_headingLevel=0;
303 }
304 
306 {
307  addTextNode();
310  m_headingLevel=3;
311 }
312 
314 {
315  addTextNode();
317  m_curMarkup &= ~IDocMarkup::Heading;
318  m_headingLevel=0;
319 }
320 
322 {
323  addTextNode();
326  m_headingLevel=4;
327 }
328 
330 {
331  addTextNode();
333  m_curMarkup &= ~IDocMarkup::Heading;
334  m_headingLevel=0;
335 }
336 
338 {
339  addTextNode();
342  m_headingLevel=5;
343 }
344 
346 {
347  addTextNode();
349  m_curMarkup &= ~IDocMarkup::Heading;
350  m_headingLevel=0;
351 }
352 
354 {
355  addTextNode();
358  m_headingLevel=6;
359 }
360 
362 {
363  addTextNode();
365  m_curMarkup &= ~IDocMarkup::Heading;
366  m_headingLevel=0;
367 }
368 
369 
370 //----------------------------------------------------------------------
371 // ListItemHandler
372 //----------------------------------------------------------------------
373 
375  : m_parent(parent)
376 {
378 
380 
382 }
383 
385 {
386 }
387 
389 {
390  m_parent->setDelegate(this);
391  debug(2,"start list item handler\n");
392 }
393 
395 {
396  debug(2,"end list item handler\n");
397  m_parent->setDelegate(0);
398 }
399 
401 {
402  ParagraphHandler *parHandler = new ParagraphHandler(this);
403  parHandler->startParagraph(attrib);
404  m_children.append(parHandler);
405 }
406 
408 {
409  return new ListItemIterator(*this);
410 }
411 
412 //----------------------------------------------------------------------
413 // OrderedListHandler
414 //----------------------------------------------------------------------
415 
417 {
421 }
422 
424 {
425 }
426 
428 {
429  m_parent->setDelegate(this);
430 }
431 
433 {
434  m_parent->setDelegate(0);
435 }
436 
438 {
439  ListItemHandler *liHandler = new ListItemHandler(this);
440  liHandler->startListItem(attrib);
441  m_children.append(liHandler);
442 }
443 
445 {
446  return new OrderedListIterator(*this);
447 }
448 
449 //----------------------------------------------------------------------
450 // ItemizedListHandler
451 //----------------------------------------------------------------------
452 
454 {
458 }
459 
461 {
462 }
463 
465 {
466  m_parent->setDelegate(this);
467 }
468 
470 {
471  m_parent->setDelegate(0);
472 }
473 
475 {
476  ListItemHandler *liHandler = new ListItemHandler(this);
477  liHandler->startListItem(attrib);
478  m_children.append(liHandler);
479 }
480 
482 {
483  return new ItemizedListIterator(*this);
484 }
485 
486 //----------------------------------------------------------------------
487 // TocListHandler
488 //----------------------------------------------------------------------
489 
491 {
493  addEndHandler("toclist",this,&TocListHandler::endTocList);
495 }
496 
498 {
499 }
500 
502 {
503  m_parent->setDelegate(this);
504 }
505 
507 {
508  m_parent->setDelegate(0);
509 }
510 
512 {
513  TocItemHandler *tiHandler = new TocItemHandler(this);
514  tiHandler->startTocItem(attrib);
515  m_children.append(tiHandler);
516 }
517 
519 {
520  return new TocListIterator(*this);
521 }
522 
523 //----------------------------------------------------------------------
524 // TocItemHandler
525 //----------------------------------------------------------------------
526 
528 {
529  addEndHandler("tocitem",this,&TocItemHandler::endTocItem);
530 }
531 
533 {
534 }
535 
537 {
538  m_parent->setDelegate(this);
539  m_id = attrib.value("id");
540  m_curString="";
541 }
542 
544 {
546  m_parent->setDelegate(0);
547 }
548 
549 //----------------------------------------------------------------------
550 // ParameterHandler
551 //----------------------------------------------------------------------
552 
554  m_parent(parent)
555 {
556  addEndHandler("parametername",this,&ParameterHandler::endParameterName);
557 }
558 
560 {
561 }
562 
564 {
565  m_parent->setDelegate(this);
566 }
567 
569 {
571  debug(2,"parameter %s\n",m_name.data());
572  m_curString="";
573  m_parent->setDelegate(0);
574 }
575 
576 //----------------------------------------------------------------------
577 // ParameterListHandler
578 //----------------------------------------------------------------------
579 
581  : m_parent(parent)
582 {
584  addStartHandler("parameternamelist");
585  addEndHandler("parameternamelist");
587  addStartHandler("parameterdescription");
588  addEndHandler("parameterdescription");
591  m_description = 0;
592 }
593 
595 {
596  delete m_description;
597 }
598 
600 {
601  m_parent->setDelegate(this);
602 }
603 
605 {
606  m_parent->setDelegate(0);
607 }
608 
610 {
611  ParameterHandler *param = new ParameterHandler(this);
612  m_parameters.append(param);
613  param->startParameterName(attrib);
614 }
615 
617 {
618  m_description = new ParagraphHandler(this);
619  m_description->startParagraph(attrib);
620 }
621 
623 {
624  return new ParameterItemIterator(*this);
625 }
626 
627 //----------------------------------------------------------------------
628 // ParameterListHandler
629 //----------------------------------------------------------------------
630 
632  : m_parent(parent)
633 {
637 }
638 
640 {
641 }
642 
644 {
645  QString kind = attrib.value("kind");
646  if (kind=="retval") m_type=RetVal;
647  else if (kind=="exception") m_type=Exception;
648  else if (kind=="param") m_type=Param;
649  else
650  {
651  debug(1,"Error: invalid parameterlist type: %s\n",kind.data());
652  }
653  debug(2,"parameterlist kind=%s\n",kind.data());
654  m_parent->setDelegate(this);
655 }
656 
658 {
659  m_parent->setDelegate(0);
660 }
661 
663 {
664  ParameterItemHandler *paramItem = new ParameterItemHandler(this);
665  m_paramItems.append(paramItem);
666  paramItem->startParameterItem(attrib);
667 }
668 
670 {
671  return new ParameterListIterator(*this);
672 }
673 
674 //----------------------------------------------------------------------
675 // LinkHandler
676 //----------------------------------------------------------------------
677 
679  : m_parent(parent)
680 {
681  addEndHandler("link",this,&LinkHandler::endLink);
682 }
683 
685 {
686 }
687 
689 {
690  m_parent->setDelegate(this);
691  debug(2,"Start link\n");
692  m_ref = attrib.value("linkend");
693  m_curString="";
694 }
695 
697 {
699  m_curString="";
700  m_parent->setDelegate(0);
701  debug(2,"End link\n");
702 }
703 
704 //----------------------------------------------------------------------
705 // EMailHandler
706 //----------------------------------------------------------------------
707 
709  : m_parent(parent)
710 {
711  addEndHandler("email",this,&EMailHandler::endEMail);
712 }
713 
715 {
716 }
717 
719 {
720  m_parent->setDelegate(this);
721  debug(2,"Start email\n");
722  m_curString="";
723 }
724 
726 {
728  m_curString="";
729  m_parent->setDelegate(0);
730  debug(2,"End email\n");
731 }
732 
733 //----------------------------------------------------------------------
734 // ULinkHandler
735 //----------------------------------------------------------------------
736 
738  : m_parent(parent)
739 {
740  addEndHandler("ulink",this,&ULinkHandler::endULink);
741 }
742 
744 {
745 }
746 
748 {
749  m_parent->setDelegate(this);
750  debug(2,"Start ulink\n");
751  m_url = attrib.value("url");
752  m_curString="";
753 }
754 
756 {
758  m_curString="";
759  m_parent->setDelegate(0);
760  debug(2,"End ulink\n");
761 }
762 
763 //----------------------------------------------------------------------
764 // LineBreakHandler
765 //----------------------------------------------------------------------
766 
768  : m_parent(parent)
769 {
771 }
772 
774 {
775 }
776 
778 {
779  m_parent->setDelegate(this);
780  debug(2,"Start linebreak\n");
781 }
782 
784 {
785  m_parent->setDelegate(0);
786  debug(2,"End linebreak\n");
787 }
788 
789 //----------------------------------------------------------------------
790 // HRulerHandler
791 //----------------------------------------------------------------------
792 
794  : m_parent(parent)
795 {
796  addEndHandler("hruler",this,&HRulerHandler::endHRuler);
797 }
798 
800 {
801 }
802 
804 {
805  m_parent->setDelegate(this);
806  debug(2,"Start hruler\n");
807 }
808 
810 {
811  m_parent->setDelegate(0);
812  debug(2,"End hruler\n");
813 }
814 
815 //----------------------------------------------------------------------
816 // RefHandler
817 //----------------------------------------------------------------------
818 
820  : m_parent(parent)
821 {
822  addEndHandler("ref",this,&RefHandler::endRef);
823 }
824 
826 {
827 }
828 
830 {
831  m_parent->setDelegate(this);
832  m_refId = attrib.value("refid");
833  m_extId = attrib.value("external");
834  ASSERT(attrib.value("kindref")=="compound" ||
835  attrib.value("kindref")=="member");
836  m_targetKind = attrib.value("kindref")=="compound" ? Compound : Member;
837  debug(2,"Start ref refId=%s\n",m_refId.data());
838  m_curString="";
839 }
840 
842 {
844  m_parent->setDelegate(0);
845  debug(2,"End ref: text=`%s'\n",m_linkText.data());
846 }
847 
848 
849 //----------------------------------------------------------------------
850 // TitleHandler
851 //----------------------------------------------------------------------
852 
854  : m_parent(parent)
855 {
860  addEndHandler("title",this,&TitleHandler::endTitle);
861 }
862 
864 {
865  delete m_markupHandler;
866 }
867 
869 {
870  m_parent->setDelegate(this);
871  debug(2,"Start title\n");
872  m_curString="";
873 }
874 
876 {
877  addTextNode();
878  m_parent->setDelegate(0);
879  debug(2,"End title\n");
880 }
881 
883 {
884  if (!m_curString.isEmpty())
885  {
887  new TextNode(
888  m_curString,
891  )
892  );
893  debug(2,"addTextNode() text=\"%s\" markup=%x headingLevel=%d\n",
895  m_curString="";
896  }
897 }
898 
900 {
901  RefHandler *ref = new RefHandler(this);
902  ref->startRef(attrib);
903  m_children.append(ref);
904 }
905 
907 {
908  return new TitleIterator(*this);
909 }
910 
911 //----------------------------------------------------------------------
912 // SimpleSectHandler
913 //----------------------------------------------------------------------
914 
916  : m_parent(parent), m_paragraph(0), m_title(0)
917 {
921 }
922 
924 {
925 }
926 
928 {
929  m_typeString = attrib.value("kind");
930  m_type = s_typeMapper->stringToType(m_typeString);
931  debug(2,"start simple section %s\n",m_typeString.data());
932  m_parent->setDelegate(this);
933 }
934 
936 {
937  debug(2,"end simple section\n");
938  m_parent->setDelegate(0);
939 }
940 
942 {
943  ASSERT(m_title==0);
944  m_title = new TitleHandler(this);
945  m_title->startTitle(attrib);
946 }
947 
949 {
950  ASSERT(m_paragraph==0);
951  m_paragraph = new ParagraphHandler(this);
952  m_paragraph->startParagraph(attrib);
953 }
954 
955 //----------------------------------------------------------------------
956 // VariableListEntryHandler
957 //----------------------------------------------------------------------
958 
960  : m_parent(parent), m_description(0), m_linkedTextHandler(0)
961 {
967 }
968 
970 {
971  delete m_description;
972 }
973 
975 {
976  m_parent->setDelegate(this);
977  debug(2,"start varlistentry\n");
978 }
979 
981 {
982  m_parent->setDelegate(0);
983  debug(2,"end varlistentry\n");
984 }
985 
987 {
988  m_parent->setDelegate(this);
989  debug(2,"start listitem\n");
990 }
991 
993 {
994  m_parent->setDelegate(0);
995  debug(2,"end listitem\n");
996 }
997 
999 {
1000  m_curString="";
1002  m_linkedTextHandler->start("term");
1003 }
1004 
1006 {
1007  delete m_linkedTextHandler;
1008 }
1009 
1011 {
1012  ASSERT(m_description==0);
1013  m_description = new ParagraphHandler(this);
1014  m_description->startParagraph(attrib);
1015 }
1016 
1018 {
1019  return new LinkedTextIterator(m_term);
1020 }
1021 
1022 
1023 //----------------------------------------------------------------------
1024 // VariableListHandler
1025 //----------------------------------------------------------------------
1026 
1028  : m_parent(parent)
1029 {
1034 }
1035 
1037 {
1038 }
1039 
1041 {
1042  m_parent->setDelegate(this);
1043  debug(2,"start variablelist\n");
1044 }
1045 
1047 {
1048  debug(2,"end variablelist\n");
1049  m_parent->setDelegate(0);
1050 }
1051 
1053 {
1055  vle->startVarListEntry(attrib);
1056  m_curEntry = vle;
1057  m_entries.append(vle);
1058 }
1059 
1061 {
1062  ASSERT(m_curEntry!=0);
1063  m_curEntry->startListItem(attrib);
1064 }
1065 
1067 {
1068  return new VariableListIterator(*this);
1069 }
1070 
1071 //----------------------------------------------------------------------
1072 // HighlightHandler
1073 //----------------------------------------------------------------------
1074 
1076  : m_parent(parent)
1077 {
1079  addEndHandler("highlight",this,&HighlightHandler::endHighlight);
1083 }
1084 
1086 {
1087 }
1088 
1090 {
1091  m_hlString = attrib.value("class");
1092  m_hl = s_highlightMapper->stringToKind(m_hlString);
1093  m_curString="";
1094  m_parent->setDelegate(this);
1095  debug(2,"start highlight\n");
1096 }
1097 
1099 {
1100  addTextNode();
1101  debug(2,"end highlight class=`%s'\n",m_hlString.data());
1102  m_parent->setDelegate(0);
1103 }
1104 
1106 {
1107  addTextNode();
1108  RefHandler *rh = new RefHandler(this);
1109  m_children.append(rh);
1110  rh->startRef(attrib);
1111 }
1112 
1114 {
1115  m_curString=" ";
1116  addTextNode();
1117 }
1118 
1120 {
1121  if (!m_curString.isEmpty())
1122  {
1124  debug(2,"addTextNode() text=\"%s\"\n",
1125  m_curString.data());
1126  m_curString="";
1127  }
1128 }
1129 
1131 {
1132  return new HighlightIterator(*this);
1133 }
1134 
1135 //----------------------------------------------------------------------
1136 // CodeLineHandler
1137 //----------------------------------------------------------------------
1138 
1140  : m_parent(parent)
1141 {
1143  addEndHandler("codeline",this,&CodeLineHandler::endCodeLine);
1144  addEndHandler("linenumber",this,&CodeLineHandler::endLineNumber);
1147  m_lineNumber = 0;
1148 }
1149 
1151 {
1152 }
1153 
1155 {
1156  m_parent->setDelegate(this);
1157  debug(2,"start codeline\n");
1158 }
1159 
1161 {
1162  addTextNode();
1163  debug(2,"end codeline\n");
1164  m_parent->setDelegate(0);
1165 }
1166 
1168 {
1169  m_parent->setDelegate(this);
1170  debug(2,"start linenumber\n");
1171  m_lineNumber = attrib.value("line").toInt();
1172  m_refId = attrib.value("refid");
1173 }
1174 
1176 {
1177  m_parent->setDelegate(0);
1178 }
1179 
1181 {
1182  addTextNode();
1183  HighlightHandler *hlh = new HighlightHandler(this);
1184  m_children.append(hlh);
1185  hlh->startHighlight(attrib);
1186 }
1187 
1189 {
1190  addTextNode();
1191  RefHandler *rh = new RefHandler(this);
1192  m_children.append(rh);
1193  rh->startRef(attrib);
1194 }
1195 
1197 {
1198  if (!m_curString.isEmpty())
1199  {
1201  debug(2,"addTextNode() text=\"%s\"\n",
1202  m_curString.data());
1203  m_curString="";
1204  }
1205 }
1206 
1208 {
1209  return new CodeLineIterator(*this);
1210 }
1211 
1212 
1213 //----------------------------------------------------------------------
1214 // ProgramListingHandler
1215 //----------------------------------------------------------------------
1216 
1218  : m_parent(parent)
1219 {
1223 
1226 }
1227 
1229 {
1230 }
1231 
1233 {
1234  m_parent->setDelegate(this);
1235  debug(2,"start programlisting\n");
1236 }
1237 
1239 {
1240  debug(2,"end programlisting\n");
1241  m_parent->setDelegate(0);
1242 }
1243 
1245 {
1246  CodeLineHandler *clh = new CodeLineHandler(this);
1247  m_children.append(clh);
1249  clh->startLineNumber(attrib);
1250 }
1251 
1253 {
1254  CodeLineHandler *clh = 0;
1255  if (!m_hasLineNumber)
1256  {
1257  clh = new CodeLineHandler(this);
1258  m_children.append(clh);
1259  }
1260  else
1261  {
1262  clh = m_children.getLast();
1263  }
1264  ASSERT(clh!=0);
1265  clh->startCodeLine(attrib);
1267 }
1268 
1270 {
1271  return new ProgramListingIterator(*this);
1272 }
1273 
1274 
1275 
1276 //----------------------------------------------------------------------
1277 // FormulaHandler
1278 //----------------------------------------------------------------------
1279 
1281  : m_parent(parent)
1282 {
1283  addEndHandler("formula",this,&FormulaHandler::endFormula);
1284 }
1285 
1287 {
1288 }
1289 
1291 {
1292  m_id = attrib.value("id");
1293  m_curString="";
1294  m_parent->setDelegate(this);
1295 }
1296 
1298 {
1299  m_text = m_curString;
1300  debug(2,"formula id=`%s' text=`%s'\n",m_id.data(),m_text.data());
1301  m_parent->setDelegate(0);
1302 }
1303 
1304 //----------------------------------------------------------------------
1305 // AnchorHandler
1306 //----------------------------------------------------------------------
1307 
1309  : m_parent(parent)
1310 {
1311  addEndHandler("anchor",this,&AnchorHandler::endAnchor);
1312 }
1313 
1315 {
1316 }
1317 
1319 {
1320  m_id = attrib.value("id");
1321  m_parent->setDelegate(this);
1322 }
1323 
1325 {
1326  debug(2,"anchor id=`%s'\n",m_id.data());
1327  m_parent->setDelegate(0);
1328 }
1329 
1330 //----------------------------------------------------------------------
1331 // ImageHandler
1332 //----------------------------------------------------------------------
1333 
1335  : m_parent(parent)
1336 {
1337  addEndHandler("image",this,&ImageHandler::endImage);
1338 }
1339 
1341 {
1342 }
1343 
1345 {
1346  m_name = attrib.value("name");
1347  m_curString="";
1348  m_parent->setDelegate(this);
1349 }
1350 
1352 {
1354  debug(2,"image name=`%s' caption=`%s'\n",m_name.data(),m_caption.data());
1355  m_parent->setDelegate(0);
1356 }
1357 
1358 //----------------------------------------------------------------------
1359 // DotFileHandler
1360 //----------------------------------------------------------------------
1361 
1363  : m_parent(parent)
1364 {
1365  addEndHandler("dotfile",this,&DotFileHandler::endDotFile);
1366 }
1367 
1369 {
1370 }
1371 
1373 {
1374  m_name = attrib.value("name");
1375  m_curString="";
1376  m_parent->setDelegate(this);
1377 }
1378 
1380 {
1382  debug(2,"image name=`%s' caption=`%s'\n",m_name.data(),m_caption.data());
1383  m_parent->setDelegate(0);
1384 }
1385 
1386 //----------------------------------------------------------------------
1387 // IndexEntryHandler
1388 //----------------------------------------------------------------------
1389 
1391  : m_parent(parent)
1392 {
1393  addEndHandler("indexentry",this,&IndexEntryHandler::endIndexEntry);
1397  addEndHandler("secondaryie",this,&IndexEntryHandler::endSecondaryIE);
1398 }
1399 
1401 {
1402 }
1403 
1405 {
1406  debug(2,"start index entry\n");
1407  m_parent->setDelegate(this);
1408 }
1409 
1411 {
1412  debug(2,"index entry primary=`%s' secondary=`%s'\n",
1414  m_parent->setDelegate(0);
1415 }
1416 
1418 {
1419  m_curString="";
1420 }
1421 
1423 {
1425 }
1426 
1428 {
1429  m_curString="";
1430 }
1431 
1433 {
1435 }
1436 
1437 //----------------------------------------------------------------------
1438 // EntryHandler
1439 //----------------------------------------------------------------------
1440 
1442  : m_parent(parent)
1443 {
1445  addEndHandler("entry",this,&EntryHandler::endEntry);
1447 }
1448 
1450 {
1451 }
1452 
1454 {
1455  m_parent->setDelegate(this);
1456 }
1457 
1459 {
1460  m_parent->setDelegate(0);
1461 }
1462 
1464 {
1465  ParagraphHandler *ph = new ParagraphHandler(this);
1466  ph->startParagraph(attrib);
1467  m_children.append(ph);
1468 }
1469 
1471 {
1472  return new EntryIterator(*this);
1473 }
1474 
1475 //----------------------------------------------------------------------
1476 // RowHandler
1477 //----------------------------------------------------------------------
1478 
1480  : m_parent(parent)
1481 {
1483  addEndHandler("row",this,&RowHandler::endRow);
1484  addStartHandler("entry",this,&RowHandler::startEntry);
1485 }
1486 
1488 {
1489 }
1490 
1492 {
1493  m_parent->setDelegate(this);
1494 }
1495 
1497 {
1498  m_parent->setDelegate(0);
1499 }
1500 
1502 {
1503  EntryHandler *eh = new EntryHandler(this);
1504  eh->startEntry(attrib);
1505  m_children.append(eh);
1506 }
1507 
1509 {
1510  return new RowIterator(*this);
1511 }
1512 
1513 //----------------------------------------------------------------------
1514 // TableHandler
1515 //----------------------------------------------------------------------
1516 
1518  : m_parent(parent)
1519 {
1521  addEndHandler("table",this,&TableHandler::endTable);
1524  addEndHandler("caption",this,&TableHandler::endCaption);
1525 }
1526 
1528 {
1529 }
1530 
1532 {
1533  m_parent->setDelegate(this);
1534  m_numColumns = attrib.value("cols").toInt();
1535  debug(2,"table cols=%d\n",m_numColumns);
1536 }
1537 
1539 {
1540  m_parent->setDelegate(0);
1541 }
1542 
1544 {
1545  RowHandler *rh = new RowHandler(this);
1546  rh->startRow(attrib);
1547  m_children.append(rh);
1548 }
1549 
1551 {
1552  m_curString="";
1553 }
1554 
1556 {
1558 }
1559 
1561 {
1562  return new TableIterator(*this);
1563 }
1564 
1565 //----------------------------------------------------------------------
1566 // CopyHandler
1567 //----------------------------------------------------------------------
1568 
1570  : m_parent(parent)
1571 {
1573 
1574  addEndHandler("copydoc",this,&CopyHandler::endCopy);
1575 
1577 }
1578 
1580 {
1581 }
1582 
1584 {
1585  m_parent->setDelegate(this);
1586  debug(2,"start copy handler\n");
1587 }
1588 
1590 {
1591  debug(2,"end copy handler\n");
1592  m_parent->setDelegate(0);
1593 }
1594 
1596 {
1597  ParagraphHandler *parHandler = new ParagraphHandler(this);
1598  parHandler->startParagraph(attrib);
1599  m_children.append(parHandler);
1600 }
1601 
1603 {
1604  return new CopyIterator(*this);
1605 }
1606 
1607 //----------------------------------------------------------------------
1608 // VerbatimHandler
1609 //----------------------------------------------------------------------
1610 
1612  : m_parent(parent), m_type(IDocVerbatim::Invalid)
1613 {
1614  addEndHandler("verbatim",this,&VerbatimHandler::endVerbatim);
1615  addEndHandler("latexonly",this,&VerbatimHandler::endVerbatim);
1616  addEndHandler("htmlonly",this,&VerbatimHandler::endVerbatim);
1617 }
1618 
1620 {
1621 }
1622 
1624 {
1625  m_type = type;
1626  m_parent->setDelegate(this);
1627  m_curString="";
1628 }
1629 
1631 {
1632  m_text = m_curString;
1633  m_parent->setDelegate(0);
1634 }
1635 
1636 
1637 //----------------------------------------------------------------------
1638 // SymbolHandler
1639 //----------------------------------------------------------------------
1640 
1642  : m_parent(parent), m_letter('\0'), m_type(type)
1643 {
1644  addEndHandler("symbol");
1645  switch (type)
1646  {
1647  case IDocSymbol::Invalid: m_typeString="invalid"; break;
1648  case IDocSymbol::Umlaut: m_typeString="umlaut"; break;
1649  case IDocSymbol::Acute: m_typeString="acute"; break;
1650  case IDocSymbol::Grave: m_typeString="grave"; break;
1651  case IDocSymbol::Circ: m_typeString="circ"; break;
1652  case IDocSymbol::Tilde: m_typeString="tilde"; break;
1653  case IDocSymbol::Szlig: m_typeString="szlig"; break;
1654  case IDocSymbol::Cedil: m_typeString="cedil"; break;
1655  case IDocSymbol::Ring: m_typeString="ring"; break;
1656  case IDocSymbol::Nbsp: m_typeString="nbsp"; break;
1657  case IDocSymbol::Copy: m_typeString="copy"; break;
1658  }
1659 }
1660 
1662 {
1663 }
1664 
1666 {
1667  QString ls = attrib.value("char");
1668  if (!ls.isEmpty()) m_letter = ls.latin1()[0];
1669 }
1670 
1671 //----------------------------------------------------------------------
1672 // ParagraphHandler
1673 //----------------------------------------------------------------------
1674 
1676  : m_parent(parent)
1677 {
1679 
1681 
1682  // preformatted
1684 
1686 
1695  // TODO: title
1698  // TODO: heading
1702  // TODO: language???
1704  // TODO: xrefsect
1706 
1725 }
1726 
1728 {
1729  delete m_markupHandler;
1730 }
1731 
1733 {
1734  m_parent->setDelegate(this);
1735  debug(2,"para\n");
1736 }
1737 
1739 {
1740  addTextNode();
1741  debug(2,"end para\n");
1742  m_parent->setDelegate(0);
1743 }
1744 
1746 {
1747  addTextNode();
1748  ItemizedListHandler *listHandler = new ItemizedListHandler(this);
1749  listHandler->startItemizedList(attrib);
1750  m_children.append(listHandler);
1751 }
1752 
1754 {
1755  addTextNode();
1756  OrderedListHandler *listHandler = new OrderedListHandler(this);
1757  listHandler->startOrderedList(attrib);
1758  m_children.append(listHandler);
1759 }
1760 
1762 {
1763  addTextNode();
1764  ParameterListHandler *listHandler = new ParameterListHandler(this);
1765  listHandler->startParameterList(attrib);
1766  m_children.append(listHandler);
1767 }
1768 
1770 {
1771  addTextNode();
1772  SimpleSectHandler *sectHandler = new SimpleSectHandler(this);
1773  sectHandler->startSimpleSect(attrib);
1774  m_children.append(sectHandler);
1775 }
1776 
1778 {
1779  addTextNode();
1780  RefHandler *ref = new RefHandler(this);
1781  ref->startRef(attrib);
1782  m_children.append(ref);
1783 }
1784 
1786 {
1787  addTextNode();
1788  VariableListHandler *vl = new VariableListHandler(this);
1789  vl->startVariableList(attrib);
1790  m_children.append(vl);
1791 }
1792 
1794 {
1795  addTextNode();
1796  HRulerHandler *hr = new HRulerHandler(this);
1797  hr->startHRuler(attrib);
1798  m_children.append(hr);
1799 }
1800 
1802 {
1803  addTextNode();
1804  LineBreakHandler *lb = new LineBreakHandler(this);
1805  lb->startLineBreak(attrib);
1806  m_children.append(lb);
1807 }
1808 
1810 {
1811  addTextNode();
1812  ULinkHandler *uh = new ULinkHandler(this);
1813  uh->startULink(attrib);
1814  m_children.append(uh);
1815 }
1816 
1818 {
1819  addTextNode();
1820  EMailHandler *eh = new EMailHandler(this);
1821  eh->startEMail(attrib);
1822  m_children.append(eh);
1823 }
1824 
1826 {
1827  addTextNode();
1828  LinkHandler *lh = new LinkHandler(this);
1829  lh->startLink(attrib);
1830  m_children.append(lh);
1831 }
1832 
1834 {
1835  addTextNode();
1837  pl->startProgramListing(attrib);
1838  m_children.append(pl);
1839 }
1840 
1842 {
1843  addTextNode();
1844  FormulaHandler *fh = new FormulaHandler(this);
1845  fh->startFormula(attrib);
1846  m_children.append(fh);
1847 }
1848 
1850 {
1851  addTextNode();
1852  ImageHandler *ih = new ImageHandler(this);
1853  ih->startImage(attrib);
1854  m_children.append(ih);
1855 }
1856 
1858 {
1859  addTextNode();
1860  DotFileHandler *df = new DotFileHandler(this);
1861  df->startDotFile(attrib);
1862  m_children.append(df);
1863 }
1864 
1866 {
1867  addTextNode();
1868  IndexEntryHandler *df = new IndexEntryHandler(this);
1869  df->startIndexEntry(attrib);
1870  m_children.append(df);
1871 }
1872 
1874 {
1875  addTextNode();
1876  TableHandler *th = new TableHandler(this);
1877  th->startTable(attrib);
1878  m_children.append(th);
1879 }
1880 
1882 {
1883  addTextNode();
1884  VerbatimHandler *vh = new VerbatimHandler(this);
1886  m_children.append(vh);
1887 }
1888 
1890 {
1891  addTextNode();
1892  VerbatimHandler *vh = new VerbatimHandler(this);
1894  m_children.append(vh);
1895 }
1896 
1898 {
1899  addTextNode();
1900  VerbatimHandler *vh = new VerbatimHandler(this);
1902  m_children.append(vh);
1903 }
1904 
1906 {
1907  addTextNode();
1909  sh->startSymbol(attrib);
1910  m_children.append(sh);
1911 }
1912 
1914 {
1915  addTextNode();
1917  sh->startSymbol(attrib);
1918  m_children.append(sh);
1919 }
1920 
1922 {
1923  addTextNode();
1925  sh->startSymbol(attrib);
1926  m_children.append(sh);
1927 }
1928 
1930 {
1931  addTextNode();
1933  sh->startSymbol(attrib);
1934  m_children.append(sh);
1935 }
1936 
1938 {
1939  addTextNode();
1941  sh->startSymbol(attrib);
1942  m_children.append(sh);
1943 }
1944 
1946 {
1947  addTextNode();
1949  sh->startSymbol(attrib);
1950  m_children.append(sh);
1951 }
1952 
1954 {
1955  addTextNode();
1957  sh->startSymbol(attrib);
1958  m_children.append(sh);
1959 }
1960 
1962 {
1963  addTextNode();
1965  sh->startSymbol(attrib);
1966  m_children.append(sh);
1967 }
1968 
1970 {
1971  addTextNode();
1973  sh->startSymbol(attrib);
1974  m_children.append(sh);
1975 }
1976 
1978 {
1979  addTextNode();
1981  sh->startSymbol(attrib);
1982  m_children.append(sh);
1983 }
1984 
1986 {
1987  addTextNode();
1988  AnchorHandler *ah = new AnchorHandler(this);
1989  ah->startAnchor(attrib);
1990  m_children.append(ah);
1991 }
1992 
1994 {
1995  addTextNode();
1996  CopyHandler *ch = new CopyHandler(this);
1997  ch->startCopy(attrib);
1998  m_children.append(ch);
1999 }
2000 
2002 {
2003  addTextNode();
2004  TocListHandler *th = new TocListHandler(this);
2005  th->startTocList(attrib);
2006  m_children.append(th);
2007 }
2008 
2010 {
2011  if (!m_curString.isEmpty())
2012  {
2014  new TextNode(
2015  m_curString,
2018  )
2019  );
2020  debug(2,"addTextNode() text=\"%s\" markup=%x headingLevel=%d\n",
2022  m_curString="";
2023  }
2024 }
2025 
2027 {
2028  return new ParagraphIterator(*this);
2029 }
2030 
2031 //----------------------------------------------------------------------
2032 // DocSectionHandler
2033 //----------------------------------------------------------------------
2034 
2036  : m_parent(parent), m_internal(0), m_level(level), m_title(0)
2037 {
2038  QString sectionKey;
2043  if (level<6)
2044  {
2045  sectionKey.sprintf("sect%d",level+1);
2047  }
2049  sectionKey.sprintf("sect%d",level);
2051 }
2052 
2054 {
2055 }
2056 
2058 {
2059  m_parent->setDelegate(this);
2060  debug(2,"Start docsection\n");
2061  m_id = attrib.value("id");
2062 }
2063 
2065 {
2066  m_parent->setDelegate(0);
2067  debug(2,"End docsection\n");
2068 }
2069 
2071 {
2072  DocSectionHandler *secHandler = new DocSectionHandler(this,m_level+1);
2073  secHandler->startDocSection(attrib);
2074  m_subsections.append(secHandler);
2075 }
2076 
2078 {
2079  ParagraphHandler *parHandler = new ParagraphHandler(this);
2080  parHandler->startParagraph(attrib);
2081  m_paragraphs.append(parHandler);
2082 }
2083 
2085 {
2087  m_internal->startInternal(attrib);
2088 }
2089 
2091 {
2092  m_title = new TitleHandler(this);
2093  m_title->startTitle(attrib);
2094 }
2095 
2097 {
2098  return new DocSectionParaIterator(*this);
2099 }
2100 
2102 {
2103  return new DocSectionSubIterator(*this);
2104 }
2105 
2107 {
2108  return m_internal;
2109 }
2110 
2111 //----------------------------------------------------------------------
2112 // DocInternal
2113 //----------------------------------------------------------------------
2114 
2116  : m_parent(parent), m_level(level)
2117 {
2121  QString sectionKey;
2122  sectionKey.sprintf("sect%d",level+1);
2125 }
2126 
2128 {
2129 }
2130 
2132 {
2133  m_parent->setDelegate(this);
2134  debug(2,"Start internal\n");
2135 }
2136 
2138 {
2139  m_parent->setDelegate(0);
2140  debug(2,"End internal\n");
2141 }
2142 
2144 {
2145  DocSectionHandler *secHandler = new DocSectionHandler(this,m_level+1);
2146  secHandler->startDocSection(attrib);
2147  m_subsections.append(secHandler);
2148 }
2149 
2151 {
2152  ParagraphHandler *parHandler = new ParagraphHandler(this);
2153  parHandler->startParagraph(attrib);
2154  m_paragraphs.append(parHandler);
2155 }
2156 
2158 {
2159  return new DocInternalParaIterator(*this);
2160 }
2161 
2163 {
2164  return new DocInternalSubIterator(*this);
2165 }
2166 
2167 
2168 //----------------------------------------------------------------------
2169 // DocHandler
2170 //----------------------------------------------------------------------
2171 
2173 {
2175 
2176  addEndHandler("briefdescription",this,&DocHandler::endDoc);
2177  addEndHandler("detaileddescription",this,&DocHandler::endDoc);
2178  addEndHandler("inbodydescription",this,&DocHandler::endDoc);
2179  //addEndHandler("internal"); // TODO: implement this as a section
2180  addStartHandler("internal",this,&DocHandler::startInternal);
2181 
2183  addStartHandler("sect1",this,&DocHandler::startSect1);
2184  addStartHandler("title",this,&DocHandler::startTitle);
2185  //addStartHandler("internal");
2186 }
2187 
2189 {
2190 }
2191 
2192 void DocHandler::startDoc(const QXmlAttributes& /*attrib*/)
2193 {
2194  m_parent->setDelegate(this);
2195  debug(2,"start dochandler\n");
2196 }
2197 
2199 {
2200  debug(2,"end dochandler\n");
2201  m_parent->setDelegate(0);
2202 }
2203 
2205 {
2206  ParagraphHandler *parHandler = new ParagraphHandler(this);
2207  parHandler->startParagraph(attrib);
2208  m_children.append(parHandler);
2209 }
2210 
2212 {
2213  DocSectionHandler *secHandler = new DocSectionHandler(this,1);
2214  secHandler->startDocSection(attrib);
2215  m_children.append(secHandler);
2216 }
2217 
2219 {
2220  TitleHandler *titleHandler = new TitleHandler(this);
2221  titleHandler->startTitle(attrib);
2222  m_children.append(titleHandler);
2223 }
2224 
2226 {
2227  m_internal = new DocInternalHandler(this,1);
2228  m_internal->startInternal(attrib);
2229 }
2230 
2232 {
2233  return new DocIterator(*this);
2234 }
2235 
2237 {
2238  return m_internal;
2239 }
2240 
friend class ParagraphIterator
Definition: dochandler.h:199
virtual ~VariableListEntryHandler()
Definition: dochandler.cpp:969
TocListHandler(IBaseHandler *parent)
Definition: dochandler.cpp:490
IBaseHandler * m_parent
Definition: dochandler.h:995
virtual void startVarListEntry(const QXmlAttributes &attrib)
friend class OrderedListIterator
Definition: dochandler.h:298
virtual void startRef(const QXmlAttributes &)
QList< DocImpl > m_subsections
Definition: dochandler.h:1290
virtual IDocIterator * elements() const
Definition: dochandler.cpp:444
StringImpl m_caption
Definition: dochandler.h:1121
FormulaHandler(IBaseHandler *parent)
virtual IDocIterator * contents() const
QList< DocImpl > m_children
Definition: dochandler.h:312
void startEMail(const QXmlAttributes &attrib)
Definition: dochandler.cpp:718
virtual void startProgramListing(const QXmlAttributes &attrib)
void startEntry(const QXmlAttributes &attrib)
IBaseHandler * m_parent
Definition: dochandler.h:1118
virtual void startItemizedList(const QXmlAttributes &attrib)
Definition: dochandler.cpp:464
ItemizedListHandler(IBaseHandler *parent)
Definition: dochandler.cpp:453
void startFormula(const QXmlAttributes &attrib)
virtual void startTocItem(const QXmlAttributes &attrib)
Definition: dochandler.cpp:511
virtual void startRing(const QXmlAttributes &attrib)
Node representing a list item.
Definition: dochandler.h:264
virtual void startULink(const QXmlAttributes &attrib)
IBaseHandler * m_parent
Definition: dochandler.h:519
virtual void endDoc()
QString & sprintf(const char *format,...)
Definition: qstring.cpp:12719
Node representing an entry in the table entry.
Definition: dochandler.h:1035
virtual IDocIterator * codeElements() const
virtual ~CopyHandler()
virtual void startCodeLine(const QXmlAttributes &)
virtual ILinkedTextIterator * term() const
StringImpl m_text
Definition: dochandler.h:1182
virtual void endBold()
Definition: dochandler.cpp:168
bool isEmpty() const
Definition: qstring.h:682
CodeLineHandler(IBaseHandler *parent)
ProgramListingHandler(IBaseHandler *parent)
virtual ~TocListHandler()
Definition: dochandler.cpp:497
OrderedListHandler(IBaseHandler *parent)
Definition: dochandler.cpp:416
StringImpl m_id
Definition: dochandler.h:972
void dochandler_exit()
Definition: dochandler.cpp:90
virtual void endCopy()
virtual void startSubSection(const QXmlAttributes &attrib)
virtual void endTocItem()
Definition: dochandler.cpp:543
virtual ~ParameterHandler()
Definition: dochandler.cpp:559
QList< ParameterHandler > m_parameters
Definition: dochandler.h:456
virtual void endPreformatted()
Definition: dochandler.cpp:266
IBaseHandler * m_parent
Definition: dochandler.h:1335
Node representing an preformatted section.
Definition: dochandler.h:1166
virtual ~TableHandler()
QList< VariableListEntryHandler > m_entries
Definition: dochandler.h:773
virtual ~AnchorHandler()
virtual void startHeading3(const QXmlAttributes &attrib)
Definition: dochandler.cpp:305
virtual void endParameterList()
Definition: dochandler.cpp:657
virtual void startCirc(const QXmlAttributes &attrib)
virtual void endTitle()
Definition: dochandler.cpp:875
virtual void startSimpleSect(const QXmlAttributes &attrib)
Definition: dochandler.cpp:927
StringImpl m_title
Definition: dochandler.h:375
virtual void startTitle(const QXmlAttributes &attrib)
Definition: dochandler.cpp:941
void append(const type *d)
Definition: qlist.h:73
virtual void startCopy(const QXmlAttributes &attrib)
SimpleSectHandler(IBaseHandler *parent)
Definition: dochandler.cpp:915
EMailHandler(IBaseHandler *parent)
Definition: dochandler.cpp:708
LinkedTextHandler * m_linkedTextHandler
Definition: dochandler.h:744
friend class ParameterItemIterator
Definition: dochandler.h:440
StringImpl m_id
Definition: dochandler.h:374
HighlightHandler::HighlightKind stringToKind(const QString &kindStr)
Definition: dochandler.cpp:73
virtual void startParameterItem(const QXmlAttributes &attrib)
Definition: dochandler.cpp:662
int m_headingLevel
Definition: dochandler.h:179
Handles markup commands in the XML input.
Definition: dochandler.h:135
virtual void endHeading1()
Definition: dochandler.cpp:281
Node representing list of items.
Definition: dochandler.h:383
Node representing a formula.
Definition: dochandler.h:908
ListItemHandler(IBaseHandler *parent)
Definition: dochandler.cpp:374
virtual ~HRulerHandler()
Definition: dochandler.cpp:799
virtual void startFormula(const QXmlAttributes &attrib)
QList< CodeLineHandler > m_children
Definition: dochandler.h:889
IBaseHandler * m_parent
Definition: dochandler.h:1288
virtual void startSubscript(const QXmlAttributes &attrib)
Definition: dochandler.cpp:231
Node representing a line of code.
Definition: dochandler.h:828
StringImpl m_linkText
Definition: dochandler.h:642
friend class DocSectionParaIterator
Definition: dochandler.h:1223
virtual ~RefHandler()
Definition: dochandler.cpp:825
virtual void startTitle(const QXmlAttributes &attrib)
void endRef()
Definition: dochandler.cpp:841
static HighlightMapper * s_highlightMapper
Definition: dochandler.cpp:82
Node representing a list of named items.
Definition: dochandler.h:753
IBaseHandler * m_parent
Definition: dochandler.h:455
TitleHandler * m_title
Definition: dochandler.h:712
StringImpl m_name
Definition: dochandler.h:996
QList< EntryHandler > m_children
Definition: dochandler.h:1083
const bool FALSE
Definition: qglobal.h:370
virtual void startVariableList(const QXmlAttributes &attrib)
ImageHandler(IBaseHandler *parent)
virtual void startHeading5(const QXmlAttributes &attrib)
Definition: dochandler.cpp:337
virtual void startEmphasis(const QXmlAttributes &attrib)
Definition: dochandler.cpp:175
virtual void startTocList(const QXmlAttributes &attrib)
virtual void startCodeLine(const QXmlAttributes &)
static TypeNameMapper * s_typeMapper
Definition: dochandler.cpp:81
virtual ~ImageHandler()
StringImpl m_url
Definition: dochandler.h:593
virtual void startImage(const QXmlAttributes &attrib)
QList< DocImpl > m_children
Definition: dochandler.h:399
DocInternalHandler * m_internal
Definition: dochandler.h:1337
IBaseHandler * m_parent
Definition: dochandler.h:852
IBaseHandler * m_parent
Definition: dochandler.h:567
StringImpl m_text
Definition: dochandler.h:924
virtual void startParameterName(const QXmlAttributes &attrib)
Definition: dochandler.cpp:609
IBaseHandler * m_parent
Definition: dochandler.h:1181
DocInternalHandler(IBaseHandler *parent, int level)
friend class HighlightIterator
Definition: dochandler.h:792
QList< DocImpl > m_paragraphs
Definition: dochandler.h:1289
friend class EntryIterator
Definition: dochandler.h:1037
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
void startIndexEntry(const QXmlAttributes &attrib)
virtual void endParagraph()
virtual IDocIterator * entries() const
virtual IDocIterator * elements() const
Definition: dochandler.cpp:481
virtual void startHighlight(const QXmlAttributes &)
virtual ~TocItemHandler()
Definition: dochandler.cpp:532
virtual void startAnchor(const QXmlAttributes &attrib)
RefHandler(IBaseHandler *parent)
Definition: dochandler.cpp:819
void startParagraph(const QXmlAttributes &attrib)
Node representing a paragraph of text and commands.
Definition: dochandler.h:196
virtual void startParagraph(const QXmlAttributes &attrib)
TableHandler(IBaseHandler *parent)
LinkHandler(IBaseHandler *parent)
Definition: dochandler.cpp:678
virtual ~VerbatimHandler()
QMap< QString, HighlightHandler::HighlightKind > m_map
Definition: dochandler.cpp:78
virtual void startLineNumber(const QXmlAttributes &)
QString value(int index) const
Definition: qxml.cpp:664
friend class RowIterator
Definition: dochandler.h:1069
void endLink()
Definition: dochandler.cpp:696
virtual void startOrderedList(const QXmlAttributes &attrib)
Definition: dochandler.cpp:427
void endHRuler()
Definition: dochandler.cpp:809
virtual void startLineNumber(const QXmlAttributes &)
friend class DocInternalParaIterator
Definition: dochandler.h:1273
ULinkHandler(IBaseHandler *parent)
Definition: dochandler.cpp:737
virtual void startSuperscript(const QXmlAttributes &attrib)
Definition: dochandler.cpp:245
virtual ~ParagraphHandler()
StringImpl m_secondary
Definition: dochandler.h:1026
virtual ~ProgramListingHandler()
virtual IDocIterator * contents() const
Definition: dochandler.cpp:407
Definition: types.h:29
void startImage(const QXmlAttributes &attrib)
QList< DocImpl > m_paragraphs
Definition: dochandler.h:1246
virtual IDocIterator * paragraphs() const
virtual void endParameterName()
Definition: dochandler.cpp:568
virtual IDocIterator * codeElements() const
void startRow(const QXmlAttributes &attrib)
virtual void endInternal()
IBaseHandler * m_parent
Definition: dochandler.h:373
TocItemHandler(IBaseHandler *parent)
Definition: dochandler.cpp:527
QList< DocImpl > m_children
Definition: dochandler.h:672
IndexEntryHandler(IBaseHandler *parent)
virtual void start(const char *endTag)
friend class CodeLineIterator
Definition: dochandler.h:830
Node representing a parameter.
Definition: dochandler.h:414
friend class CopyIterator
Definition: dochandler.h:1138
virtual void endComputerOutput()
Definition: dochandler.cpp:196
QList< DocImpl > m_children
Definition: dochandler.h:280
virtual void endCenter()
Definition: dochandler.cpp:210
IBaseHandler * m_parent
Definition: dochandler.h:428
QList< DocImpl > m_children
Definition: dochandler.h:248
virtual void startParameterItem(const QXmlAttributes &attrib)
Definition: dochandler.cpp:599
int headingLevel() const
Definition: dochandler.h:141
virtual void startParagraph(const QXmlAttributes &attrib)
Definition: dochandler.cpp:400
SimpleSectHandler::Types stringToType(const QString &typeStr)
Definition: dochandler.cpp:52
virtual void startParagraph(const QXmlAttributes &attrib)
Definition: dochandler.cpp:948
void dochandler_init()
Definition: dochandler.cpp:84
virtual void endProgramListing()
virtual void startCopy(const QXmlAttributes &attrib)
virtual ~OrderedListHandler()
Definition: dochandler.cpp:423
StringImpl m_refId
Definition: dochandler.h:640
virtual ~LinkHandler()
Definition: dochandler.cpp:684
virtual ~VariableListHandler()
StringImpl m_refId
Definition: dochandler.h:854
friend class VariableListIterator
Definition: dochandler.h:756
LineBreakHandler(IBaseHandler *parent)
Definition: dochandler.cpp:767
virtual void startCopyDoc(const QXmlAttributes &attrib)
Node representing a change in the markup style.
Definition: dochandler.h:110
virtual void startTitle(const QXmlAttributes &attrib)
Definition: dochandler.cpp:868
virtual void startParagraph(const QXmlAttributes &attrib)
virtual void startGrave(const QXmlAttributes &attrib)
virtual IDocIterator * contents() const
ParameterItemHandler(IBaseHandler *parent)
Definition: dochandler.cpp:580
virtual void startSimpleSect(const QXmlAttributes &attrib)
const char * data() const
Definition: qstring.h:542
IBaseHandler * m_parent
Definition: dochandler.h:247
type * getLast() const
Definition: qlist.h:96
virtual ~SimpleSectHandler()
Definition: dochandler.cpp:923
StringImpl m_typeString
Definition: dochandler.h:711
virtual void startTocItem(const QXmlAttributes &attrib)
Definition: dochandler.cpp:536
virtual IDocIterator * subSections() const
friend class TocListIterator
Definition: dochandler.h:329
friend class ListItemIterator
Definition: dochandler.h:266
Node representing an entry in the table.
Definition: dochandler.h:1099
IBaseHandler * m_parent
Definition: dochandler.h:398
virtual void endLineNumber()
IBaseHandler * m_parent
Definition: dochandler.h:1151
virtual void endVariableList()
virtual void startParagraph(const QXmlAttributes &attrib)
Definition: dochandler.cpp:616
virtual void startSect1(const QXmlAttributes &attrib)
virtual IDocIterator * subSections() const
virtual ~EMailHandler()
Definition: dochandler.cpp:714
Iterator insert(const Key &key, const T &value)
Definition: qmap.h:545
ParagraphHandler(IBaseHandler *parent)
virtual void endCodeLine()
friend class ParameterListIterator
Definition: dochandler.h:475
virtual void startSubSection(const QXmlAttributes &attrib)
void endULink()
Definition: dochandler.cpp:755
IBaseHandler * m_parent
Definition: dochandler.h:971
virtual ~LineBreakHandler()
Definition: dochandler.cpp:773
Node representing a dot file.
Definition: dochandler.h:981
Node representing an entry in the index.
Definition: dochandler.h:1006
HighlightKind m_hl
Definition: dochandler.h:810
void startVerbatim(const QXmlAttributes &attrib, Types type)
virtual ~CodeLineHandler()
void startULink(const QXmlAttributes &attrib)
Definition: dochandler.cpp:747
QList< DocImpl > m_children
Definition: dochandler.h:812
StringImpl m_extId
Definition: dochandler.h:641
StringImpl m_ref
Definition: dochandler.h:543
QList< DocImpl > & m_children
Definition: dochandler.h:176
virtual void startIndexEntry(const QXmlAttributes &attrib)
IBaseHandler * m_parent
Definition: dochandler.h:671
virtual void startDoc(const QXmlAttributes &attrib)
virtual void startHeading2(const QXmlAttributes &attrib)
Definition: dochandler.cpp:289
void startAnchor(const QXmlAttributes &attrib)
EntryHandler(IBaseHandler *parent)
virtual void startSmallFont(const QXmlAttributes &attrib)
Definition: dochandler.cpp:217
void startTable(const QXmlAttributes &attrib)
virtual void startParagraph(const QXmlAttributes &attrib)
QList< DocImpl > m_subsections
Definition: dochandler.h:1247
ParameterListHandler(IBaseHandler *parent)
Definition: dochandler.cpp:631
virtual void setDelegate(QXmlDefaultHandler *delegate)=0
VariableListHandler(IBaseHandler *parent)
virtual IDocIterator * paragraphs() const
virtual void endItemizedList()
Definition: dochandler.cpp:469
virtual IDocInternal * internal() const
virtual void startParameterList(const QXmlAttributes &attrib)
Definition: dochandler.cpp:643
QList< DocImpl > m_children
Definition: dochandler.h:1051
friend class TitleIterator
Definition: dochandler.h:657
void startPrimaryIE(const QXmlAttributes &attrib)
virtual void endHeading4()
Definition: dochandler.cpp:329
IBaseHandler * m_parent
Definition: dochandler.h:809
IBaseHandler * m_parent
Definition: dochandler.h:592
virtual void startParagraph(const QXmlAttributes &attrib)
QMap< QString, SimpleSectHandler::Types > m_map
Definition: dochandler.cpp:57
virtual void startItemizedListItem(const QXmlAttributes &attrib)
Definition: dochandler.cpp:474
virtual ~TitleHandler()
Definition: dochandler.cpp:863
DocHandler(IBaseHandler *parent)
virtual ~ParameterListHandler()
Definition: dochandler.cpp:639
virtual ~IndexEntryHandler()
Node representing table of contents list.
Definition: dochandler.h:327
IBaseHandler * m_parent
Definition: dochandler.h:279
void endRow()
QList< LinkedTextImpl > m_term
Definition: dochandler.h:742
void startRef(const QXmlAttributes &attrib)
Definition: dochandler.cpp:829
RowHandler(IBaseHandler *parent)
VariableListEntryHandler(IBaseHandler *parent)
Definition: dochandler.cpp:959
IBaseHandler * m_parent
Definition: dochandler.h:772
StringImpl m_address
Definition: dochandler.h:568
VerbatimHandler(IBaseHandler *parent)
QList< DocImpl > m_children
Definition: dochandler.h:343
virtual void endEmphasis()
Definition: dochandler.cpp:182
virtual void startSpace(const QXmlAttributes &)
IBaseHandler * m_parent
Definition: dochandler.h:888
MarkupHandler * m_markupHandler
Definition: dochandler.h:249
Node representing a table of contents item.
Definition: dochandler.h:358
virtual void endHeading3()
Definition: dochandler.cpp:313
virtual void startItemizedList(const QXmlAttributes &attrib)
IBaseHandler * m_parent
Definition: dochandler.h:542
virtual void startRef(const QXmlAttributes &)
virtual ~FormulaHandler()
virtual void startLink(const QXmlAttributes &attrib)
void startLineBreak(const QXmlAttributes &attrib)
Definition: dochandler.cpp:777
virtual void startNbsp(const QXmlAttributes &attrib)
QList< DocImpl > m_children
Definition: dochandler.h:1336
IBaseHandler * m_parent
Definition: dochandler.h:342
virtual void startParameterList(const QXmlAttributes &attrib)
virtual void startCenter(const QXmlAttributes &attrib)
Definition: dochandler.cpp:203
virtual void startTocList(const QXmlAttributes &attrib)
Definition: dochandler.cpp:501
virtual IDocIterator * rows() const
StringImpl m_primary
Definition: dochandler.h:1025
IBaseHandler * m_parent
Definition: dochandler.h:1208
virtual void startListItem(const QXmlAttributes &attrib)
void startEntry(const QXmlAttributes &attrib)
virtual void endHeading5()
Definition: dochandler.cpp:345
Iterates over a list of ILinkedText fragments.
Definition: doxmlintf.h:97
virtual void endSuperscript()
Definition: dochandler.cpp:252
virtual void startListItem(const QXmlAttributes &attrib)
Definition: dochandler.cpp:388
virtual IDocIterator * elements() const
Definition: dochandler.cpp:518
void addTextNode()
Definition: dochandler.cpp:882
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
virtual void endParameterItem()
Definition: dochandler.cpp:604
void startHRuler(const QXmlAttributes &attrib)
Definition: dochandler.cpp:803
virtual IDocIterator * entries() const
virtual void startOrderedList(const QXmlAttributes &attrib)
ParagraphHandler * m_description
Definition: dochandler.h:743
StringImpl m_id
Definition: dochandler.h:1249
StringImpl m_caption
Definition: dochandler.h:949
QList< DocImpl > m_children
Definition: dochandler.h:1152
virtual void endSimpleSect()
Definition: dochandler.cpp:935
virtual void endTocList()
Definition: dochandler.cpp:506
virtual IDocIterator * params() const
Definition: dochandler.cpp:669
SymbolHandler(IBaseHandler *parent, Types type)
Definition: types.h:38
virtual void startComputerOutput(const QXmlAttributes &attrib)
Definition: dochandler.cpp:189
virtual int level() const
Definition: dochandler.h:1238
virtual void startParagraph(const QXmlAttributes &attrib)
#define Comment
Node representing an image.
Definition: dochandler.h:933
virtual ~DocSectionHandler()
virtual void startHRuler(const QXmlAttributes &attrib)
friend class ProgramListingIterator
Definition: dochandler.h:873
IBaseHandler * m_parent
Definition: dochandler.h:947
virtual Types type() const
Definition: dochandler.h:1178
StringImpl m_typeString
Definition: dochandler.h:1211
VariableListEntryHandler * m_curEntry
Definition: dochandler.h:774
IBaseHandler * m_parent
Definition: dochandler.h:311
virtual void startParagraph(const QXmlAttributes &attrib)
AnchorHandler(IBaseHandler *parent)
DotFileHandler(IBaseHandler *parent)
void endCaption()
virtual void startHtmlOnly(const QXmlAttributes &attrib)
virtual void startOrderedListItem(const QXmlAttributes &attrib)
Definition: dochandler.cpp:437
void startSymbol(const QXmlAttributes &attrib)
virtual IDocIterator * contents() const
void startHighlight(const QXmlAttributes &attrib)
virtual void startProgramListing(const QXmlAttributes &attrib)
virtual ~EntryHandler()
virtual void endListItem()
Definition: dochandler.cpp:394
StringImpl m_caption
Definition: dochandler.h:997
virtual ~DotFileHandler()
HighlightHandler(IBaseHandler *parent)
virtual void endHeading6()
Definition: dochandler.cpp:361
friend class ItemizedListIterator
Definition: dochandler.h:385
friend class DocIterator
Definition: dochandler.h:1317
void setFallBackHandler(IFallBackHandler *h)
Definition: basehandler.h:261
DocInternalHandler * m_internal
Definition: dochandler.h:1248
TitleHandler * m_title
Definition: dochandler.h:1251
virtual void startTitle(const QXmlAttributes &attrib)
StringImpl m_text
Definition: dochandler.h:544
Node representing list of items.
Definition: dochandler.h:296
virtual void startRef(const QXmlAttributes &attrib)
Node representing a piece of text.
Definition: dochandler.h:86
virtual void startEMail(const QXmlAttributes &attrib)
virtual void startTerm(const QXmlAttributes &attrib)
Definition: dochandler.cpp:998
virtual void endVarListEntry()
Definition: dochandler.cpp:980
virtual ~SymbolHandler()
virtual void startUmlaut(const QXmlAttributes &attrib)
int toInt(bool *ok=0, int base=10) const
Definition: qstring.cpp:14045
IBaseHandler * m_parent
Definition: dochandler.h:1024
virtual void startLatexOnly(const QXmlAttributes &attrib)
StringImpl m_name
Definition: dochandler.h:948
const char * latin1() const
Definition: qstring.cpp:14457
virtual Kind kind() const
Definition: dochandler.h:484
QList< RowHandler > m_children
Definition: dochandler.h:1119
The QXmlAttributes class provides XML attributes.
Definition: qxml.h:128
virtual void startBold(const QXmlAttributes &attrib)
Definition: dochandler.cpp:161
virtual ~ListItemHandler()
Definition: dochandler.cpp:384
ParagraphHandler * m_paragraph
Definition: dochandler.h:709
IBaseHandler * m_parent
Definition: dochandler.h:922
StringImpl m_id
Definition: dochandler.h:923
virtual void startHeading6(const QXmlAttributes &attrib)
Definition: dochandler.cpp:353
friend class TableIterator
Definition: dochandler.h:1101
QList< DocImpl > m_children
Definition: dochandler.h:855
virtual void startRef(const QXmlAttributes &attrib)
Definition: dochandler.cpp:899
virtual IDocIterator * contents() const
virtual void startTable(const QXmlAttributes &attrib)
virtual void startDocSection(const QXmlAttributes &attrib)
void endEMail()
Definition: dochandler.cpp:725
void addStartHandler(const char *key)
Definition: basehandler.h:91
virtual void endSubscript()
Definition: dochandler.cpp:238
virtual ~DocInternalHandler()
IBaseHandler * m_parent
Definition: dochandler.h:741
void startLink(const QXmlAttributes &attrib)
Definition: dochandler.cpp:688
TargetKind m_targetKind
Definition: dochandler.h:643
ParagraphHandler * m_description
Definition: dochandler.h:457
virtual void startParameterName(const QXmlAttributes &attrib)
Definition: dochandler.cpp:563
TitleHandler(IBaseHandler *parent)
Definition: dochandler.cpp:853
virtual void startVarListEntry(const QXmlAttributes &attrib)
Definition: dochandler.cpp:974
Node representing a highlighted text fragment.
Definition: dochandler.h:790
virtual void startCedil(const QXmlAttributes &attrib)
virtual void startPreformatted(const QXmlAttributes &attrib)
Definition: dochandler.cpp:259
virtual void endHeading2()
Definition: dochandler.cpp:297
virtual void startVariableList(const QXmlAttributes &attrib)
virtual ~HighlightHandler()
virtual void startHeading4(const QXmlAttributes &attrib)
Definition: dochandler.cpp:321
virtual void endOrderedList()
Definition: dochandler.cpp:432
CopyHandler(IBaseHandler *parent)
QString m_hlString
Definition: dochandler.h:811
virtual void startLineBreak(const QXmlAttributes &attrib)
QList< ParameterItemHandler > m_paramItems
Definition: dochandler.h:490
virtual void startInternal(const QXmlAttributes &attrib)
void addTextNode()
Definition: dochandler.cpp:151
virtual void startListItem(const QXmlAttributes &attrib)
Definition: dochandler.cpp:986
virtual ~ParameterItemHandler()
Definition: dochandler.cpp:594
virtual IDocIterator * codeLines() const
virtual void startVerbatim(const QXmlAttributes &attrib)
ParameterHandler(IBaseHandler *parent)
Definition: dochandler.cpp:553
virtual ~ItemizedListHandler()
Definition: dochandler.cpp:460
Node representing a copied piece of documentation.
Definition: dochandler.h:1136
virtual IDocIterator * paramNames() const
Definition: dochandler.cpp:622
virtual ~DocHandler()
QCString utf8() const
Definition: qstring.cpp:14507
friend class DocSectionSubIterator
Definition: dochandler.h:1224
virtual void startInternal(const QXmlAttributes &attrib)
IBaseHandler * m_parent
Definition: dochandler.h:708
Node representing a program listing.
Definition: dochandler.h:871
void startRow(const QXmlAttributes &attrib)
DocSectionHandler(IBaseHandler *parent, int level)
QString & m_curString
Definition: dochandler.h:177
void setAutoDelete(bool enable)
Definition: qlist.h:99
Node representing an anchor.
Definition: dochandler.h:958
virtual void startAcute(const QXmlAttributes &attrib)
int markup() const
Definition: dochandler.h:140
virtual void startDotFile(const QXmlAttributes &attrib)
IBaseHandler * m_parent
Definition: dochandler.h:1245
Node representing an entry in the table row.
Definition: dochandler.h:1067
MarkupHandler * m_markupHandler
Definition: dochandler.h:673
void startCaption(const QXmlAttributes &attrib)
Node representing an special symbol.
Definition: dochandler.h:1193
def parent(G, child, parent_type)
Definition: graph.py:67
IBaseHandler * m_parent
Definition: dochandler.h:615
const bool TRUE
Definition: qglobal.h:371
void startDotFile(const QXmlAttributes &attrib)
virtual void startInternal(const QXmlAttributes &attrib)
MarkupHandler(QList< DocImpl > &children, QString &curString)
Definition: dochandler.cpp:100
StringImpl m_text
Definition: dochandler.h:594
virtual void startHeading1(const QXmlAttributes &attrib)
Definition: dochandler.cpp:273
virtual void endDocSection()
virtual ~MarkupHandler()
Definition: dochandler.cpp:147
StringImpl m_name
Definition: dochandler.h:429
HRulerHandler(IBaseHandler *parent)
Definition: dochandler.cpp:793
virtual ~RowHandler()
IBaseHandler * m_parent
Definition: dochandler.h:1082
void addEndHandler(const char *key)
Definition: basehandler.h:101
virtual void startTilde(const QXmlAttributes &attrib)
virtual IDocIterator * title() const
Definition: dochandler.cpp:906
virtual void endListItem()
Definition: dochandler.cpp:992
#define ASSERT(x)
Definition: qglobal.h:590
Node representing a section.
Definition: dochandler.h:1221
friend class DocInternalSubIterator
Definition: dochandler.h:1274
IBaseHandler * m_parent
Definition: dochandler.h:639
virtual ~ULinkHandler()
Definition: dochandler.cpp:743
IBaseHandler * m_parent
Definition: dochandler.h:1050
void startSecondaryIE(const QXmlAttributes &attrib)
IBaseHandler * m_parent
Definition: dochandler.h:489
virtual void startSzlig(const QXmlAttributes &attrib)
virtual IDocInternal * internal() const
virtual void endSmallFont()
Definition: dochandler.cpp:224