47 #define PERLOUTPUT_MAX_INDENTATION 40
59 void add(
const char *s);
60 void add(QCString &s);
62 void add(
unsigned int n);
185 void iopen(
char,
const char *);
216 *s++ =
' '; *s++ =
' '; *s = 0;
231 while ((c = *s++) != 0) {
232 if ((c ==
'\'') || (c ==
'\\'))
249 if ((content ==
'\'') || (content ==
'\\'))
406 void addLink(
const QCString &ref,
const QCString &file,
407 const QCString &anchor);
445 QCString link = file;
446 if (!anchor.isEmpty())
447 (link +=
"_1") += anchor;
546 const char *accent=0;
625 const char *style = 0;
648 const char *type = 0;
673 QListIterator<DocNode> cli(s->
children());
675 for (cli.toFirst();(n=cli.current());++cli) n->
accept(
this);
684 QCString anchor = anc->
file() +
"_1" + anc->
anchor();
692 const char *type = 0;
698 m_t <<
"<div class=\"fragment\"><pre>";
699 QFileInfo cfi( inc->
file() );
700 FileDef fd( cfi.dirPath(), cfi.fileName() );
702 m_t <<
"</pre></div>";
721 err(
"Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
722 "Please create a bug report\n",__FILE__);
741 parseCode(m_ci,op->context(),op->text(),FALSE,0);
770 "<secondaryie></secondaryie>"
844 const char *type = 0;
865 err(
"unknown simple section found\n");
911 QCString sect = QCString().sprintf(
"sect%d",s->
level());
1106 QCString baseName=img->name();
1108 if ((i=baseName.findRev(
'/'))!=-1 || (i=baseName.findRev(
'\\'))!=-1)
1110 baseName=baseName.right(baseName.length()-i-1);
1113 if (!img->width().isEmpty())
1119 else if (!img->height().isEmpty())
1245 const char *type = 0;
1253 err(
"unknown parameter section found\n");
1275 for (li.toFirst();(param=li.current());++li)
1280 name = ((
DocWord*)param)->word();
1338 if (x->
title().isEmpty())
return;
1345 if (x->
title().isEmpty())
return;
1416 output.
openList(
"template_parameters");
1419 for (ali.toFirst();(a=ali.current());++ali)
1422 if (!a->
type.isEmpty())
1424 if (!a->
name.isEmpty())
1427 if (!a->
defval.isEmpty())
1438 const char *cname = cd ? cd->
name().data() : 0;
1451 const QCString &fileName,
1455 const QCString &text)
1457 QCString stext = text.stripWhiteSpace();
1458 if (stext.isEmpty())
1476 case Public:
return "public";
1478 case Private:
return "private";
1479 case Package:
return "package";
1488 case Normal:
return "non_virtual";
1489 case Virtual:
return "virtual";
1490 case Pure:
return "pure_virtual";
1501 pathDoxyExec = QDir::currentDirPath().utf8();
1527 const char *name,
const char *header=0);
1607 if (declAl && declAl->count()>0)
1612 for (declAli.toFirst();(a=declAli.current());++declAli)
1614 Argument *defArg = defAli.current();
1617 if (!a->
name.isEmpty())
1620 if (defArg && !defArg->
name.isEmpty() && defArg->
name!=a->
name)
1623 if (!a->
type.isEmpty())
1626 if (!a->
array.isEmpty())
1629 if (!a->
defval.isEmpty())
1632 if (!a->
attrib.isEmpty())
1636 if (defArg) ++defAli;
1647 for (ali.toFirst();(a=ali.current());++ali)
1674 for (emli.toFirst();(emd=emli.current());++emli)
1703 for (mli.toFirst();(rmd=mli.current());++mli)
1714 MemberList *ml,
const char *name,
const char *header)
1726 for (mli.toFirst();(md=mli.current());++mli)
1741 for (mnii.toFirst();(mni=mnii.current());++mnii)
1745 for (mii.toFirst();(mi=mii.current());++mii)
1787 if (cd->
name().find(
'@')!=-1)
return;
1798 for (bcli.toFirst();(bcd=bcli.current());++bcli)
1812 for (bcli.toFirst();(bcd=bcli.current());++bcli)
1827 for (cli.toFirst();(cd=cli.current());++cli)
1858 for (;(mg=mgli.current());++mgli)
1890 DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance);
1891 if (!inheritanceGraph.isTrivial())
1893 t <<
" <inheritancegraph>" <<
endl;
1894 inheritanceGraph.writePerlMod(t);
1895 t <<
" </inheritancegraph>" <<
endl;
1897 DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation);
1900 t <<
" <collaborationgraph>" <<
endl;
1901 collaborationGraph.writePerlMod(t);
1902 t <<
" </collaborationgraph>" <<
endl;
1904 t <<
" <location file=\""
1940 for (cli.toFirst();(cd=cli.current());++cli)
1953 for (nli.toFirst();(nd=nli.current());++nli)
1964 for (;(mg=mgli.current());++mgli)
2007 for (ili1.toFirst();(inc=ili1.current());++ili1)
2024 for (ili2.toFirst();(inc=ili2.current());++ili2)
2068 .addFieldQuotedString(
"title", gd->
groupTitle());
2074 QListIterator<FileDef> fli(*fl);
2076 for (fli.toFirst();(fd=fli.current());++fli)
2089 for (cli.toFirst();(cd=cli.current());++cli)
2102 for (nli.toFirst();(nd=nli.current());++nli)
2115 for (pli.toFirst();(pd=pli.current());++pli)
2128 for (gli.toFirst();(sgd=gli.current());++gli)
2139 for (;(mg=mgli.current());++mgli)
2189 for (cli.toFirst();(cd=cli.current());++cli)
2196 for (nli.toFirst();(nd=nli.current());++nli)
2203 for (;(fn=fnli.current());++fnli)
2207 for (;(fd=fni.current());++fni)
2215 for (;(gd=gli.current());++gli)
2224 for (pdi.toFirst();(pd=pdi.current());++pdi)
2241 if (!f.open(IO_WriteOnly))
2243 err(
"Cannot open file %s for writing!\n", s);
2252 if (outputDirectory.isEmpty())
2254 outputDirectory=QDir::currentDirPath().utf8();
2258 QDir dir(outputDirectory);
2261 dir.setPath(QDir::currentDirPath());
2262 if (!dir.mkdir(outputDirectory))
2264 err(
"tag OUTPUT_DIRECTORY: Output directory `%s' does not "
2265 "exist and cannot be created\n",outputDirectory.data());
2270 msg(
"Notice: Output directory `%s' does not exist. "
2271 "I have created it for you.\n", outputDirectory.data());
2273 dir.cd(outputDirectory);
2275 outputDirectory=dir.absPath().utf8();
2278 QDir dir(outputDirectory);
2281 dir.setPath(QDir::currentDirPath());
2282 if (!dir.mkdir(outputDirectory))
2284 err(
"Cannot create directory %s\n",outputDirectory.data());
2289 perlModDir.setPath(outputDirectory+
"/perlmod");
2290 if (!perlModDir.exists() && !perlModDir.mkdir(outputDirectory+
"/perlmod"))
2292 err(
"Could not create perlmod directory in %s\n",outputDirectory.data());
2305 doxyModelPMStream <<
2306 "sub memberlist($) {\n"
2307 " my $prefix = $_[0];\n"
2309 "\t[ \"hash\", $prefix . \"s\",\n"
2312 "\t [ \"list\", $prefix . \"List\",\n"
2313 "\t\t[ \"hash\", $prefix,\n"
2315 "\t\t kind => [ \"string\", $prefix . \"Kind\" ],\n"
2316 "\t\t name => [ \"string\", $prefix . \"Name\" ],\n"
2317 "\t\t static => [ \"string\", $prefix . \"Static\" ],\n"
2318 "\t\t virtualness => [ \"string\", $prefix . \"Virtualness\" ],\n"
2319 "\t\t protection => [ \"string\", $prefix . \"Protection\" ],\n"
2320 "\t\t type => [ \"string\", $prefix . \"Type\" ],\n"
2321 "\t\t parameters =>\n"
2322 "\t\t [ \"list\", $prefix . \"Params\",\n"
2323 "\t\t\t[ \"hash\", $prefix . \"Param\",\n"
2325 "\t\t\t declaration_name => [ \"string\", $prefix . \"ParamName\" ],\n"
2326 "\t\t\t type => [ \"string\", $prefix . \"ParamType\" ],\n"
2330 "\t\t detailed =>\n"
2331 "\t\t [ \"hash\", $prefix . \"Detailed\",\n"
2333 "\t\t\t doc => [ \"doc\", $prefix . \"DetailedDoc\" ],\n"
2334 "\t\t\t return => [ \"doc\", $prefix . \"Return\" ],\n"
2335 "\t\t\t see => [ \"doc\", $prefix . \"See\" ],\n"
2336 "\t\t\t params =>\n"
2337 "\t\t\t [ \"list\", $prefix . \"PDBlocks\",\n"
2338 "\t\t\t [ \"hash\", $prefix . \"PDBlock\",\n"
2340 "\t\t\t\t parameters =>\n"
2341 "\t\t\t\t [ \"list\", $prefix . \"PDParams\",\n"
2342 "\t\t\t\t [ \"hash\", $prefix . \"PDParam\",\n"
2344 "\t\t\t\t\t name => [ \"string\", $prefix . \"PDParamName\" ],\n"
2348 "\t\t\t\t doc => [ \"doc\", $prefix . \"PDDoc\" ],\n"
2361 "$doxystructure =\n"
2362 " [ \"hash\", \"Root\",\n"
2365 "\t [ \"list\", \"Files\",\n"
2366 "\t [ \"hash\", \"File\",\n"
2368 "\t\tname => [ \"string\", \"FileName\" ],\n"
2369 "\t\ttypedefs => memberlist(\"FileTypedef\"),\n"
2370 "\t\tvariables => memberlist(\"FileVariable\"),\n"
2371 "\t\tfunctions => memberlist(\"FileFunction\"),\n"
2373 "\t\t [ \"hash\", \"FileDetailed\",\n"
2375 "\t\t doc => [ \"doc\", \"FileDetailedDoc\" ],\n"
2382 "\t [ \"list\", \"Pages\",\n"
2383 "\t [ \"hash\", \"Page\",\n"
2385 "\t\tname => [ \"string\", \"PageName\" ],\n"
2387 "\t\t [ \"hash\", \"PageDetailed\",\n"
2389 "\t\t doc => [ \"doc\", \"PageDetailedDoc\" ],\n"
2396 "\t [ \"list\", \"Classes\",\n"
2397 "\t [ \"hash\", \"Class\",\n"
2399 "\t\tname => [ \"string\", \"ClassName\" ],\n"
2400 "\t\tpublic_typedefs => memberlist(\"ClassPublicTypedef\"),\n"
2401 "\t\tpublic_methods => memberlist(\"ClassPublicMethod\"),\n"
2402 "\t\tpublic_members => memberlist(\"ClassPublicMember\"),\n"
2403 "\t\tprotected_typedefs => memberlist(\"ClassProtectedTypedef\"),\n"
2404 "\t\tprotected_methods => memberlist(\"ClassProtectedMethod\"),\n"
2405 "\t\tprotected_members => memberlist(\"ClassProtectedMember\"),\n"
2406 "\t\tprivate_typedefs => memberlist(\"ClassPrivateTypedef\"),\n"
2407 "\t\tprivate_methods => memberlist(\"ClassPrivateMethod\"),\n"
2408 "\t\tprivate_members => memberlist(\"ClassPrivateMember\"),\n"
2410 "\t\t [ \"hash\", \"ClassDetailed\",\n"
2412 "\t\t doc => [ \"doc\", \"ClassDetailedDoc\" ],\n"
2419 "\t [ \"list\", \"Groups\",\n"
2420 "\t [ \"hash\", \"Group\",\n"
2422 "\t\tname => [ \"string\", \"GroupName\" ],\n"
2423 "\t\ttitle => [ \"string\", \"GroupTitle\" ],\n"
2425 "\t\t [ \"list\", \"Files\",\n"
2426 "\t\t [ \"hash\", \"File\",\n"
2428 "\t\t name => [ \"string\", \"Filename\" ]\n"
2433 "\t\t [ \"list\", \"Classes\",\n"
2434 "\t\t [ \"hash\", \"Class\",\n"
2436 "\t\t name => [ \"string\", \"Classname\" ]\n"
2440 "\t\tnamespaces =>\n"
2441 "\t\t [ \"list\", \"Namespaces\",\n"
2442 "\t\t [ \"hash\", \"Namespace\",\n"
2444 "\t\t name => [ \"string\", \"NamespaceName\" ]\n"
2449 "\t\t [ \"list\", \"Pages\",\n"
2450 "\t\t [ \"hash\", \"Page\","
2452 "\t\t title => [ \"string\", \"PageName\" ]\n"
2457 "\t\t [ \"list\", \"Groups\",\n"
2458 "\t\t [ \"hash\", \"Group\",\n"
2460 "\t\t title => [ \"string\", \"GroupName\" ]\n"
2464 "\t\tfunctions => memberlist(\"GroupFunction\"),\n"
2466 "\t\t [ \"hash\", \"GroupDetailed\",\n"
2468 "\t\t doc => [ \"doc\", \"GroupDetailedDoc\" ],\n"
2493 prefix <<
"DOXY_EXEC_PATH = " << pathDoxyExec <<
"\n" <<
2494 prefix <<
"DOXYFILE = " << pathDoxyfile <<
"\n" <<
2511 ".PHONY: clean-perlmod\n"
2513 "\trm -f $(" << prefix <<
"DOXYSTRUCTURE_PM) \\\n"
2514 "\t$(" << prefix <<
"DOXYDOCS_PM)";
2518 "\t$(" << prefix <<
"DOXYLATEX_PL) \\\n"
2519 "\t$(" << prefix <<
"DOXYLATEXSTRUCTURE_PL) \\\n"
2520 "\t$(" << prefix <<
"DOXYDOCS_TEX) \\\n"
2521 "\t$(" << prefix <<
"DOXYSTRUCTURE_TEX) \\\n"
2522 "\t$(" << prefix <<
"DOXYFORMAT_TEX) \\\n"
2523 "\t$(" << prefix <<
"DOXYLATEX_TEX) \\\n"
2524 "\t$(" << prefix <<
"DOXYLATEX_PDF) \\\n"
2525 "\t$(" << prefix <<
"DOXYLATEX_DVI) \\\n"
2526 "\t$(addprefix $(" << prefix <<
"DOXYLATEX_TEX:tex=),out aux log)";
2527 doxyRulesStream <<
"\n\n";
2530 "$(" << prefix <<
"DOXYRULES) \\\n"
2531 "$(" << prefix <<
"DOXYMAKEFILE) \\\n"
2532 "$(" << prefix <<
"DOXYSTRUCTURE_PM) \\\n"
2533 "$(" << prefix <<
"DOXYDOCS_PM)";
2537 "$(" << prefix <<
"DOXYLATEX_PL) \\\n"
2538 "$(" << prefix <<
"DOXYLATEXSTRUCTURE_PL) \\\n"
2539 "$(" << prefix <<
"DOXYFORMAT_TEX) \\\n"
2540 "$(" << prefix <<
"DOXYLATEX_TEX)";
2544 "\t$(" << prefix <<
"DOXYFILE)\n"
2545 "\tcd $(" << prefix <<
"DOXY_EXEC_PATH) ; doxygen \"$<\"\n";
2550 "$(" << prefix <<
"DOXYDOCS_TEX): \\\n"
2551 "$(" << prefix <<
"DOXYLATEX_PL) \\\n"
2552 "$(" << prefix <<
"DOXYDOCS_PM)\n"
2553 "\tperl -I\"$(<D)\" \"$<\" >\"$@\"\n"
2555 "$(" << prefix <<
"DOXYSTRUCTURE_TEX): \\\n"
2556 "$(" << prefix <<
"DOXYLATEXSTRUCTURE_PL) \\\n"
2557 "$(" << prefix <<
"DOXYSTRUCTURE_PM)\n"
2558 "\tperl -I\"$(<D)\" \"$<\" >\"$@\"\n"
2560 "$(" << prefix <<
"DOXYLATEX_PDF) \\\n"
2561 "$(" << prefix <<
"DOXYLATEX_DVI): \\\n"
2562 "$(" << prefix <<
"DOXYLATEX_TEX) \\\n"
2563 "$(" << prefix <<
"DOXYFORMAT_TEX) \\\n"
2564 "$(" << prefix <<
"DOXYSTRUCTURE_TEX) \\\n"
2565 "$(" << prefix <<
"DOXYDOCS_TEX)\n"
2567 "$(" << prefix <<
"DOXYLATEX_PDF): \\\n"
2568 "$(" << prefix <<
"DOXYLATEX_TEX)\n"
2569 "\tpdflatex -interaction=nonstopmode \"$<\"\n"
2571 "$(" << prefix <<
"DOXYLATEX_DVI): \\\n"
2572 "$(" << prefix <<
"DOXYLATEX_TEX)\n"
2573 "\tlatex -interaction=nonstopmode \"$<\"\n";
2590 ".PHONY: default clean" << (perlmodLatex ?
" pdf" :
"") <<
"\n"
2591 "default: " << (perlmodLatex ?
"pdf" :
"clean") <<
"\n"
2595 "clean: clean-perlmod\n";
2599 "pdf: $(" << prefix <<
"DOXYLATEX_PDF)\n"
2600 "dvi: $(" << prefix <<
"DOXYLATEX_DVI)\n";
2608 QFile doxyLatexStructurePL;
2612 FTextStream doxyLatexStructurePLStream(&doxyLatexStructurePL);
2613 doxyLatexStructurePLStream <<
2614 "use DoxyStructure;\n"
2616 "sub process($) {\n"
2617 "\tmy $node = $_[0];\n"
2618 "\tmy ($type, $name) = @$node[0, 1];\n"
2620 "\tif ($type eq \"string\") { $command = \"String\" }\n"
2621 "\telsif ($type eq \"doc\") { $command = \"Doc\" }\n"
2622 "\telsif ($type eq \"hash\") {\n"
2623 "\t\t$command = \"Hash\";\n"
2624 "\t\tfor my $subnode (values %{$$node[2]}) {\n"
2625 "\t\t\tprocess($subnode);\n"
2628 "\telsif ($type eq \"list\") {\n"
2629 "\t\t$command = \"List\";\n"
2630 "\t\tprocess($$node[2]);\n"
2632 "\tprint \"\\\\\" . $command . \"Node{\" . $name . \"}%\\n\";\n"
2635 "process($doxystructure);\n";
2647 doxyLatexPLStream <<
2648 "use DoxyStructure;\n"
2651 "sub latex_quote($) {\n"
2652 "\tmy $text = $_[0];\n"
2653 "\t$text =~ s/\\\\/\\\\textbackslash /g;\n"
2654 "\t$text =~ s/\\|/\\\\textbar /g;\n"
2655 "\t$text =~ s/</\\\\textless /g;\n"
2656 "\t$text =~ s/>/\\\\textgreater /g;\n"
2657 "\t$text =~ s/~/\\\\textasciitilde /g;\n"
2658 "\t$text =~ s/\\^/\\\\textasciicircum /g;\n"
2659 "\t$text =~ s/[\\$&%#_{}]/\\\\$&/g;\n"
2663 "sub generate_doc($) {\n"
2664 "\tmy $doc = $_[0];\n"
2665 "\tfor my $item (@$doc) {\n"
2666 "\t\tmy $type = $$item{type};\n"
2667 "\t\tif ($type eq \"text\") {\n"
2668 "\t\t\tlatex_quote($$item{content});\n"
2669 "\t\t} elsif ($type eq \"parbreak\") {\n"
2670 "\t\t\tprint \"\\n\\n\";\n"
2671 "\t\t} elsif ($type eq \"style\") {\n"
2672 "\t\t\tmy $style = $$item{style};\n"
2673 "\t\t\tif ($$item{enable} eq \"yes\") {\n"
2674 "\t\t\t\tif ($style eq \"bold\") { print '\\bfseries'; }\n"
2675 "\t\t\t\tif ($style eq \"italic\") { print '\\itshape'; }\n"
2676 "\t\t\t\tif ($style eq \"code\") { print '\\ttfamily'; }\n"
2678 "\t\t\t\tif ($style eq \"bold\") { print '\\mdseries'; }\n"
2679 "\t\t\t\tif ($style eq \"italic\") { print '\\upshape'; }\n"
2680 "\t\t\t\tif ($style eq \"code\") { print '\\rmfamily'; }\n"
2682 "\t\t\tprint '{}';\n"
2683 "\t\t} elsif ($type eq \"symbol\") {\n"
2684 "\t\t\tmy $symbol = $$item{symbol};\n"
2685 "\t\t\tif ($symbol eq \"copyright\") { print '\\copyright'; }\n"
2686 "\t\t\telsif ($symbol eq \"szlig\") { print '\\ss'; }\n"
2687 "\t\t\tprint '{}';\n"
2688 "\t\t} elsif ($type eq \"accent\") {\n"
2689 "\t\t\tmy ($accent) = $$item{accent};\n"
2690 "\t\t\tif ($accent eq \"umlaut\") { print '\\\"'; }\n"
2691 "\t\t\telsif ($accent eq \"acute\") { print '\\\\\\''; }\n"
2692 "\t\t\telsif ($accent eq \"grave\") { print '\\`'; }\n"
2693 "\t\t\telsif ($accent eq \"circ\") { print '\\^'; }\n"
2694 "\t\t\telsif ($accent eq \"tilde\") { print '\\~'; }\n"
2695 "\t\t\telsif ($accent eq \"cedilla\") { print '\\c'; }\n"
2696 "\t\t\telsif ($accent eq \"ring\") { print '\\r'; }\n"
2697 "\t\t\tprint \"{\" . $$item{letter} . \"}\"; \n"
2698 "\t\t} elsif ($type eq \"list\") {\n"
2699 "\t\t\tmy $env = ($$item{style} eq \"ordered\") ? \"enumerate\" : \"itemize\";\n"
2700 "\t\t\tprint \"\\n\\\\begin{\" . $env .\"}\";\n"
2701 "\t\t \tfor my $subitem (@{$$item{content}}) {\n"
2702 "\t\t\t\tprint \"\\n\\\\item \";\n"
2703 "\t\t\t\tgenerate_doc($subitem);\n"
2705 "\t\t\tprint \"\\n\\\\end{\" . $env .\"}\";\n"
2706 "\t\t} elsif ($type eq \"url\") {\n"
2707 "\t\t\tlatex_quote($$item{content});\n"
2712 "sub generate($$) {\n"
2713 "\tmy ($item, $node) = @_;\n"
2714 "\tmy ($type, $name) = @$node[0, 1];\n"
2715 "\tif ($type eq \"string\") {\n"
2716 "\t\tprint \"\\\\\" . $name . \"{\";\n"
2717 "\t\tlatex_quote($item);\n"
2718 "\t\tprint \"}\";\n"
2719 "\t} elsif ($type eq \"doc\") {\n"
2720 "\t\tif (@$item) {\n"
2721 "\t\t\tprint \"\\\\\" . $name . \"{\";\n"
2722 "\t\t\tgenerate_doc($item);\n"
2723 "\t\t\tprint \"}%\\n\";\n"
2725 "#\t\t\tprint \"\\\\\" . $name . \"Empty%\\n\";\n"
2727 "\t} elsif ($type eq \"hash\") {\n"
2728 "\t\tmy ($key, $value);\n"
2729 "\t\twhile (($key, $subnode) = each %{$$node[2]}) {\n"
2730 "\t\t\tmy $subname = $$subnode[1];\n"
2731 "\t\t\tprint \"\\\\Defcs{field\" . $subname . \"}{\";\n"
2732 "\t\t\tif ($$item{$key}) {\n"
2733 "\t\t\t\tgenerate($$item{$key}, $subnode);\n"
2735 "#\t\t\t\t\tprint \"\\\\\" . $subname . \"Empty%\\n\";\n"
2737 "\t\t\tprint \"}%\\n\";\n"
2739 "\t\tprint \"\\\\\" . $name . \"%\\n\";\n"
2740 "\t} elsif ($type eq \"list\") {\n"
2741 "\t\tmy $index = 0;\n"
2742 "\t\tif (@$item) {\n"
2743 "\t\t\tprint \"\\\\\" . $name . \"{%\\n\";\n"
2744 "\t\t\tfor my $subitem (@$item) {\n"
2745 "\t\t\t\tif ($index) {\n"
2746 "\t\t\t\t\tprint \"\\\\\" . $name . \"Sep%\\n\";\n"
2748 "\t\t\t\tgenerate($subitem, $$node[2]);\n"
2749 "\t\t\t\t$index++;\n"
2751 "\t\t\tprint \"}%\\n\";\n"
2753 "#\t\t\tprint \"\\\\\" . $name . \"Empty%\\n\";\n"
2758 "generate($doxydocs, $doxystructure);\n";
2765 QFile doxyFormatTex;
2770 doxyFormatTexStream <<
2771 "\\def\\Defcs#1{\\long\\expandafter\\def\\csname#1\\endcsname}\n"
2772 "\\Defcs{Empty}{}\n"
2773 "\\def\\IfEmpty#1{\\expandafter\\ifx\\csname#1\\endcsname\\Empty}\n"
2775 "\\def\\StringNode#1{\\Defcs{#1}##1{##1}}\n"
2776 "\\def\\DocNode#1{\\Defcs{#1}##1{##1}}\n"
2777 "\\def\\ListNode#1{\\Defcs{#1}##1{##1}\\Defcs{#1Sep}{}}\n"
2778 "\\def\\HashNode#1{\\Defcs{#1}{}}\n"
2783 "\\dimendef\\DimenA=151\\relax\n"
2784 "\\dimendef\\DimenB=152\\relax\n"
2785 "\\countdef\\ZoneDepth=151\\relax\n"
2787 "\\def\\Cs#1{\\csname#1\\endcsname}\n"
2788 "\\def\\Letcs#1{\\expandafter\\let\\csname#1\\endcsname}\n"
2789 "\\def\\Heading#1{\\vskip 4mm\\relax\\textbf{#1}}\n"
2790 "\\def\\See#1{\\begin{flushleft}\\Heading{See also: }#1\\end{flushleft}}\n"
2792 "\\def\\Frame#1{\\vskip 3mm\\relax\\fbox{ \\vbox{\\hsize0.95\\hsize\\vskip 1mm\\relax\n"
2793 "\\raggedright#1\\vskip 0.5mm\\relax} }}\n"
2795 "\\def\\Zone#1#2#3{%\n"
2796 "\\Defcs{Test#1}{#2}%\n"
2797 "\\Defcs{Emit#1}{#3}%\n"
2799 "\\advance\\ZoneDepth1\\relax\n"
2800 "\\Letcs{Mode\\number\\ZoneDepth}0\\relax\n"
2801 "\\Letcs{Present\\number\\ZoneDepth}0\\relax\n"
2803 "\\expandafter\\if\\Cs{Present\\number\\ZoneDepth}1%\n"
2804 "\\advance\\ZoneDepth-1\\relax\n"
2805 "\\Letcs{Present\\number\\ZoneDepth}1\\relax\n"
2806 "\\expandafter\\if\\Cs{Mode\\number\\ZoneDepth}1%\n"
2807 "\\advance\\ZoneDepth1\\relax\n"
2808 "\\Letcs{Mode\\number\\ZoneDepth}1\\relax\n"
2810 "\\advance\\ZoneDepth-1\\relax\\fi\n"
2811 "\\advance\\ZoneDepth1\\relax\\fi\n"
2812 "\\advance\\ZoneDepth-1\\relax}}\n"
2814 "\\def\\Member#1#2{%\n"
2815 "\\Defcs{Test#1}{\\Cs{field#1Detailed}\n"
2816 "\\IfEmpty{field#1DetailedDoc}\\else\\Letcs{Present#1}1\\fi}\n"
2817 "\\Defcs{#1}{\\Letcs{Present#1}0\\relax\n"
2818 "\\Cs{Test#1}\\if1\\Cs{Present#1}\\Letcs{Present\\number\\ZoneDepth}1\\relax\n"
2819 "\\if1\\Cs{Mode\\number\\ZoneDepth}#2\\fi\\fi}}\n"
2821 "\\def\\TypedefMemberList#1#2{%\n"
2822 "\\Defcs{#1DetailedDoc}##1{\\vskip 5.5mm\\relax##1}%\n"
2823 "\\Defcs{#1Name}##1{\\textbf{##1}}%\n"
2824 "\\Defcs{#1See}##1{\\See{##1}}%\n"
2826 "\\Zone{#1s}{\\Cs{field#1List}}{\\subsubsection{#2}\\Cs{field#1List}}%\n"
2827 "\\Member{#1}{\\Frame{typedef \\Cs{field#1Type} \\Cs{field#1Name}}%\n"
2828 "\\Cs{field#1DetailedDoc}\\Cs{field#1See}\\vskip 5mm\\relax}}%\n"
2830 "\\def\\VariableMemberList#1#2{%\n"
2831 "\\Defcs{#1DetailedDoc}##1{\\vskip 5.5mm\\relax##1}%\n"
2832 "\\Defcs{#1Name}##1{\\textbf{##1}}%\n"
2833 "\\Defcs{#1See}##1{\\See{##1}}%\n"
2835 "\\Zone{#1s}{\\Cs{field#1List}}{\\subsubsection{#2}\\Cs{field#1List}}%\n"
2836 "\\Member{#1}{\\Frame{\\Cs{field#1Type}{} \\Cs{field#1Name}}%\n"
2837 "\\Cs{field#1DetailedDoc}\\Cs{field#1See}\\vskip 5mm\\relax}}%\n"
2839 "\\def\\FunctionMemberList#1#2{%\n"
2840 "\\Defcs{#1PDParamName}##1{\\textit{##1}}%\n"
2841 "\\Defcs{#1PDParam}{\\Cs{field#1PDParamName}}%\n"
2842 "\\Defcs{#1PDParamsSep}{, }%\n"
2843 "\\Defcs{#1PDBlocksSep}{\\vskip 2mm\\relax}%\n"
2845 "\\Defcs{#1PDBlocks}##1{%\n"
2846 "\\Heading{Parameters:}\\vskip 1.5mm\\relax\n"
2847 "\\DimenA0pt\\relax\n"
2848 "\\Defcs{#1PDBlock}{\\setbox\\BoxA\\hbox{\\Cs{field#1PDParams}}%\n"
2849 "\\ifdim\\DimenA<\\wd\\BoxA\\DimenA\\wd\\BoxA\\fi}%\n"
2851 "\\advance\\DimenA3mm\\relax\n"
2852 "\\DimenB\\hsize\\advance\\DimenB-\\DimenA\\relax\n"
2853 "\\Defcs{#1PDBlock}{\\hbox to\\hsize{\\vtop{\\hsize\\DimenA\\relax\n"
2854 "\\Cs{field#1PDParams}}\\hfill\n"
2855 "\\vtop{\\hsize\\DimenB\\relax\\Cs{field#1PDDoc}}}}%\n"
2858 "\\Defcs{#1ParamName}##1{\\textit{##1}}\n"
2859 "\\Defcs{#1Param}{\\Cs{field#1ParamType}{} \\Cs{field#1ParamName}}\n"
2860 "\\Defcs{#1ParamsSep}{, }\n"
2862 "\\Defcs{#1Name}##1{\\textbf{##1}}\n"
2863 "\\Defcs{#1See}##1{\\See{##1}}\n"
2864 "\\Defcs{#1Return}##1{\\Heading{Returns: }##1}\n"
2865 "\\Defcs{field#1Title}{\\Frame{\\Cs{field#1Type}{} \\Cs{field#1Name}(\\Cs{field#1Params})}}%\n"
2867 "\\Zone{#1s}{\\Cs{field#1List}}{\\subsubsection{#2}\\Cs{field#1List}}%\n"
2869 "\\Cs{field#1Title}\\vskip 6mm\\relax\\Cs{field#1DetailedDoc}\n"
2870 "\\Cs{field#1Return}\\Cs{field#1PDBlocks}\\Cs{field#1See}\\vskip 5mm\\relax}}\n"
2872 "\\def\\FileDetailed{\\fieldFileDetailedDoc\\par}\n"
2873 "\\def\\ClassDetailed{\\fieldClassDetailedDoc\\par}\n"
2875 "\\def\\FileSubzones{\\fieldFileTypedefs\\fieldFileVariables\\fieldFileFunctions}\n"
2877 "\\def\\ClassSubzones{%\n"
2878 "\\fieldClassPublicTypedefs\\fieldClassPublicMembers\\fieldClassPublicMethods\n"
2879 "\\fieldClassProtectedTypedefs\\fieldClassProtectedMembers\\fieldClassProtectedMethods\n"
2880 "\\fieldClassPrivateTypedefs\\fieldClassPrivateMembers\\fieldClassPrivateMethods}\n"
2882 "\\Member{Page}{\\subsection{\\fieldPageName}\\fieldPageDetailedDoc}\n"
2884 "\\TypedefMemberList{FileTypedef}{Typedefs}\n"
2885 "\\VariableMemberList{FileVariable}{Variables}\n"
2886 "\\FunctionMemberList{FileFunction}{Functions}\n"
2887 "\\Zone{File}{\\FileSubzones}{\\subsection{\\fieldFileName}\\fieldFileDetailed\\FileSubzones}\n"
2889 "\\TypedefMemberList{ClassPublicTypedef}{Public Typedefs}\n"
2890 "\\TypedefMemberList{ClassProtectedTypedef}{Protected Typedefs}\n"
2891 "\\TypedefMemberList{ClassPrivateTypedef}{Private Typedefs}\n"
2892 "\\VariableMemberList{ClassPublicMember}{Public Members}\n"
2893 "\\VariableMemberList{ClassProtectedMember}{Protected Members}\n"
2894 "\\VariableMemberList{ClassPrivateMember}{Private Members}\n"
2895 "\\FunctionMemberList{ClassPublicMethod}{Public Methods}\n"
2896 "\\FunctionMemberList{ClassProtectedMethod}{Protected Methods}\n"
2897 "\\FunctionMemberList{ClassPrivateMethod}{Private Methods}\n"
2898 "\\Zone{Class}{\\ClassSubzones}{\\subsection{\\fieldClassName}\\fieldClassDetailed\\ClassSubzones}\n"
2900 "\\Zone{AllPages}{\\fieldPages}{\\section{Pages}\\fieldPages}\n"
2901 "\\Zone{AllFiles}{\\fieldFiles}{\\section{Files}\\fieldFiles}\n"
2902 "\\Zone{AllClasses}{\\fieldClasses}{\\section{Classes}\\fieldClasses}\n"
2904 "\\newlength{\\oldparskip}\n"
2905 "\\newlength{\\oldparindent}\n"
2906 "\\newlength{\\oldfboxrule}\n"
2908 "\\ZoneDepth0\\relax\n"
2909 "\\Letcs{Mode0}1\\relax\n"
2911 "\\def\\EmitDoxyDocs{%\n"
2912 "\\setlength{\\oldparskip}{\\parskip}\n"
2913 "\\setlength{\\oldparindent}{\\parindent}\n"
2914 "\\setlength{\\oldfboxrule}{\\fboxrule}\n"
2915 "\\setlength{\\parskip}{0cm}\n"
2916 "\\setlength{\\parindent}{0cm}\n"
2917 "\\setlength{\\fboxrule}{1pt}\n"
2918 "\\AllPages\\AllFiles\\AllClasses\n"
2919 "\\setlength{\\parskip}{\\oldparskip}\n"
2920 "\\setlength{\\parindent}{\\oldparindent}\n"
2921 "\\setlength{\\fboxrule}{\\oldfboxrule}}\n";
2933 doxyLatexTexStream <<
2934 "\\documentclass[a4paper,12pt]{article}\n"
2935 "\\usepackage[latin1]{inputenc}\n"
2936 "\\usepackage[none]{hyphenat}\n"
2937 "\\usepackage[T1]{fontenc}\n"
2938 "\\usepackage{hyperref}\n"
2939 "\\usepackage{times}\n"
2941 "\\input{doxyformat}\n"
2943 "\\begin{document}\n"
2947 "\\end{document}\n";
2968 QCString perlModAbsPath = perlModDir.absPath().utf8();