Commit 4596b79a authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.2.18-20021006

parent 85870835
DOXYGEN Version 1.2.18-20020927 DOXYGEN Version 1.2.18-20021006
Please read the installation section of the manual for instructions. Please read the installation section of the manual for instructions.
-------- --------
Dimitri van Heesch (27 September 2002) Dimitri van Heesch (06 October 2002)
DOXYGEN Version 1.2.18_20020927 DOXYGEN Version 1.2.18_20021006
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (27 September 2002) Dimitri van Heesch (dimitri@stack.nl) (06 October 2002)
1.2.18-20020927 1.2.18-20021006
sub section($$) {
my ($wrap, $name) = @_;
my $prefix = "Doxy" . $name;
return
[ "hash", "Doxy" . $wrap,
{
members =>
[ "list", $prefix . "s",
[ "hash", $prefix,
{
kind => [ "field", $prefix . "Kind" ],
name => [ "field", $prefix . "Name" ],
virtualness => [ "field", $prefix . "Virtualness" ],
protection => [ "field", $prefix . "Protection" ],
type => [ "field", $prefix . "Type" ],
parameters =>
[ "list", $prefix . "Params",
[ "hash", $prefix . "Param",
{
declaration_name => [ "field", $prefix . "ParamName" ],
type => [ "field", $prefix . "ParamType" ],
},
],
],
detailed =>
[ "hash", $prefix . "Detailed",
{
doc => [ "doc", $prefix . "DetailedDoc" ],
return => [ "doc", $prefix . "Return" ],
see => [ "doc", $prefix . "See" ],
params =>
[ "list", $prefix . "PDBlocks",
[ "hash", $prefix . "PDBlock",
{
parameters =>
[ "list", $prefix . "PDParams",
[ "hash", $prefix . "PDParam",
{
name => [ "field", $prefix . "PDParamName" ],
},
],
],
doc => [ "doc", $prefix . "PDDoc" ],
},
],
],
},
],
},
],
],
},
];
}
$doxymodel =
[ "hash", "DoxyTop",
{
files =>
[ "list", "DoxyFiles",
[ "hash", "DoxyFile",
{
name => [ "field", "DoxyFileName" ],
typedefs => section("FileTypedefs", "Typedef"),
variables => section("FileVariables", "Variable"),
functions => section("FileFunctions", "Function"),
detailed =>
[ "hash", "DoxyFileDetailed",
{
doc => [ "doc", "DoxyFileDetailedDoc" ],
},
],
},
],
],
classes =>
[ "list", "DoxyClasses",
[ "hash", "DoxyClass",
{
name => [ "field", "DoxyClassName" ],
public_typedefs => section("ClassPublicTypedefs", "Typedef"),
public_methods => section("ClassPublicMethods", "Function"),
public_members => section("ClassPublicMembers", "Variable"),
protected_typedefs => section("ClassProtectedTypedefs", "Typedef"),
protected_methods => section("ClassProtectedMethods", "Function"),
protected_members => section("ClassProtectedMembers", "Variable"),
private_typedefs => section("ClassPrivateTypedefs", "Typedef"),
private_methods => section("ClassPrivateMethods", "Function"),
private_members => section("ClassPrivateMembers", "Variable"),
detailed =>
[ "hash", "DoxyClassDetailed",
{
doc => [ "doc", "DoxyClassDetailedDoc" ],
},
],
},
],
],
},
];
1;
DoxyModel.pm: it is a Perl module with information about the structure
of DoxyDocs.pm files. It is used by Perl scripts that process the
output generated by the Perl backend.
doxydocs-latex.pl: it is a Perl script which uses DoxyModel.pm and a
generated DoxyDocs.pm to create the file doxydocs.tex. This file
contains the documentation, this time in "TeX" format. doxydocs.tex,
however, can't been directly LaTeX'ed.
doxydocs-latex.ltx: this is the LaTeX file which is LaTeX'ed to
generate the PDF or DVI documentation. It includes doxydocs.tex,
generated by doxydocs-latex.pl above, and doxytemplate.tex, generated
by doxytemplate-latex.pl -- see below. This file is intended to be
customized by users if they want to modify the format of the PDF or
DVI output.
doxytemplate-latex.pl: this is a Perl script which uses DoxyModel.pm
to generate a doxytemplate.tex TeX file. This file is included by
doxydocs-latex.ltx to maintain the compatibility with future versions
of Doxygen; i.e. a customized doxydocs-latex.ltx should work with the
output generated by future versions of Doxygen as long as it includes
an updated doxydocs.tex.
So what do you do to test my backend?
1. You apply perlgen.diff and rebuild Doxygen.
2. You save DoxyModel.pm, doxydocs-latex.pl, doxytemplate-latex.pl and
doxydocs-latex.ltx to your test directory.
3. You run doxytemplate-latex.pl to generate doxytemplate.tex.
4. You generate DoxyDocs.pm by running Doxygen on the test code. (You
must enable the GENERATE_PERL option in your Doxyfile).
5. You run doxydocs-latex.pl to generate doxydocs.tex from
DoxyDocs.pm.
6. You run pdflatex on doxydocs-latex.ltx to generate
doxydocs-latex.pdf from doxydocs.tex and doxytemplate.tex.
If you want to regenerate the PDF output after modifying the test code
you only need to do the steps from 4 on.
I also attach a main.h file I've used to test my backend and the
corresponding main.pdf file I've generated from it.
#!/usr/bin/perl
# Copyright (C) 1997-2002 by Dimitri van Heesch.
# Author: Miguel Lobo.
#
# 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.
#
# Documents produced by Doxygen are derivative works derived from the
# input used in their production; they are not affected by this license.
# This script can be used to generate LaTeX output using the new Perl
# intermediate format. It is incomplete and experimental, so for the moment
# you should use Doxygen"s standard LaTeX output.
#
# If you want to try this out, you should do:
# doxygen configName # This creates DoxyDocs.pm
# perl -I. doxydocs-latex.pl # This creates doxydocs.tex and doxytemplate.tex
# latex doxydocs-latex.ltx # This creates doxydocs-latex.dvi
#
# Notes:
# - Your config file has to have Perl output enabled, of course.
# - The Perl output format is only complete enough to document
# a simple C file; no classes by the moment :-).
use DoxyModel;
use DoxyDocs;
sub latex_quote($) {
my $text = $_[0];
$text =~ s/[\\_&]/\\$&/g;
print TEXDOCS $text;
}
sub generate_doc($) {
my $doc = $_[0];
for my $item (@$doc) {
my $type = $$item{type};
if ($type eq "text") {
latex_quote($$item{content});
} elsif ($type eq "para") {
generate_doc($$item{content});
# print TEXDOCS "\\par\n";
} elsif ($type eq "bold") {
print TEXDOCS "\\textbf{";
generate_doc($$item{content});
print TEXDOCS "}";
} elsif ($type eq "emphasis") {
print TEXDOCS "\\textit{";
generate_doc($$item{content});
print TEXDOCS "}";
} elsif ($type eq "url") {
latex_quote($$item{content});
}
}
}
sub generate($$) {
my ($item, $model) = @_;
my ($type, $name) = @$model[0, 1];
if ($type eq "field") {
print TEXDOCS "\\" . $name . "{";
latex_quote($item);
print TEXDOCS "}";
} elsif ($type eq "doc") {
if (@$item) {
print TEXDOCS "\\" . $name . "{";
generate_doc($item);
print TEXDOCS "}%\n";
} else {
print TEXDOCS "\\" . $name . "Empty%\n";
}
} elsif ($type eq "hash") {
my ($key, $value);
while (($key, $submodel) = each %{$$model[2]}) {
my $name = $$submodel[1];
print TEXDOCS "\\def\\f" . $name . "{";
if ($$item{$key}) {
generate($$item{$key}, $submodel);
} else {
print TEXDOCS "\\" . $name . "Empty";
}
print TEXDOCS "}%\n";
}
print TEXDOCS "\\" . $name . "%\n";
} elsif ($type eq "list") {
my $index = 0;
if (@$item) {
print TEXDOCS "\\" . $name . "{%\n";
for my $subitem (@$item) {
if ($index) {
print TEXDOCS "\\" . $name . "Sep%\n";
}
generate($subitem, $$model[2]);
$index++;
}
print TEXDOCS "}%\n";
} else {
print TEXDOCS "\\" . $name . "Empty%\n";
}
}
}
open TEXDOCS, ">doxydocs.tex";
generate($doxydocs, $doxymodel);
close TEXDOCS;
use DoxyModel;
sub template($) {
my $model = $_[0];
my ($type, $name) = @$model[0, 1];
if ($type eq "field") {
print TEXTEMPLATE "\\def\\" . $name . "#1{#1}%\n";
} elsif ($type eq "doc") {
print TEXTEMPLATE "\\def\\" . $name . "#1{#1}%\n";
} elsif ($type eq "hash") {
my ($key, $value);
while (($key, $submodel) = each %{$$model[2]}) {
my $subname = $$submodel[1];
print TEXTEMPLATE "\\def\\" . $subname . "Empty{}%\n";
print TEXTEMPLATE "\\def\\f" . $subname . "Empty{\\" . $subname . "Empty}%\n";
template($submodel);
}
print TEXTEMPLATE "\\def\\" . $name . "{}%\n";
} elsif ($type eq "list") {
template($$model[2]);
print TEXTEMPLATE "\\def\\" . $name . "#1{#1}%\n";
print TEXTEMPLATE "\\def\\" . $name . "Sep{}%\n";
}
}
open TEXTEMPLATE, ">doxytemplate.tex";
template($doxymodel);
close TEXTEMPLATE;
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means ...@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time. languages other than English (the default) at configuration time.
Currently (version 1.2.18), 28 languages Currently (version 1.2.14-20020317), 28 languages
are supported (sorted alphabetically): are supported (sorted alphabetically):
Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian, Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian,
Czech, Danish, Dutch, English, Finnish, Czech, Danish, Dutch, English, Finnish,
......
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.2.18_20020927 Version: 1.2.18_20021006
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include "classdef.h" #include "classdef.h"
#include "classlist.h" #include "classlist.h"
#include "entry.h" #include "entry.h"
#include "doc.h"
#include "doxygen.h" #include "doxygen.h"
#include "membername.h" #include "membername.h"
#include "message.h" #include "message.h"
...@@ -160,24 +159,24 @@ void ClassDef::insertSubClass(ClassDef *cd,Protection p, ...@@ -160,24 +159,24 @@ void ClassDef::insertSubClass(ClassDef *cd,Protection p,
void ClassDef::addMembersToMemberGroup() void ClassDef::addMembersToMemberGroup()
{ {
::addMembersToMemberGroup(&pubTypes,memberGroupSDict,this); ::addMembersToMemberGroup(&pubTypes,memberGroupSDict,this);
::addMembersToMemberGroup(&pubMembers,memberGroupSDict,this); ::addMembersToMemberGroup(&pubMethods,memberGroupSDict,this);
::addMembersToMemberGroup(&pubAttribs,memberGroupSDict,this); ::addMembersToMemberGroup(&pubAttribs,memberGroupSDict,this);
::addMembersToMemberGroup(&pubSlots,memberGroupSDict,this); ::addMembersToMemberGroup(&pubSlots,memberGroupSDict,this);
::addMembersToMemberGroup(&signals,memberGroupSDict,this); ::addMembersToMemberGroup(&signals,memberGroupSDict,this);
::addMembersToMemberGroup(&dcopMethods,memberGroupSDict,this); ::addMembersToMemberGroup(&dcopMethods,memberGroupSDict,this);
::addMembersToMemberGroup(&pubStaticMembers,memberGroupSDict,this); ::addMembersToMemberGroup(&pubStaticMethods,memberGroupSDict,this);
::addMembersToMemberGroup(&pubStaticAttribs,memberGroupSDict,this); ::addMembersToMemberGroup(&pubStaticAttribs,memberGroupSDict,this);
::addMembersToMemberGroup(&proTypes,memberGroupSDict,this); ::addMembersToMemberGroup(&proTypes,memberGroupSDict,this);
::addMembersToMemberGroup(&proMembers,memberGroupSDict,this); ::addMembersToMemberGroup(&proMethods,memberGroupSDict,this);
::addMembersToMemberGroup(&proAttribs,memberGroupSDict,this); ::addMembersToMemberGroup(&proAttribs,memberGroupSDict,this);
::addMembersToMemberGroup(&proSlots,memberGroupSDict,this); ::addMembersToMemberGroup(&proSlots,memberGroupSDict,this);
::addMembersToMemberGroup(&proStaticMembers,memberGroupSDict,this); ::addMembersToMemberGroup(&proStaticMethods,memberGroupSDict,this);
::addMembersToMemberGroup(&proStaticAttribs,memberGroupSDict,this); ::addMembersToMemberGroup(&proStaticAttribs,memberGroupSDict,this);
::addMembersToMemberGroup(&priTypes,memberGroupSDict,this); ::addMembersToMemberGroup(&priTypes,memberGroupSDict,this);
::addMembersToMemberGroup(&priMembers,memberGroupSDict,this); ::addMembersToMemberGroup(&priMethods,memberGroupSDict,this);
::addMembersToMemberGroup(&priAttribs,memberGroupSDict,this); ::addMembersToMemberGroup(&priAttribs,memberGroupSDict,this);
::addMembersToMemberGroup(&priSlots,memberGroupSDict,this); ::addMembersToMemberGroup(&priSlots,memberGroupSDict,this);
::addMembersToMemberGroup(&priStaticMembers,memberGroupSDict,this); ::addMembersToMemberGroup(&priStaticMethods,memberGroupSDict,this);
::addMembersToMemberGroup(&priStaticAttribs,memberGroupSDict,this); ::addMembersToMemberGroup(&priStaticAttribs,memberGroupSDict,this);
::addMembersToMemberGroup(&friends,memberGroupSDict,this); ::addMembersToMemberGroup(&friends,memberGroupSDict,this);
::addMembersToMemberGroup(&related,memberGroupSDict,this); ::addMembersToMemberGroup(&related,memberGroupSDict,this);
...@@ -278,16 +277,16 @@ void ClassDef::internalInsertMember(MemberDef *md, ...@@ -278,16 +277,16 @@ void ClassDef::internalInsertMember(MemberDef *md,
switch (prot) switch (prot)
{ {
case Protected: case Protected:
proStaticMembers.append(md); proStaticMethods.append(md);
md->setSectionList(this,&proStaticMembers); md->setSectionList(this,&proStaticMethods);
break; break;
case Public: case Public:
pubStaticMembers.append(md); pubStaticMethods.append(md);
md->setSectionList(this,&pubStaticMembers); md->setSectionList(this,&pubStaticMethods);
break; break;
case Private: case Private:
priStaticMembers.append(md); priStaticMethods.append(md);
md->setSectionList(this,&priStaticMembers); md->setSectionList(this,&priStaticMethods);
break; break;
} }
} }
...@@ -335,16 +334,16 @@ void ClassDef::internalInsertMember(MemberDef *md, ...@@ -335,16 +334,16 @@ void ClassDef::internalInsertMember(MemberDef *md,
switch (prot) switch (prot)
{ {
case Protected: case Protected:
proMembers.append(md); proMethods.append(md);
md->setSectionList(this,&proMembers); md->setSectionList(this,&proMethods);
break; break;
case Public: case Public:
pubMembers.append(md); pubMethods.append(md);
md->setSectionList(this,&pubMembers); md->setSectionList(this,&pubMethods);
break; break;
case Private: case Private:
priMembers.append(md); priMethods.append(md);
md->setSectionList(this,&priMembers); md->setSectionList(this,&priMethods);
break; break;
} }
} }
...@@ -500,12 +499,12 @@ void ClassDef::insertMember(MemberDef *md) ...@@ -500,12 +499,12 @@ void ClassDef::insertMember(MemberDef *md)
void ClassDef::computeAnchors() void ClassDef::computeAnchors()
{ {
ClassDef *context = Config_getBool("INLINE_INHERITED_MEMB") ? this : 0; ClassDef *context = Config_getBool("INLINE_INHERITED_MEMB") ? this : 0;
setAnchors(context,'a',&pubMembers); setAnchors(context,'a',&pubMethods);
setAnchors(context,'b',&proMembers); setAnchors(context,'b',&proMethods);
setAnchors(context,'c',&priMembers); setAnchors(context,'c',&priMethods);
setAnchors(context,'d',&pubStaticMembers); setAnchors(context,'d',&pubStaticMethods);
setAnchors(context,'e',&proStaticMembers); setAnchors(context,'e',&proStaticMethods);
setAnchors(context,'f',&priStaticMembers); setAnchors(context,'f',&priStaticMethods);
setAnchors(context,'g',&pubSlots); setAnchors(context,'g',&pubSlots);
setAnchors(context,'h',&proSlots); setAnchors(context,'h',&proSlots);
setAnchors(context,'i',&priSlots); setAnchors(context,'i',&priSlots);
...@@ -687,7 +686,7 @@ static void writeTemplateSpec(OutputList &ol,Definition *d, ...@@ -687,7 +686,7 @@ static void writeTemplateSpec(OutputList &ol,Definition *d,
} }
// write the detailed description for this class // write the detailed description for this class
void ClassDef::writeDetailedDescription(OutputList &ol, OutputList &briefOutput, const QCString &pageType, bool exampleFlag) void ClassDef::writeDetailedDescription(OutputList &ol, const QCString &pageType, bool exampleFlag)
{ {
if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) || if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
!documentation().isEmpty() || !documentation().isEmpty() ||
...@@ -701,7 +700,7 @@ void ClassDef::writeDetailedDescription(OutputList &ol, OutputList &briefOutput, ...@@ -701,7 +700,7 @@ void ClassDef::writeDetailedDescription(OutputList &ol, OutputList &briefOutput,
ol.writeAnchor(0,"_details"); ol.writeAnchor(0,"_details");
ol.popGeneratorState(); ol.popGeneratorState();
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription()); ol.parseText(theTranslator->trDetailedDescription());
ol.endGroupHeader(); ol.endGroupHeader();
ol.startTextBlock(); ol.startTextBlock();
...@@ -710,7 +709,7 @@ void ClassDef::writeDetailedDescription(OutputList &ol, OutputList &briefOutput, ...@@ -710,7 +709,7 @@ void ClassDef::writeDetailedDescription(OutputList &ol, OutputList &briefOutput,
// repeat brief description // repeat brief description
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{ {
ol+=briefOutput; ol.parseDoc(briefFile(),briefLine(),name(),0,briefDescription(),FALSE);
} }
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") && if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
!documentation().isEmpty()) !documentation().isEmpty())
...@@ -724,7 +723,7 @@ void ClassDef::writeDetailedDescription(OutputList &ol, OutputList &briefOutput, ...@@ -724,7 +723,7 @@ void ClassDef::writeDetailedDescription(OutputList &ol, OutputList &briefOutput,
ol.disableAllBut(OutputGenerator::RTF); ol.disableAllBut(OutputGenerator::RTF);
ol.newParagraph(); ol.newParagraph();
ol.popGeneratorState(); ol.popGeneratorState();
parseDoc(ol,docFile(),docLine(),name(),0,documentation()+"\n"); ol.parseDoc(docFile(),docLine(),name(),0,documentation()+"\n",FALSE);
} }
// write examples // write examples
if (exampleFlag) if (exampleFlag)
...@@ -759,7 +758,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -759,7 +758,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (m_tempArgs) pageTitle.prepend(" Template"); if (m_tempArgs) pageTitle.prepend(" Template");
startFile(ol,getOutputFileBase(),name(),pageTitle); startFile(ol,getOutputFileBase(),name(),pageTitle);
startTitle(ol,getOutputFileBase()); startTitle(ol,getOutputFileBase());
parseText(ol,theTranslator->trCompoundReference(displayName(),m_compType,m_tempArgs!=0)); ol.parseText(theTranslator->trCompoundReference(displayName(),m_compType,m_tempArgs!=0));
addGroupListToTitle(ol,this); addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),name()); endTitle(ol,getOutputFileBase(),name());
...@@ -769,13 +768,11 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -769,13 +768,11 @@ void ClassDef::writeDocumentation(OutputList &ol)
bool exampleFlag=hasExamples(); bool exampleFlag=hasExamples();
// write brief description // write brief description
OutputList briefOutput(&ol);
if (!briefDescription().isEmpty()) if (!briefDescription().isEmpty())
{ {
parseDoc(briefOutput,briefFile(),briefLine(),name(),0,briefDescription());
if (!Config_getBool("DETAILS_AT_TOP")) if (!Config_getBool("DETAILS_AT_TOP"))
{ {
ol+=briefOutput; ol.parseDoc(briefFile(),briefLine(),name(),0,briefDescription(),FALSE);
ol.writeString(" \n"); ol.writeString(" \n");
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
...@@ -786,7 +783,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -786,7 +783,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
exampleFlag exampleFlag
) )
{ {
parseText(ol,theTranslator->trMore()); ol.parseText(theTranslator->trMore());
} }
ol.endTextLink(); ol.endTextLink();
ol.popGeneratorState(); ol.popGeneratorState();
...@@ -878,7 +875,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -878,7 +875,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
// now replace all markers in inheritLine with links to the classes // now replace all markers in inheritLine with links to the classes
while ((newIndex=marker.match(inheritLine,index,&matchLen))!=-1) while ((newIndex=marker.match(inheritLine,index,&matchLen))!=-1)
{ {
parseText(ol,inheritLine.mid(index,newIndex-index)); ol.parseText(inheritLine.mid(index,newIndex-index));
bool ok; bool ok;
uint entryIndex = inheritLine.mid(newIndex+1,matchLen-1).toUInt(&ok); uint entryIndex = inheritLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
BaseClassDef *bcd=m_inherits->at(entryIndex); BaseClassDef *bcd=m_inherits->at(entryIndex);
...@@ -917,7 +914,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -917,7 +914,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
} }
index=newIndex+matchLen; index=newIndex+matchLen;
} }
parseText(ol,inheritLine.right(inheritLine.length()-index)); ol.parseText(inheritLine.right(inheritLine.length()-index));
ol.newParagraph(); ol.newParagraph();
} }
...@@ -930,7 +927,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -930,7 +927,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
// now replace all markers in inheritLine with links to the classes // now replace all markers in inheritLine with links to the classes
while ((newIndex=marker.match(inheritLine,index,&matchLen))!=-1) while ((newIndex=marker.match(inheritLine,index,&matchLen))!=-1)
{ {
parseText(ol,inheritLine.mid(index,newIndex-index)); ol.parseText(inheritLine.mid(index,newIndex-index));
bool ok; bool ok;
uint entryIndex = inheritLine.mid(newIndex+1,matchLen-1).toUInt(&ok); uint entryIndex = inheritLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
BaseClassDef *bcd=m_inheritedBy->at(entryIndex); BaseClassDef *bcd=m_inheritedBy->at(entryIndex);
...@@ -949,7 +946,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -949,7 +946,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
} }
index=newIndex+matchLen; index=newIndex+matchLen;
} }
parseText(ol,inheritLine.right(inheritLine.length()-index)); ol.parseText(inheritLine.right(inheritLine.length()-index));
ol.newParagraph(); ol.newParagraph();
} }
...@@ -983,7 +980,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -983,7 +980,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
ol.startDotGraph(); ol.startDotGraph();
parseText(ol,theTranslator->trClassDiagram(displayName())); ol.parseText(theTranslator->trClassDiagram(displayName()));
ol.endDotGraph(inheritanceGraph); ol.endDotGraph(inheritanceGraph);
if (Config_getBool("GENERATE_LEGEND")) if (Config_getBool("GENERATE_LEGEND"))
{ {
...@@ -1005,7 +1002,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1005,7 +1002,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ClassDiagram diagram(this); // create a diagram of this class. ClassDiagram diagram(this); // create a diagram of this class.
ol.startClassDiagram(); ol.startClassDiagram();
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
parseText(ol,theTranslator->trClassDiagram(displayName())); ol.parseText(theTranslator->trClassDiagram(displayName()));
ol.enable(OutputGenerator::Man); ol.enable(OutputGenerator::Man);
ol.endClassDiagram(diagram,getOutputFileBase(),displayName()); ol.endClassDiagram(diagram,getOutputFileBase(),displayName());
} }
...@@ -1018,7 +1015,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1018,7 +1015,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
ol.startDotGraph(); ol.startDotGraph();
parseText(ol,theTranslator->trCollaborationDiagram(displayName())); ol.parseText(theTranslator->trCollaborationDiagram(displayName()));
ol.endDotGraph(usageImplGraph); ol.endDotGraph(usageImplGraph);
if (Config_getBool("GENERATE_LEGEND")) if (Config_getBool("GENERATE_LEGEND"))
{ {
...@@ -1043,7 +1040,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1043,7 +1040,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
{ {
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(m_memListFileName,0); ol.startTextLink(m_memListFileName,0);
parseText(ol,theTranslator->trListOfAllMembers()); ol.parseText(theTranslator->trListOfAllMembers());
ol.endTextLink(); ol.endTextLink();
ol.enableAll(); ol.enableAll();
} }
...@@ -1052,7 +1049,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1052,7 +1049,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
// write detailed description if the user wants it near the top // write detailed description if the user wants it near the top
if (Config_getBool("DETAILS_AT_TOP")) { if (Config_getBool("DETAILS_AT_TOP")) {
writeDetailedDescription(ol,briefOutput,pageType,exampleFlag); writeDetailedDescription(ol,pageType,exampleFlag);
} }
// write member groups // write member groups
...@@ -1082,8 +1079,8 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1082,8 +1079,8 @@ void ClassDef::writeDocumentation(OutputList &ol)
signals.writeDeclarations(ol,this,0,0,0,theTranslator->trSignals(),0); signals.writeDeclarations(ol,this,0,0,0,theTranslator->trSignals(),0);
dcopMethods.writeDeclarations(ol,this,0,0,0,theTranslator->trDCOPMethods(),0); dcopMethods.writeDeclarations(ol,this,0,0,0,theTranslator->trDCOPMethods(),0);
properties.writeDeclarations(ol,this,0,0,0,theTranslator->trProperties(),0); properties.writeDeclarations(ol,this,0,0,0,theTranslator->trProperties(),0);
pubMembers.writeDeclarations(ol,this,0,0,0,theTranslator->trPublicMembers(),0); pubMethods.writeDeclarations(ol,this,0,0,0,theTranslator->trPublicMembers(),0);
pubStaticMembers.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticPublicMembers(),0); pubStaticMethods.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticPublicMembers(),0);
// public attribs // public attribs
pubAttribs.writeDeclarations(ol,this,0,0,0,theTranslator->trPublicAttribs(),0); pubAttribs.writeDeclarations(ol,this,0,0,0,theTranslator->trPublicAttribs(),0);
...@@ -1094,8 +1091,8 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1094,8 +1091,8 @@ void ClassDef::writeDocumentation(OutputList &ol)
// protected methods // protected methods
proSlots.writeDeclarations(ol,this,0,0,0,theTranslator->trProtectedSlots(),0); proSlots.writeDeclarations(ol,this,0,0,0,theTranslator->trProtectedSlots(),0);
proMembers.writeDeclarations(ol,this,0,0,0,theTranslator->trProtectedMembers(),0); proMethods.writeDeclarations(ol,this,0,0,0,theTranslator->trProtectedMembers(),0);
proStaticMembers.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticProtectedMembers(),0); proStaticMethods.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticProtectedMembers(),0);
// protected attribs // protected attribs
proAttribs.writeDeclarations(ol,this,0,0,0,theTranslator->trProtectedAttribs(),0); proAttribs.writeDeclarations(ol,this,0,0,0,theTranslator->trProtectedAttribs(),0);
...@@ -1108,8 +1105,8 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1108,8 +1105,8 @@ void ClassDef::writeDocumentation(OutputList &ol)
// private members // private members
priSlots.writeDeclarations(ol,this,0,0,0,theTranslator->trPrivateSlots(),0); priSlots.writeDeclarations(ol,this,0,0,0,theTranslator->trPrivateSlots(),0);
priMembers.writeDeclarations(ol,this,0,0,0,theTranslator->trPrivateMembers(),0); priMethods.writeDeclarations(ol,this,0,0,0,theTranslator->trPrivateMembers(),0);
priStaticMembers.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticPrivateMembers(),0); priStaticMethods.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticPrivateMembers(),0);
// private attribs // private attribs
priAttribs.writeDeclarations(ol,this,0,0,0,theTranslator->trPrivateAttribs(),0); priAttribs.writeDeclarations(ol,this,0,0,0,theTranslator->trPrivateAttribs(),0);
...@@ -1128,7 +1125,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1128,7 +1125,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
// write detailed description // write detailed description
if (!Config_getBool("DETAILS_AT_TOP")) { if (!Config_getBool("DETAILS_AT_TOP")) {
writeDetailedDescription(ol,briefOutput,pageType,exampleFlag); writeDetailedDescription(ol,pageType,exampleFlag);
} }
...@@ -1162,7 +1159,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1162,7 +1159,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
{ {
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
ol.writeRuler(); ol.writeRuler();
parseText(ol,theTranslator->trGeneratedFromFiles(m_compType,m_files.count()==1)); ol.parseText(theTranslator->trGeneratedFromFiles(m_compType,m_files.count()==1));
bool first=TRUE; bool first=TRUE;
const char *file = m_files.first(); const char *file = m_files.first();
...@@ -1230,9 +1227,9 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1230,9 +1227,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.disableAllBut(OutputGenerator::Man); ol.disableAllBut(OutputGenerator::Man);
ol.writeString("\n"); ol.writeString("\n");
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trAuthor(TRUE,TRUE)); ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader(); ol.endGroupHeader();
parseText(ol,theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME"))); ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
ol.popGeneratorState(); ol.popGeneratorState();
ol.endTextBlock(); ol.endTextBlock();
...@@ -1282,11 +1279,11 @@ void ClassDef::writeMemberList(OutputList &ol) ...@@ -1282,11 +1279,11 @@ void ClassDef::writeMemberList(OutputList &ol)
startFile(ol,m_memListFileName,m_memListFileName, startFile(ol,m_memListFileName,m_memListFileName,
theTranslator->trMemberList()); theTranslator->trMemberList());
startTitle(ol,0); startTitle(ol,0);
parseText(ol,displayName()+" "+theTranslator->trMemberList()); ol.parseText(displayName()+" "+theTranslator->trMemberList());
endTitle(ol,0,0); endTitle(ol,0,0);
parseText(ol,theTranslator->trThisIsTheListOfAllMembers()); ol.parseText(theTranslator->trThisIsTheListOfAllMembers());
ol.writeObjectLink(getReference(),getOutputFileBase(),0,displayName()); ol.writeObjectLink(getReference(),getOutputFileBase(),0,displayName());
parseText(ol,theTranslator->trIncludingInheritedMembers()); ol.parseText(theTranslator->trIncludingInheritedMembers());
//ol.startItemList(); //ol.startItemList();
ol.writeString("<table>\n"); ol.writeString("<table>\n");
...@@ -1326,9 +1323,9 @@ void ClassDef::writeMemberList(OutputList &ol) ...@@ -1326,9 +1323,9 @@ void ClassDef::writeMemberList(OutputList &ol)
(md->isFriend() && md->argsString())) (md->isFriend() && md->argsString()))
ol.docify(md->argsString()); ol.docify(md->argsString());
else if (md->isEnumerate()) else if (md->isEnumerate())
parseText(ol," "+theTranslator->trEnumName()); ol.parseText(" "+theTranslator->trEnumName());
else if (md->isEnumValue()) else if (md->isEnumValue())
parseText(ol," "+theTranslator->trEnumValue()); ol.parseText(" "+theTranslator->trEnumValue());
else if (md->isTypedef()) else if (md->isTypedef())
ol.docify(" typedef"); ol.docify(" typedef");
else if (md->isFriend() && !strcmp(md->typeString(),"friend class")) else if (md->isFriend() && !strcmp(md->typeString(),"friend class"))
...@@ -1350,13 +1347,13 @@ void ClassDef::writeMemberList(OutputList &ol) ...@@ -1350,13 +1347,13 @@ void ClassDef::writeMemberList(OutputList &ol)
if ( md->isFunction() || md->isSignal() || md->isSlot() ) if ( md->isFunction() || md->isSignal() || md->isSlot() )
ol.docify(md->argsString()); ol.docify(md->argsString());
else if (md->isEnumerate()) else if (md->isEnumerate())
parseText(ol," "+theTranslator->trEnumName()); ol.parseText(" "+theTranslator->trEnumName());
else if (md->isEnumValue()) else if (md->isEnumValue())
parseText(ol," "+theTranslator->trEnumValue()); ol.parseText(" "+theTranslator->trEnumValue());
else if (md->isTypedef()) else if (md->isTypedef())
ol.docify(" typedef"); ol.docify(" typedef");
ol.writeString(" ("); ol.writeString(" (");
parseText(ol,theTranslator->trDefinedIn()+" "); ol.parseText(theTranslator->trDefinedIn()+" ");
if (cd->isLinkable()) if (cd->isLinkable())
{ {
ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,cd->displayName()); ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,cd->displayName());
...@@ -1547,8 +1544,8 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup) ...@@ -1547,8 +1544,8 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup)
pubTypes.setInGroup(inGroup); pubTypes.setInGroup(inGroup);
pubTypes.writePlainDeclarations(ol,this,0,0,0); pubTypes.writePlainDeclarations(ol,this,0,0,0);
pubMembers.setInGroup(inGroup); pubMethods.setInGroup(inGroup);
pubMembers.writePlainDeclarations(ol,this,0,0,0); pubMethods.writePlainDeclarations(ol,this,0,0,0);
pubAttribs.setInGroup(inGroup); pubAttribs.setInGroup(inGroup);
pubAttribs.writePlainDeclarations(ol,this,0,0,0); pubAttribs.writePlainDeclarations(ol,this,0,0,0);
pubSlots.setInGroup(inGroup); pubSlots.setInGroup(inGroup);
...@@ -1559,34 +1556,34 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup) ...@@ -1559,34 +1556,34 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup)
dcopMethods.writePlainDeclarations(ol,this,0,0,0); dcopMethods.writePlainDeclarations(ol,this,0,0,0);
properties.setInGroup(inGroup); properties.setInGroup(inGroup);
properties.writePlainDeclarations(ol,this,0,0,0); properties.writePlainDeclarations(ol,this,0,0,0);
pubStaticMembers.setInGroup(inGroup); pubStaticMethods.setInGroup(inGroup);
pubStaticMembers.writePlainDeclarations(ol,this,0,0,0); pubStaticMethods.writePlainDeclarations(ol,this,0,0,0);
pubStaticAttribs.setInGroup(inGroup); pubStaticAttribs.setInGroup(inGroup);
pubStaticAttribs.writePlainDeclarations(ol,this,0,0,0); pubStaticAttribs.writePlainDeclarations(ol,this,0,0,0);
proTypes.setInGroup(inGroup); proTypes.setInGroup(inGroup);
proTypes.writePlainDeclarations(ol,this,0,0,0); proTypes.writePlainDeclarations(ol,this,0,0,0);
proMembers.setInGroup(inGroup); proMethods.setInGroup(inGroup);
proMembers.writePlainDeclarations(ol,this,0,0,0); proMethods.writePlainDeclarations(ol,this,0,0,0);
proAttribs.setInGroup(inGroup); proAttribs.setInGroup(inGroup);
proAttribs.writePlainDeclarations(ol,this,0,0,0); proAttribs.writePlainDeclarations(ol,this,0,0,0);
proSlots.setInGroup(inGroup); proSlots.setInGroup(inGroup);
proSlots.writePlainDeclarations(ol,this,0,0,0); proSlots.writePlainDeclarations(ol,this,0,0,0);
proStaticMembers.setInGroup(inGroup); proStaticMethods.setInGroup(inGroup);
proStaticMembers.writePlainDeclarations(ol,this,0,0,0); proStaticMethods.writePlainDeclarations(ol,this,0,0,0);
proStaticAttribs.setInGroup(inGroup); proStaticAttribs.setInGroup(inGroup);
proStaticAttribs.writePlainDeclarations(ol,this,0,0,0); proStaticAttribs.writePlainDeclarations(ol,this,0,0,0);
if (Config_getBool("EXTRACT_PRIVATE")) if (Config_getBool("EXTRACT_PRIVATE"))
{ {
priTypes.setInGroup(inGroup); priTypes.setInGroup(inGroup);
priTypes.writePlainDeclarations(ol,this,0,0,0); priTypes.writePlainDeclarations(ol,this,0,0,0);
priMembers.setInGroup(inGroup); priMethods.setInGroup(inGroup);
priMembers.writePlainDeclarations(ol,this,0,0,0); priMethods.writePlainDeclarations(ol,this,0,0,0);
priAttribs.setInGroup(inGroup); priAttribs.setInGroup(inGroup);
priAttribs.writePlainDeclarations(ol,this,0,0,0); priAttribs.writePlainDeclarations(ol,this,0,0,0);
priSlots.setInGroup(inGroup); priSlots.setInGroup(inGroup);
priSlots.writePlainDeclarations(ol,this,0,0,0); priSlots.writePlainDeclarations(ol,this,0,0,0);
priStaticMembers.setInGroup(inGroup); priStaticMethods.setInGroup(inGroup);
priStaticMembers.writePlainDeclarations(ol,this,0,0,0); priStaticMethods.writePlainDeclarations(ol,this,0,0,0);
priStaticAttribs.setInGroup(inGroup); priStaticAttribs.setInGroup(inGroup);
priStaticAttribs.writePlainDeclarations(ol,this,0,0,0); priStaticAttribs.writePlainDeclarations(ol,this,0,0,0);
} }
......
...@@ -102,7 +102,7 @@ class ClassDef : public Definition ...@@ -102,7 +102,7 @@ class ClassDef : public Definition
void writeDocumentationForInnerClasses(OutputList &ol); void writeDocumentationForInnerClasses(OutputList &ol);
void writeMemberList(OutputList &ol); void writeMemberList(OutputList &ol);
void writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup); void writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup);
void writeDetailedDescription(OutputList &ol,OutputList &briefOutput,const QCString &pageType,bool exampleFlag); void writeDetailedDescription(OutputList &ol,const QCString &pageType,bool exampleFlag);
/*! Return the protection level (Public,Protected,Private) in which /*! Return the protection level (Public,Protected,Private) in which
* this compound was found. * this compound was found.
...@@ -203,12 +203,12 @@ class ClassDef : public Definition ...@@ -203,12 +203,12 @@ class ClassDef : public Definition
QCString className() const; QCString className() const;
/* member lists by protection */ /* member lists by protection */
MemberList pubMembers; MemberList pubMethods;
MemberList proMembers; MemberList proMethods;
MemberList priMembers; MemberList priMethods;
MemberList pubStaticMembers; MemberList pubStaticMethods;
MemberList proStaticMembers; MemberList proStaticMethods;
MemberList priStaticMembers; MemberList priStaticMethods;
MemberList pubSlots; MemberList pubSlots;
MemberList proSlots; MemberList proSlots;
MemberList priSlots; MemberList priSlots;
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include "util.h" #include "util.h"
#include "outputlist.h" #include "outputlist.h"
#include "language.h" #include "language.h"
#include "doc.h"
#include "doxygen.h" #include "doxygen.h"
ClassList::ClassList() : QList<ClassDef>() ClassList::ClassList() : QList<ClassDef>()
...@@ -79,11 +78,11 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f ...@@ -79,11 +78,11 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f
ol.startMemberHeader(); ol.startMemberHeader();
if (header) if (header)
{ {
parseText(ol,header); ol.parseText(header);
} }
else else
{ {
parseText(ol,theTranslator->trCompounds()); ol.parseText(theTranslator->trCompounds());
} }
ol.endMemberHeader(); ol.endMemberHeader();
ol.startMemberList(); ol.startMemberList();
...@@ -117,7 +116,8 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f ...@@ -117,7 +116,8 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f
if (!cd->briefDescription().isEmpty()) if (!cd->briefDescription().isEmpty())
{ {
ol.startMemberDescription(); ol.startMemberDescription();
parseDoc(ol,cd->briefFile(),cd->briefLine(),cd->name(),0,cd->briefDescription()); ol.parseDoc(cd->briefFile(),cd->briefLine(),cd->name(),0,
cd->briefDescription(),FALSE);
if ((!cd->briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) || if ((!cd->briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
!cd->documentation().isEmpty()) !cd->documentation().isEmpty())
{ {
...@@ -126,7 +126,7 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f ...@@ -126,7 +126,7 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f
ol.endEmphasis(); ol.endEmphasis();
ol.docify(" "); ol.docify(" ");
ol.startTextLink(cd->getOutputFileBase(),"_details"); ol.startTextLink(cd->getOutputFileBase(),"_details");
parseText(ol,theTranslator->trMore()); ol.parseText(theTranslator->trMore());
ol.endTextLink(); ol.endTextLink();
ol.startEmphasis(); ol.startEmphasis();
ol.popGeneratorState(); ol.popGeneratorState();
......
...@@ -2191,6 +2191,18 @@ void Config::create() ...@@ -2191,6 +2191,18 @@ void Config::create()
FALSE ); FALSE );
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
addInfo( "Perl","configuration options related to the Perl output");
//-----------------------------------------------------------------------------------------------
cb = addBool(
"GENERATE_PERLMOD",
"If the GENERATE_PERLMOD tag is set to YES Doxygen will \n"
"generate a Perl module file that captures the structure of \n"
"the code including all documentation. Note that this \n"
"feature is still experimental and incomplete at the \n"
"moment. \n",
FALSE
);
//-----------------------------------------------------------------------------------------------
addInfo( "Preprocessor","Configuration options related to the preprocessor "); addInfo( "Preprocessor","Configuration options related to the preprocessor ");
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
cb = addBool( cb = addBool(
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "util.h" #include "util.h"
#include "defargs.h" #include "defargs.h"
#include "outputgen.h" #include "outputgen.h"
#include "doc.h"
#include "dot.h" #include "dot.h"
#include "code.h" #include "code.h"
...@@ -407,36 +406,36 @@ void generateDEFForClass(ClassDef *cd,QTextStream &t) ...@@ -407,36 +406,36 @@ void generateDEFForClass(ClassDef *cd,QTextStream &t)
} }
int numMembers = int numMembers =
cd->pubTypes.count()+cd->pubMembers.count()+cd->pubAttribs.count()+ cd->pubTypes.count()+cd->pubMethods.count()+cd->pubAttribs.count()+
cd->pubSlots.count()+cd->signals.count()+cd->dcopMethods.count()+ cd->pubSlots.count()+cd->signals.count()+cd->dcopMethods.count()+
cd->pubStaticMembers.count()+ cd->pubStaticMethods.count()+
cd->pubStaticAttribs.count()+cd->proTypes.count()+cd->proMembers.count()+ cd->pubStaticAttribs.count()+cd->proTypes.count()+cd->proMethods.count()+
cd->proAttribs.count()+cd->proSlots.count()+cd->proStaticMembers.count()+ cd->proAttribs.count()+cd->proSlots.count()+cd->proStaticMethods.count()+
cd->proStaticAttribs.count()+cd->priTypes.count()+cd->priMembers.count()+ cd->proStaticAttribs.count()+cd->priTypes.count()+cd->priMethods.count()+
cd->priAttribs.count()+cd->priSlots.count()+cd->priStaticMembers.count()+ cd->priAttribs.count()+cd->priSlots.count()+cd->priStaticMethods.count()+
cd->priStaticAttribs.count()+cd->friends.count()+cd->related.count(); cd->priStaticAttribs.count()+cd->friends.count()+cd->related.count();
if (numMembers>0) if (numMembers>0)
{ {
generateDEFClassSection(cd,t,&cd->pubTypes,"public-type"); generateDEFClassSection(cd,t,&cd->pubTypes,"public-type");
generateDEFClassSection(cd,t,&cd->pubMembers,"public-func"); generateDEFClassSection(cd,t,&cd->pubMethods,"public-func");
generateDEFClassSection(cd,t,&cd->pubAttribs,"public-attrib"); generateDEFClassSection(cd,t,&cd->pubAttribs,"public-attrib");
generateDEFClassSection(cd,t,&cd->pubSlots,"public-slot"); generateDEFClassSection(cd,t,&cd->pubSlots,"public-slot");
generateDEFClassSection(cd,t,&cd->signals,"signal"); generateDEFClassSection(cd,t,&cd->signals,"signal");
generateDEFClassSection(cd,t,&cd->dcopMethods,"dcop-func"); generateDEFClassSection(cd,t,&cd->dcopMethods,"dcop-func");
generateDEFClassSection(cd,t,&cd->properties,"property"); generateDEFClassSection(cd,t,&cd->properties,"property");
generateDEFClassSection(cd,t,&cd->pubStaticMembers,"public-static-func"); generateDEFClassSection(cd,t,&cd->pubStaticMethods,"public-static-func");
generateDEFClassSection(cd,t,&cd->pubStaticAttribs,"public-static-attrib"); generateDEFClassSection(cd,t,&cd->pubStaticAttribs,"public-static-attrib");
generateDEFClassSection(cd,t,&cd->proTypes,"protected-type"); generateDEFClassSection(cd,t,&cd->proTypes,"protected-type");
generateDEFClassSection(cd,t,&cd->proMembers,"protected-func"); generateDEFClassSection(cd,t,&cd->proMethods,"protected-func");
generateDEFClassSection(cd,t,&cd->proAttribs,"protected-attrib"); generateDEFClassSection(cd,t,&cd->proAttribs,"protected-attrib");
generateDEFClassSection(cd,t,&cd->proSlots,"protected-slot"); generateDEFClassSection(cd,t,&cd->proSlots,"protected-slot");
generateDEFClassSection(cd,t,&cd->proStaticMembers,"protected-static-func"); generateDEFClassSection(cd,t,&cd->proStaticMethods,"protected-static-func");
generateDEFClassSection(cd,t,&cd->proStaticAttribs,"protected-static-attrib"); generateDEFClassSection(cd,t,&cd->proStaticAttribs,"protected-static-attrib");
generateDEFClassSection(cd,t,&cd->priTypes,"private-type"); generateDEFClassSection(cd,t,&cd->priTypes,"private-type");
generateDEFClassSection(cd,t,&cd->priMembers,"private-func"); generateDEFClassSection(cd,t,&cd->priMethods,"private-func");
generateDEFClassSection(cd,t,&cd->priAttribs,"private-attrib"); generateDEFClassSection(cd,t,&cd->priAttribs,"private-attrib");
generateDEFClassSection(cd,t,&cd->priSlots,"private-slot"); generateDEFClassSection(cd,t,&cd->priSlots,"private-slot");
generateDEFClassSection(cd,t,&cd->priStaticMembers,"private-static-func"); generateDEFClassSection(cd,t,&cd->priStaticMethods,"private-static-func");
generateDEFClassSection(cd,t,&cd->priStaticAttribs,"private-static-attrib"); generateDEFClassSection(cd,t,&cd->priStaticAttribs,"private-static-attrib");
generateDEFClassSection(cd,t,&cd->friends,"signal"); generateDEFClassSection(cd,t,&cd->friends,"signal");
generateDEFClassSection(cd,t,&cd->related,"related"); generateDEFClassSection(cd,t,&cd->related,"related");
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include "language.h" #include "language.h"
#include "message.h" #include "message.h"
#include "outputlist.h" #include "outputlist.h"
#include "doc.h"
#include "code.h" #include "code.h"
#include "util.h" #include "util.h"
#include "groupdef.h" #include "groupdef.h"
...@@ -55,6 +54,9 @@ Definition::Definition(const char *df,int dl, ...@@ -55,6 +54,9 @@ Definition::Definition(const char *df,int dl,
m_partOfGroups=0; m_partOfGroups=0;
m_specialListItems=0; m_specialListItems=0;
m_briefLine=1; m_briefLine=1;
m_briefFile=(QCString)"<"+name+">";
m_docLine=1;
m_docFile=(QCString)"<"+name+">";
} }
Definition::~Definition() Definition::~Definition()
...@@ -69,6 +71,7 @@ Definition::~Definition() ...@@ -69,6 +71,7 @@ Definition::~Definition()
void Definition::addSectionsToDefinition(QList<QCString> *anchorList) void Definition::addSectionsToDefinition(QList<QCString> *anchorList)
{ {
if (!anchorList) return; if (!anchorList) return;
//printf("%s: addSectionsToDefinition(%d)\n",name().data(),anchorList->count());
QCString *s=anchorList->first(); QCString *s=anchorList->first();
while (s) while (s)
{ {
...@@ -87,6 +90,10 @@ void Definition::addSectionsToDefinition(QList<QCString> *anchorList) ...@@ -87,6 +90,10 @@ void Definition::addSectionsToDefinition(QList<QCString> *anchorList)
} }
si->definition = this; si->definition = this;
} }
else
{
//printf("Section `%s' not found!\n",s->data());
}
s=anchorList->next(); s=anchorList->next();
} }
} }
...@@ -95,12 +102,14 @@ void Definition::writeDocAnchorsToTagFile() ...@@ -95,12 +102,14 @@ void Definition::writeDocAnchorsToTagFile()
{ {
if (!Config_getString("GENERATE_TAGFILE").isEmpty() && m_sectionDict) if (!Config_getString("GENERATE_TAGFILE").isEmpty() && m_sectionDict)
{ {
//printf("%s: writeDocAnchors(%d)\n",name().data(),m_sectionDict->count());
QDictIterator<SectionInfo> sdi(*m_sectionDict); QDictIterator<SectionInfo> sdi(*m_sectionDict);
SectionInfo *si; SectionInfo *si;
for (;(si=sdi.current());++sdi) for (;(si=sdi.current());++sdi)
{ {
if (!si->generated) if (!si->generated)
{ {
//printf("write an entry!\n");
if (definitionType()==TypeMember) Doxygen::tagFile << " "; if (definitionType()==TypeMember) Doxygen::tagFile << " ";
Doxygen::tagFile << " <docanchor>" << si->label << "</docanchor>" << endl; Doxygen::tagFile << " <docanchor>" << si->label << "</docanchor>" << endl;
} }
...@@ -265,7 +274,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *) ...@@ -265,7 +274,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
if (lineMarkerPos<fileMarkerPos) // line marker before file marker if (lineMarkerPos<fileMarkerPos) // line marker before file marker
{ {
// write text left from linePos marker // write text left from linePos marker
parseText(ol,refText.left(lineMarkerPos)); ol.parseText(refText.left(lineMarkerPos));
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
// write line link (HTML only) // write line link (HTML only)
ol.writeObjectLink(0,m_bodyDef->getSourceFileBase(), ol.writeObjectLink(0,m_bodyDef->getSourceFileBase(),
...@@ -277,7 +286,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *) ...@@ -277,7 +286,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
ol.enableAll(); ol.enableAll();
// write text between markers // write text between markers
parseText(ol,refText.mid(lineMarkerPos+2, ol.parseText(refText.mid(lineMarkerPos+2,
fileMarkerPos-lineMarkerPos-2)); fileMarkerPos-lineMarkerPos-2));
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
...@@ -291,13 +300,13 @@ void Definition::writeSourceDef(OutputList &ol,const char *) ...@@ -291,13 +300,13 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
ol.enableAll(); ol.enableAll();
// write text right from file marker // write text right from file marker
parseText(ol,refText.right( ol.parseText(refText.right(
refText.length()-fileMarkerPos-2)); refText.length()-fileMarkerPos-2));
} }
else // file marker before line marker else // file marker before line marker
{ {
// write text left from file marker // write text left from file marker
parseText(ol,refText.left(fileMarkerPos)); ol.parseText(refText.left(fileMarkerPos));
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
// write file link (HTML only) // write file link (HTML only)
ol.writeObjectLink(0,m_bodyDef->getSourceFileBase(), ol.writeObjectLink(0,m_bodyDef->getSourceFileBase(),
...@@ -309,7 +318,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *) ...@@ -309,7 +318,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
ol.enableAll(); ol.enableAll();
// write text between markers // write text between markers
parseText(ol,refText.mid(fileMarkerPos+2, ol.parseText(refText.mid(fileMarkerPos+2,
lineMarkerPos-fileMarkerPos-2)); lineMarkerPos-fileMarkerPos-2));
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
...@@ -323,7 +332,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *) ...@@ -323,7 +332,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
ol.enableAll(); ol.enableAll();
// write text right from linePos marker // write text right from linePos marker
parseText(ol,refText.right( ol.parseText(refText.right(
refText.length()-lineMarkerPos-2)); refText.length()-lineMarkerPos-2));
} }
} }
...@@ -377,7 +386,7 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName, ...@@ -377,7 +386,7 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName,
if (Config_getBool("SOURCE_BROWSER") && members) if (Config_getBool("SOURCE_BROWSER") && members)
{ {
ol.newParagraph(); ol.newParagraph();
parseText(ol,text); ol.parseText(text);
ol.docify(" "); ol.docify(" ");
QCString ldefLine=theTranslator->trWriteList(members->count()); QCString ldefLine=theTranslator->trWriteList(members->count());
...@@ -388,7 +397,7 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName, ...@@ -388,7 +397,7 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName,
while ((newIndex=marker.match(ldefLine,index,&matchLen))!=-1) while ((newIndex=marker.match(ldefLine,index,&matchLen))!=-1)
{ {
bool ok; bool ok;
parseText(ol,ldefLine.mid(index,newIndex-index)); ol.parseText(ldefLine.mid(index,newIndex-index));
uint entryIndex = ldefLine.mid(newIndex+1,matchLen-1).toUInt(&ok); uint entryIndex = ldefLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
MemberDef *md=members->at(entryIndex); MemberDef *md=members->at(entryIndex);
if (ok && md) if (ok && md)
...@@ -452,7 +461,7 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName, ...@@ -452,7 +461,7 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName,
} }
index=newIndex+matchLen; index=newIndex+matchLen;
} }
parseText(ol,ldefLine.right(ldefLine.length()-index)); ol.parseText(ldefLine.right(ldefLine.length()-index));
ol.writeString("."); ol.writeString(".");
} }
ol.popGeneratorState(); ol.popGeneratorState();
......
...@@ -347,7 +347,7 @@ static void includeFile(OutputDocInterface &od,const char *fileName,bool quiet) ...@@ -347,7 +347,7 @@ static void includeFile(OutputDocInterface &od,const char *fileName,bool quiet)
FileDef *fd; FileDef *fd;
if ((fd=findFileDef(Doxygen::exampleNameDict,fileName,ambig))) if ((fd=findFileDef(Doxygen::exampleNameDict,fileName,ambig)))
{ {
currentIncludeFile=fileToString(fd->absFilePath()); currentIncludeFile=fileToString(fd->absFilePath(),Config_getBool("FILTER_SOURCE_FILES"));
includeFileOffset=0; includeFileOffset=0;
includeFileLength=currentIncludeFile.length(); includeFileLength=currentIncludeFile.length();
OutputDocInterface *codeFrag = od.clone(); OutputDocInterface *codeFrag = od.clone();
...@@ -384,7 +384,7 @@ static void verbIncludeFile(OutputDocInterface &od,const char *name) ...@@ -384,7 +384,7 @@ static void verbIncludeFile(OutputDocInterface &od,const char *name)
if ((fd=findFileDef(Doxygen::exampleNameDict,name,ambig))) if ((fd=findFileDef(Doxygen::exampleNameDict,name,ambig)))
{ {
od.startCodeFragment(); od.startCodeFragment();
od.codify(fileToString(fd->absFilePath())+"\n"); od.codify(fileToString(fd->absFilePath(),Config_getBool("FILTER_SOURCE_FILES"))+"\n");
od.endCodeFragment(); od.endCodeFragment();
} }
else if (ambig) else if (ambig)
...@@ -2959,7 +2959,7 @@ void parseDoc(OutputDocInterface &od,const char *fileName,int startLine, ...@@ -2959,7 +2959,7 @@ void parseDoc(OutputDocInterface &od,const char *fileName,int startLine,
if (Debug::isFlagSet(Debug::Validate)) if (Debug::isFlagSet(Debug::Validate))
{ {
od.parseDoc(fileName,startLine,clName,md,docStr); od.parseDoc(fileName,startLine,clName,md,docStr,FALSE);
} }
else else
{ {
...@@ -3029,6 +3029,12 @@ void parseDoc(OutputDocInterface &od,const char *fileName,int startLine, ...@@ -3029,6 +3029,12 @@ void parseDoc(OutputDocInterface &od,const char *fileName,int startLine,
void parseText(OutputDocInterface &od,const QCString &txtString) void parseText(OutputDocInterface &od,const QCString &txtString)
{ {
if (txtString.isEmpty()) return; if (txtString.isEmpty()) return;
if (Debug::isFlagSet(Debug::Validate))
{
od.parseText(txtString);
}
else
{
inputString = txtString; inputString = txtString;
outDoc = od.clone(); outDoc = od.clone();
inputPosition = 0; inputPosition = 0;
...@@ -3038,6 +3044,7 @@ void parseText(OutputDocInterface &od,const QCString &txtString) ...@@ -3038,6 +3044,7 @@ void parseText(OutputDocInterface &od,const QCString &txtString)
od.append(outDoc); od.append(outDoc);
delete outDoc; outDoc=0; delete outDoc; outDoc=0;
return; return;
}
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -3045,12 +3052,19 @@ void parseText(OutputDocInterface &od,const QCString &txtString) ...@@ -3045,12 +3052,19 @@ void parseText(OutputDocInterface &od,const QCString &txtString)
void parseExample(OutputDocInterface &od,const QCString &docString, void parseExample(OutputDocInterface &od,const QCString &docString,
const char *fileName) const char *fileName)
{ {
if (Debug::isFlagSet(Debug::Validate))
{
od.parseDoc(fileName,/*startLine*/1,/*clName*/0,/*md*/0,docString,TRUE);
}
else
{
initParser(); initParser();
initParseCodeContext(); initParseCodeContext();
exampleDoc=TRUE; // cross reference with member docs exampleDoc=TRUE; // cross reference with member docs
exampleName=fileName; exampleName=fileName;
strcpy(yyFileName,fileName); strcpy(yyFileName,fileName);
parseDocument(od,docString); parseDocument(od,docString);
}
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
......
...@@ -41,11 +41,16 @@ ...@@ -41,11 +41,16 @@
#define DBG(x) do {} while(0) #define DBG(x) do {} while(0)
//#define DBG(x) printf x //#define DBG(x) printf x
#define INTERNAL_ASSERT(x) do {} while(0)
//#define INTERNAL_ASSERT(x) if (!(x)) DBG(("INTERNAL_ASSERT(%s) failed retval=0x%x: file=%s line=%d\n",#x,retval,__FILE__,__LINE__));
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// global variables during a call to validatingParseDoc
static bool g_hasParamCommand; static bool g_hasParamCommand;
static MemberDef * g_memberDef; static MemberDef * g_memberDef;
static QDict<void> g_paramsFound; static QDict<void> g_paramsFound;
static bool g_isExample;
// include file state // include file state
static QString g_includeFileText; static QString g_includeFileText;
...@@ -426,7 +431,7 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children, ...@@ -426,7 +431,7 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
tokenName.data()); tokToString(tok));
break; break;
} }
} }
...@@ -601,7 +606,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children ...@@ -601,7 +606,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
{ {
doctokenizerYYsetStateHtmlOnly(); doctokenizerYYsetStateHtmlOnly();
int retval = doctokenizerYYlex(); int retval = doctokenizerYYlex();
children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::HtmlOnly)); children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::HtmlOnly,g_isExample,g_fileName));
if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: htmlonly section ended without end marker"); if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: htmlonly section ended without end marker");
doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara();
} }
...@@ -610,7 +615,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children ...@@ -610,7 +615,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
{ {
doctokenizerYYsetStateLatexOnly(); doctokenizerYYsetStateLatexOnly();
int retval = doctokenizerYYlex(); int retval = doctokenizerYYlex();
children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::LatexOnly)); children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::LatexOnly,g_isExample,g_fileName));
if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: latexonly section ended without end marker",doctokenizerYYlineno); if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: latexonly section ended without end marker",doctokenizerYYlineno);
doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara();
} }
...@@ -896,7 +901,7 @@ static void readTextFileByName(const QString &file,QString &text) ...@@ -896,7 +901,7 @@ static void readTextFileByName(const QString &file,QString &text)
FileDef *fd; FileDef *fd;
if ((fd=findFileDef(Doxygen::exampleNameDict,file,ambig))) if ((fd=findFileDef(Doxygen::exampleNameDict,file,ambig)))
{ {
text = fileToString(fd->absFilePath()); text = fileToString(fd->absFilePath(),Config_getBool("FILTER_SOURCE_FILES"));
} }
else if (ambig) else if (ambig)
{ {
...@@ -1209,7 +1214,7 @@ void DocSecRefItem::parse() ...@@ -1209,7 +1214,7 @@ void DocSecRefItem::parse()
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
g_token->name.data()); tokToString(tok));
break; break;
} }
} }
...@@ -1251,7 +1256,7 @@ void DocSecRefList::parse() ...@@ -1251,7 +1256,7 @@ void DocSecRefList::parse()
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
// skip white space // skip white space
while (tok==TK_WHITESPACE) tok=doctokenizerYYlex(); while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=doctokenizerYYlex();
// handle items // handle items
while (tok) while (tok)
{ {
...@@ -1346,7 +1351,7 @@ void DocInternalRef::parse() ...@@ -1346,7 +1351,7 @@ void DocInternalRef::parse()
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
g_token->name.data()); tokToString(tok));
break; break;
} }
} }
...@@ -1431,7 +1436,7 @@ void DocRef::parse() ...@@ -1431,7 +1436,7 @@ void DocRef::parse()
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
g_token->name.data()); tokToString(tok));
break; break;
} }
} }
...@@ -1531,7 +1536,7 @@ QString DocLink::parse(bool isJavaLink) ...@@ -1531,7 +1536,7 @@ QString DocLink::parse(bool isJavaLink)
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
g_token->name.data()); tokToString(tok));
break; break;
} }
} }
...@@ -1576,7 +1581,7 @@ void DocDotFile::parse() ...@@ -1576,7 +1581,7 @@ void DocDotFile::parse()
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
g_token->name.data()); tokToString(tok));
break; break;
} }
} }
...@@ -1653,7 +1658,7 @@ void DocImage::parse() ...@@ -1653,7 +1658,7 @@ void DocImage::parse()
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
g_token->name.data()); tokToString(tok));
break; break;
} }
} }
...@@ -1748,7 +1753,7 @@ int DocHtmlHeader::parse() ...@@ -1748,7 +1753,7 @@ int DocHtmlHeader::parse()
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
g_token->name.data()); tokToString(tok));
break; break;
} }
} }
...@@ -1805,7 +1810,7 @@ int DocHRef::parse() ...@@ -1805,7 +1810,7 @@ int DocHRef::parse()
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
g_token->name.data(),doctokenizerYYlineno); tokToString(tok),doctokenizerYYlineno);
break; break;
} }
} }
...@@ -1947,7 +1952,7 @@ int DocIndexEntry::parse() ...@@ -1947,7 +1952,7 @@ int DocIndexEntry::parse()
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
g_token->name.data()); tokToString(tok));
break; break;
} }
} }
...@@ -1998,7 +2003,7 @@ int DocHtmlCaption::parse() ...@@ -1998,7 +2003,7 @@ int DocHtmlCaption::parse()
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
g_token->name.data()); tokToString(tok));
break; break;
} }
} }
...@@ -2058,7 +2063,7 @@ int DocHtmlRow::parse() ...@@ -2058,7 +2063,7 @@ int DocHtmlRow::parse()
// get next token // get next token
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
// skip whitespace // skip whitespace
while (tok==TK_WHITESPACE) tok=doctokenizerYYlex(); while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=doctokenizerYYlex();
// should find a html tag now // should find a html tag now
if (tok==TK_HTMLTAG) if (tok==TK_HTMLTAG)
{ {
...@@ -2122,7 +2127,7 @@ getrow: ...@@ -2122,7 +2127,7 @@ getrow:
// get next token // get next token
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
// skip whitespace // skip whitespace
while (tok==TK_WHITESPACE) tok=doctokenizerYYlex(); while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=doctokenizerYYlex();
// should find a html tag now // should find a html tag now
if (tok==TK_HTMLTAG) if (tok==TK_HTMLTAG)
{ {
...@@ -2224,7 +2229,7 @@ int DocHtmlDescTitle::parse() ...@@ -2224,7 +2229,7 @@ int DocHtmlDescTitle::parse()
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
g_token->name.data()); tokToString(tok));
break; break;
} }
} }
...@@ -2397,12 +2402,13 @@ int DocHtmlList::parse() ...@@ -2397,12 +2402,13 @@ int DocHtmlList::parse()
{ {
DBG(("DocHtmlList::parse() start\n")); DBG(("DocHtmlList::parse() start\n"));
int retval=RetVal_OK; int retval=RetVal_OK;
int num=1;
g_nodeStack.push(this); g_nodeStack.push(this);
// get next token // get next token
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
// skip whitespace // skip whitespace and paragraph breaks
while (tok==TK_WHITESPACE) tok=doctokenizerYYlex(); while (tok==TK_WHITESPACE || tok==TK_NEWPARA) tok=doctokenizerYYlex();
// should find a html tag now // should find a html tag now
if (tok==TK_HTMLTAG) if (tok==TK_HTMLTAG)
{ {
...@@ -2433,7 +2439,7 @@ int DocHtmlList::parse() ...@@ -2433,7 +2439,7 @@ int DocHtmlList::parse()
do do
{ {
DocHtmlListItem *li=new DocHtmlListItem(this,g_token->attribs); DocHtmlListItem *li=new DocHtmlListItem(this,g_token->attribs,num++);
m_children.append(li); m_children.append(li);
retval=li->parse(); retval=li->parse();
} while (retval==RetVal_ListItem); } while (retval==RetVal_ListItem);
...@@ -2500,11 +2506,12 @@ int DocAutoListItem::parse() ...@@ -2500,11 +2506,12 @@ int DocAutoListItem::parse()
int DocAutoList::parse() int DocAutoList::parse()
{ {
int retval = RetVal_OK; int retval = RetVal_OK;
int num=1;
g_nodeStack.push(this); g_nodeStack.push(this);
// first item or sub list => create new list // first item or sub list => create new list
do do
{ {
DocAutoListItem *li = new DocAutoListItem(this); DocAutoListItem *li = new DocAutoListItem(this,num++);
m_children.append(li); m_children.append(li);
retval=li->parse(); retval=li->parse();
} }
...@@ -2542,7 +2549,7 @@ void DocTitle::parse() ...@@ -2542,7 +2549,7 @@ void DocTitle::parse()
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
g_token->name.data()); tokToString(tok));
break; break;
} }
} }
...@@ -2671,6 +2678,17 @@ int DocParamSect::parse(const QString &cmdName) ...@@ -2671,6 +2678,17 @@ int DocParamSect::parse(const QString &cmdName)
g_nodeStack.push(this); g_nodeStack.push(this);
DocParamList *pl = new DocParamList(this,m_type); DocParamList *pl = new DocParamList(this,m_type);
if (m_children.isEmpty())
{
pl->markFirst();
pl->markLast();
}
else
{
ASSERT(m_children.last()->kind()==DocNode::Kind_ParamList);
((DocParamList *)m_children.last())->markLast(FALSE);
pl->markLast();
}
m_children.append(pl); m_children.append(pl);
retval = pl->parse(cmdName); retval = pl->parse(cmdName);
...@@ -2705,7 +2723,6 @@ int DocPara::handleSimpleSection(DocSimpleSect::Type t) ...@@ -2705,7 +2723,6 @@ int DocPara::handleSimpleSection(DocSimpleSect::Type t)
int DocPara::handleParamSection(const QString &cmdName,DocParamSect::Type t) int DocPara::handleParamSection(const QString &cmdName,DocParamSect::Type t)
{ {
DocParamSect *ps=0; DocParamSect *ps=0;
if (!m_children.isEmpty() && // previous element if (!m_children.isEmpty() && // previous element
m_children.last()->kind()==Kind_ParamSect && // was a param sect m_children.last()->kind()==Kind_ParamSect && // was a param sect
((DocParamSect *)m_children.last())->type()==t) // of same type ((DocParamSect *)m_children.last())->type()==t) // of same type
...@@ -2762,7 +2779,7 @@ void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type ...@@ -2762,7 +2779,7 @@ void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type
tokToString(tok),cmdName.data()); tokToString(tok),cmdName.data());
return; return;
} }
DocIncOperator *op = new DocIncOperator(this,t,g_token->name,g_context); DocIncOperator *op = new DocIncOperator(this,t,g_token->name,g_context,g_isExample,g_fileName);
DocNode *n1 = m_children.last(); DocNode *n1 = m_children.last();
DocNode *n2 = n1!=0 ? m_children.prev() : 0; DocNode *n2 = n1!=0 ? m_children.prev() : 0;
bool isFirst = n1==0 || // no last node bool isFirst = n1==0 || // no last node
...@@ -2981,7 +2998,7 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t) ...@@ -2981,7 +2998,7 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t)
tokToString(tok),cmdName.data()); tokToString(tok),cmdName.data());
return; return;
} }
DocInclude *inc = new DocInclude(this,g_token->name,g_context,t); DocInclude *inc = new DocInclude(this,g_token->name,g_context,t,g_isExample,g_fileName);
m_children.append(inc); m_children.append(inc);
inc->parse(); inc->parse();
} }
...@@ -3119,7 +3136,7 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3119,7 +3136,7 @@ int DocPara::handleCommand(const QString &cmdName)
{ {
doctokenizerYYsetStateCode(); doctokenizerYYsetStateCode();
retval = doctokenizerYYlex(); retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Code)); m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Code,g_isExample,g_fileName));
if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: code section ended without end marker"); if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: code section ended without end marker");
doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara();
} }
...@@ -3128,7 +3145,7 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3128,7 +3145,7 @@ int DocPara::handleCommand(const QString &cmdName)
{ {
doctokenizerYYsetStateHtmlOnly(); doctokenizerYYsetStateHtmlOnly();
retval = doctokenizerYYlex(); retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::HtmlOnly)); m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::HtmlOnly,g_isExample,g_fileName));
if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: htmlonly section ended without end marker"); if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: htmlonly section ended without end marker");
doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara();
} }
...@@ -3137,7 +3154,7 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3137,7 +3154,7 @@ int DocPara::handleCommand(const QString &cmdName)
{ {
doctokenizerYYsetStateLatexOnly(); doctokenizerYYsetStateLatexOnly();
retval = doctokenizerYYlex(); retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::LatexOnly)); m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::LatexOnly,g_isExample,g_fileName));
if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: latexonly section ended without end marker"); if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: latexonly section ended without end marker");
doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara();
} }
...@@ -3146,7 +3163,7 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3146,7 +3163,7 @@ int DocPara::handleCommand(const QString &cmdName)
{ {
doctokenizerYYsetStateVerbatim(); doctokenizerYYsetStateVerbatim();
retval = doctokenizerYYlex(); retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Verbatim)); m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Verbatim,g_isExample,g_fileName));
if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: verbatim section ended without end marker"); if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: verbatim section ended without end marker");
doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara();
} }
...@@ -3317,7 +3334,7 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3317,7 +3334,7 @@ int DocPara::handleCommand(const QString &cmdName)
ASSERT(0); ASSERT(0);
break; break;
} }
ASSERT(retval==0 || retval==RetVal_OK || retval==RetVal_SimpleSec || INTERNAL_ASSERT(retval==0 || retval==RetVal_OK || retval==RetVal_SimpleSec ||
retval==TK_LISTITEM || retval==TK_ENDLIST || retval==TK_NEWPARA || retval==TK_LISTITEM || retval==TK_ENDLIST || retval==TK_NEWPARA ||
retval==RetVal_Section || retval==RetVal_EndList || retval==RetVal_Section || retval==RetVal_EndList ||
retval==RetVal_Internal || retval==RetVal_SwitchLang retval==RetVal_Internal || retval==RetVal_SwitchLang
...@@ -3670,20 +3687,30 @@ reparsetoken: ...@@ -3670,20 +3687,30 @@ reparsetoken:
m_children.append(new DocURL(this,g_token->name)); m_children.append(new DocURL(this,g_token->name));
break; break;
case TK_WHITESPACE: case TK_WHITESPACE:
{
// prevent leading whitespace and collapse multiple whitespace areas // prevent leading whitespace and collapse multiple whitespace areas
DocNode::Kind k;
if (insidePRE(this) || // all whitespace is relavant if (insidePRE(this) || // all whitespace is relavant
( // keep only whitespace after words, URL or symbols
!m_children.isEmpty() /* &&
( (
m_children.last()->kind()==DocNode::Kind_Word || // remove leading whitespace
m_children.last()->kind()==DocNode::Kind_URL || !m_children.isEmpty() &&
m_children.last()->kind()==DocNode::Kind_Symbol // and whitespace after certain constructs
)*/ (k=m_children.last()->kind())!=DocNode::Kind_HtmlDescList &&
k!=DocNode::Kind_HtmlTable &&
k!=DocNode::Kind_HtmlList &&
k!=DocNode::Kind_SimpleSect &&
k!=DocNode::Kind_AutoList &&
k!=DocNode::Kind_SimpleList &&
k!=DocNode::Kind_Verbatim &&
k!=DocNode::Kind_HtmlHeader &&
k!=DocNode::Kind_ParamSect &&
k!=DocNode::Kind_XRefItem
) )
) )
{ {
m_children.append(new DocWhiteSpace(this,g_token->chars)); m_children.append(new DocWhiteSpace(this,g_token->chars));
} }
}
break; break;
case TK_LISTITEM: case TK_LISTITEM:
{ {
...@@ -3875,13 +3902,10 @@ endparagraph: ...@@ -3875,13 +3902,10 @@ endparagraph:
DocNode *n = g_nodeStack.pop(); DocNode *n = g_nodeStack.pop();
ASSERT(n==this); ASSERT(n==this);
DBG(("DocPara::parse() end retval=%x\n",retval)); DBG(("DocPara::parse() end retval=%x\n",retval));
ASSERT(retval==0 || retval==TK_NEWPARA || retval==TK_LISTITEM || INTERNAL_ASSERT(retval==0 || retval==TK_NEWPARA || retval==TK_LISTITEM ||
retval==TK_ENDLIST || retval>RetVal_OK retval==TK_ENDLIST || retval>RetVal_OK
); );
if (!(retval==0 || retval==TK_NEWPARA || retval==TK_LISTITEM ||
retval==TK_ENDLIST || retval>RetVal_OK
)) warn(g_fileName,doctokenizerYYlineno,"DocPara::parse: Error retval=%x unexpected",retval);
return retval; return retval;
} }
...@@ -3962,7 +3986,7 @@ int DocSection::parse() ...@@ -3962,7 +3986,7 @@ int DocSection::parse()
retval = s->parse(); retval = s->parse();
} }
} }
ASSERT(retval==0 || retval==RetVal_Section || retval==RetVal_Internal); INTERNAL_ASSERT(retval==0 || retval==RetVal_Section || retval==RetVal_Internal);
DBG(("DocSection::parse() end\n")); DBG(("DocSection::parse() end\n"));
DocNode *n = g_nodeStack.pop(); DocNode *n = g_nodeStack.pop();
...@@ -3970,6 +3994,84 @@ int DocSection::parse() ...@@ -3970,6 +3994,84 @@ int DocSection::parse()
return retval; return retval;
} }
//--------------------------------------------------------------------------
void DocText::parse()
{
g_nodeStack.push(this);
doctokenizerYYsetStateText();
int tok;
while ((tok=doctokenizerYYlex())) // get the next token
{
switch(tok)
{
case TK_WORD:
m_children.append(new DocWord(this,g_token->name));
break;
case TK_WHITESPACE:
m_children.append(new DocWhiteSpace(this,g_token->chars));
break;
case TK_SYMBOL:
{
char letter='\0';
DocSymbol::SymType s = DocSymbol::decodeSymbol(g_token->name,&letter);
if (s!=DocSymbol::Unknown)
{
m_children.append(new DocSymbol(this,s,letter));
}
else
{
warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found",
g_token->name.data());
}
}
break;
case TK_COMMAND:
switch (CmdMapper::map(g_token->name))
{
case CMD_BSLASH:
m_children.append(new DocSymbol(this,DocSymbol::BSlash));
break;
case CMD_AT:
m_children.append(new DocSymbol(this,DocSymbol::At));
break;
case CMD_LESS:
m_children.append(new DocSymbol(this,DocSymbol::Less));
break;
case CMD_GREATER:
m_children.append(new DocSymbol(this,DocSymbol::Greater));
break;
case CMD_AMP:
m_children.append(new DocSymbol(this,DocSymbol::Amp));
break;
case CMD_DOLLAR:
m_children.append(new DocSymbol(this,DocSymbol::Dollar));
break;
case CMD_HASH:
m_children.append(new DocSymbol(this,DocSymbol::Hash));
break;
case CMD_PERCENT:
m_children.append(new DocSymbol(this,DocSymbol::Percent));
break;
default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected command `%s' found",
g_token->name.data());
break;
}
break;
default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
tokToString(tok));
break;
}
}
DocNode *n = g_nodeStack.pop();
ASSERT(n==this);
}
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
void DocRoot::parse() void DocRoot::parse()
...@@ -4037,11 +4139,11 @@ void DocRoot::parse() ...@@ -4037,11 +4139,11 @@ void DocRoot::parse()
DocNode *validatingParseDoc(const char *fileName,int startLine, DocNode *validatingParseDoc(const char *fileName,int startLine,
const char *context,MemberDef *md, const char *context,MemberDef *md,
const char *input) const char *input,bool isExample)
{ {
printf("========== validating %s at line %d\n",fileName,startLine); //printf("========== validating %s at line %d\n",fileName,startLine);
printf("---------------- input --------------------\n%s\n----------- end input -------------------\n",input); //printf("---------------- input --------------------\n%s\n----------- end input -------------------\n",input);
g_token = new TokenInfo; g_token = new TokenInfo;
g_context = context; g_context = context;
...@@ -4054,6 +4156,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine, ...@@ -4054,6 +4156,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
g_includeFileText = ""; g_includeFileText = "";
g_includeFileOffset = 0; g_includeFileOffset = 0;
g_includeFileLength = 0; g_includeFileLength = 0;
g_isExample = isExample;
g_hasParamCommand = FALSE; g_hasParamCommand = FALSE;
g_paramsFound.setAutoDelete(FALSE); g_paramsFound.setAutoDelete(FALSE);
g_paramsFound.clear(); g_paramsFound.clear();
...@@ -4084,3 +4187,36 @@ DocNode *validatingParseDoc(const char *fileName,int startLine, ...@@ -4084,3 +4187,36 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
return root; return root;
} }
DocNode *validatingParseText(const char *input)
{
//printf("------------ input ---------\n%s\n"
// "------------ end input -----\n",input);
g_token = new TokenInfo;
g_context = "";
g_fileName = "<parseText>";
g_memberDef = 0;
g_nodeStack.clear();
g_styleStack.clear();
g_inSeeBlock = FALSE;
g_insideHtmlLink = FALSE;
g_includeFileText = "";
g_includeFileOffset = 0;
g_includeFileLength = 0;
g_isExample = FALSE;
g_hasParamCommand = FALSE;
g_paramsFound.setAutoDelete(FALSE);
g_paramsFound.clear();
doctokenizerYYlineno=1;
doctokenizerYYinit(input,g_fileName);
// build abstract syntax tree
DocText *txt = new DocText;
txt->parse();
delete g_token;
return txt;
}
...@@ -34,17 +34,26 @@ class MemberDef; ...@@ -34,17 +34,26 @@ class MemberDef;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
/*! Main entry point for the documentation parser. /*! Main entry point for the documentation parser.
* @param fileName File in which the documentation block is found. * @param fileName File in which the documentation block is found (or the
* name of the example file in case isExample is TRUE).
* @param startLine Line at which the documentation block is found. * @param startLine Line at which the documentation block is found.
* @param context Class or namespace in which of the item to which this * @param context Class or namespace in which of the item to which this
* block belongs. * block belongs.
* @param md Member definition to which the documentation belongs.
* Can be 0.
* @param input String representation of the documentation block. * @param input String representation of the documentation block.
* @param isExample TRUE if the documentation belongs to an example.
* @returns Root node of the abstract syntax tree. Ownership of the * @returns Root node of the abstract syntax tree. Ownership of the
* pointer is handed over to the caller. * pointer is handed over to the caller.
*/ */
DocNode *validatingParseDoc(const char *fileName,int startLine, DocNode *validatingParseDoc(const char *fileName,int startLine,
const char *context, MemberDef *md, const char *context, MemberDef *md,
const char *input); const char *input,bool isExample);
/*! Main entry point for parsing simple text fragments. These
* fragments are limited to words, whitespace and symbols.
*/
DocNode *validatingParseText(const char *input);
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -100,7 +109,8 @@ class DocNode ...@@ -100,7 +109,8 @@ class DocNode
Kind_ParamSect = 44, Kind_ParamSect = 44,
Kind_ParamList = 45, Kind_ParamList = 45,
Kind_InternalRef = 46, Kind_InternalRef = 46,
Kind_Copy = 47 Kind_Copy = 47,
Kind_Text = 48
}; };
/*! Destructor. */ /*! Destructor. */
virtual ~DocNode() {} virtual ~DocNode() {}
...@@ -306,20 +316,26 @@ class DocVerbatim : public DocNode ...@@ -306,20 +316,26 @@ class DocVerbatim : public DocNode
public: public:
enum Type { Code, HtmlOnly, LatexOnly, Verbatim }; enum Type { Code, HtmlOnly, LatexOnly, Verbatim };
DocVerbatim(DocNode *parent,const QString &context, DocVerbatim(DocNode *parent,const QString &context,
const QString &text, Type t) : const QString &text, Type t,bool isExample,
m_parent(parent), m_context(context), m_text(text), m_type(t) {} const QString &exampleFile) :
m_parent(parent), m_context(context), m_text(text), m_type(t),
m_isExample(isExample), m_exampleFile(exampleFile) {}
Kind kind() const { return Kind_Verbatim; } Kind kind() const { return Kind_Verbatim; }
Type type() const { return m_type; } Type type() const { return m_type; }
QString text() const { return m_text; } QString text() const { return m_text; }
QString context() const { return m_context; } QString context() const { return m_context; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
bool isExample() const { return m_isExample; }
QString exampleFile() const { return m_exampleFile; }
private: private:
DocNode *m_parent; DocNode *m_parent;
QString m_context; QString m_context;
QString m_text; QString m_text;
Type m_type; Type m_type;
bool m_isExample;
QString m_exampleFile;
}; };
/*! @brief Node representing an included text block from file */ /*! @brief Node representing an included text block from file */
...@@ -328,14 +344,18 @@ class DocInclude : public DocNode ...@@ -328,14 +344,18 @@ class DocInclude : public DocNode
public: public:
enum Type { Include, DontInclude, VerbInclude, HtmlInclude }; enum Type { Include, DontInclude, VerbInclude, HtmlInclude };
DocInclude(DocNode *parent,const QString &file, DocInclude(DocNode *parent,const QString &file,
const QString context, Type t) : const QString context, Type t,
m_parent(parent), m_file(file), m_context(context), m_type(t) {} bool isExample,const QString exampleFile) :
m_parent(parent), m_file(file), m_context(context), m_type(t),
m_isExample(isExample), m_exampleFile(exampleFile) {}
Kind kind() const { return Kind_Include; } Kind kind() const { return Kind_Include; }
QString file() const { return m_file; } QString file() const { return m_file; }
Type type() const { return m_type; } Type type() const { return m_type; }
QString text() const { return m_text; } QString text() const { return m_text; }
QString context() const { return m_context; } QString context() const { return m_context; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
bool isExample() const { return m_isExample; }
QString exampleFile() const { return m_exampleFile; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
void parse(); void parse();
...@@ -345,6 +365,8 @@ class DocInclude : public DocNode ...@@ -345,6 +365,8 @@ class DocInclude : public DocNode
QString m_context; QString m_context;
QString m_text; QString m_text;
Type m_type; Type m_type;
bool m_isExample;
QString m_exampleFile;
}; };
/*! @brief Node representing a include/dontinclude operator block */ /*! @brief Node representing a include/dontinclude operator block */
...@@ -353,9 +375,10 @@ class DocIncOperator : public DocNode ...@@ -353,9 +375,10 @@ class DocIncOperator : public DocNode
public: public:
enum Type { Line, SkipLine, Skip, Until }; enum Type { Line, SkipLine, Skip, Until };
DocIncOperator(DocNode *parent,Type t,const QString &pat, DocIncOperator(DocNode *parent,Type t,const QString &pat,
const QString &context) : const QString &context,bool isExample,const QString &exampleFile) :
m_parent(parent), m_type(t), m_pattern(pat), m_context(context), m_parent(parent), m_type(t), m_pattern(pat), m_context(context),
m_isFirst(FALSE), m_isLast(FALSE) {} m_isFirst(FALSE), m_isLast(FALSE),
m_isExample(isExample), m_exampleFile(exampleFile) {}
Kind kind() const { return Kind_IncOperator; } Kind kind() const { return Kind_IncOperator; }
Type type() const { return m_type; } Type type() const { return m_type; }
QString text() const { return m_text; } QString text() const { return m_text; }
...@@ -363,11 +386,13 @@ class DocIncOperator : public DocNode ...@@ -363,11 +386,13 @@ class DocIncOperator : public DocNode
QString context() const { return m_context; } QString context() const { return m_context; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
void parse();
bool isFirst() const { return m_isFirst; } bool isFirst() const { return m_isFirst; }
bool isLast() const { return m_isLast; } bool isLast() const { return m_isLast; }
void markFirst(bool v=TRUE) { m_isFirst = v; } void markFirst(bool v=TRUE) { m_isFirst = v; }
void markLast(bool v=TRUE) { m_isLast = v; } void markLast(bool v=TRUE) { m_isLast = v; }
bool isExample() const { return m_isExample; }
QString exampleFile() const { return m_exampleFile; }
void parse();
private: private:
DocNode *m_parent; DocNode *m_parent;
...@@ -377,6 +402,8 @@ class DocIncOperator : public DocNode ...@@ -377,6 +402,8 @@ class DocIncOperator : public DocNode
QString m_context; QString m_context;
bool m_isFirst; bool m_isFirst;
bool m_isLast; bool m_isLast;
bool m_isExample;
QString m_exampleFile;
}; };
/*! @brief Node representing an item of a cross-referenced list */ /*! @brief Node representing an item of a cross-referenced list */
...@@ -886,7 +913,7 @@ class DocParamList : public DocNode ...@@ -886,7 +913,7 @@ class DocParamList : public DocNode
{ {
public: public:
DocParamList(DocNode *parent,DocParamSect::Type t) DocParamList(DocNode *parent,DocParamSect::Type t)
: m_parent(parent) , m_type(t) : m_parent(parent) , m_type(t), m_isFirst(TRUE), m_isLast(TRUE)
{ m_paragraph=new DocPara(this); } { m_paragraph=new DocPara(this); }
virtual ~DocParamList() virtual ~DocParamList()
{ delete m_paragraph; } { delete m_paragraph; }
...@@ -895,6 +922,10 @@ class DocParamList : public DocNode ...@@ -895,6 +922,10 @@ class DocParamList : public DocNode
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
const QStrList &parameters() { return m_params; } const QStrList &parameters() { return m_params; }
DocParamSect::Type type() const { return m_type; } DocParamSect::Type type() const { return m_type; }
void markFirst(bool b=TRUE) { m_isFirst=b; }
void markLast(bool b=TRUE) { m_isLast=b; }
bool isFirst() const { return m_isFirst; }
bool isLast() const { return m_isLast; }
void accept(DocVisitor *v) void accept(DocVisitor *v)
{ {
v->visitPre(this); v->visitPre(this);
...@@ -907,18 +938,21 @@ class DocParamList : public DocNode ...@@ -907,18 +938,21 @@ class DocParamList : public DocNode
DocPara * m_paragraph; DocPara * m_paragraph;
QStrList m_params; QStrList m_params;
DocParamSect::Type m_type; DocParamSect::Type m_type;
bool m_isFirst;
bool m_isLast;
}; };
/*! @brief Node representing an item of a auto list */ /*! @brief Node representing an item of a auto list */
class DocAutoListItem : public DocNode class DocAutoListItem : public DocNode
{ {
public: public:
DocAutoListItem(DocNode *parent) : m_parent(parent) DocAutoListItem(DocNode *parent,int num) : m_parent(parent), m_itemNum(num)
{ m_paragraph=new DocPara(this); } { m_paragraph=new DocPara(this); }
virtual ~DocAutoListItem() { delete m_paragraph; } virtual ~DocAutoListItem() { delete m_paragraph; }
int parse(); int parse();
Kind kind() const { return Kind_AutoListItem; } Kind kind() const { return Kind_AutoListItem; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
int itemNumber() const { return m_itemNum; }
void accept(DocVisitor *v) void accept(DocVisitor *v)
{ {
v->visitPre(this); v->visitPre(this);
...@@ -928,6 +962,7 @@ class DocAutoListItem : public DocNode ...@@ -928,6 +962,7 @@ class DocAutoListItem : public DocNode
private: private:
DocNode *m_parent; DocNode *m_parent;
DocPara *m_paragraph; DocPara *m_paragraph;
int m_itemNum;
}; };
/*! @brief Node representing a simple list item */ /*! @brief Node representing a simple list item */
...@@ -956,10 +991,11 @@ class DocSimpleListItem : public DocNode ...@@ -956,10 +991,11 @@ class DocSimpleListItem : public DocNode
class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode
{ {
public: public:
DocHtmlListItem(DocNode *parent,const HtmlAttribList &attribs) : DocHtmlListItem(DocNode *parent,const HtmlAttribList &attribs,int num) :
m_parent(parent), m_attribs(attribs) {} m_parent(parent), m_attribs(attribs), m_itemNum(num) {}
int parse(); int parse();
Kind kind() const { return Kind_HtmlListItem; } Kind kind() const { return Kind_HtmlListItem; }
int itemNumber() const { return m_itemNum; }
const HtmlAttribList &attribs() const { return m_attribs; } const HtmlAttribList &attribs() const { return m_attribs; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocHtmlListItem>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocHtmlListItem>::accept(this,v); }
...@@ -967,6 +1003,7 @@ class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode ...@@ -967,6 +1003,7 @@ class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode
private: private:
DocNode * m_parent; DocNode * m_parent;
HtmlAttribList m_attribs; HtmlAttribList m_attribs;
int m_itemNum;
}; };
/*! @brief Node representing a Html description data */ /*! @brief Node representing a Html description data */
...@@ -1107,6 +1144,16 @@ class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode ...@@ -1107,6 +1144,16 @@ class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode
HtmlAttribList m_attribs; HtmlAttribList m_attribs;
}; };
/*! @brief Root node of a text fragment */
class DocText : public CompAccept<DocText>, public DocNode
{
public:
DocText() {}
void parse();
Kind kind() const { return Kind_Text; }
DocNode *parent() const { return 0; }
void accept(DocVisitor *v) { CompAccept<DocText>::accept(this,v); }
};
/*! @brief Root node of documentation tree */ /*! @brief Root node of documentation tree */
class DocRoot : public CompAccept<DocRoot>, public DocNode class DocRoot : public CompAccept<DocRoot>, public DocNode
......
...@@ -118,5 +118,6 @@ void doctokenizerYYsetStatePattern(); ...@@ -118,5 +118,6 @@ void doctokenizerYYsetStatePattern();
void doctokenizerYYsetStateLink(); void doctokenizerYYsetStateLink();
void doctokenizerYYsetStateRef(); void doctokenizerYYsetStateRef();
void doctokenizerYYsetStateInternalRef(); void doctokenizerYYsetStateInternalRef();
void doctokenizerYYsetStateText();
#endif #endif
...@@ -264,6 +264,7 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">" ...@@ -264,6 +264,7 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
%x St_Ref %x St_Ref
%x St_Ref2 %x St_Ref2
%x St_IntRef %x St_IntRef
%x St_Text
%% %%
<St_Para>\r /* skip carriage return */ <St_Para>\r /* skip carriage return */
...@@ -349,17 +350,17 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">" ...@@ -349,17 +350,17 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
g_token->endTag = startNamePos==2; g_token->endTag = startNamePos==2;
return TK_HTMLTAG; return TK_HTMLTAG;
} }
<St_Para>"&"{ID}";" { /* special symbol */ <St_Para,St_Text>"&"{ID}";" { /* special symbol */
g_token->name = yytext; g_token->name = yytext;
return TK_SYMBOL; return TK_SYMBOL;
} }
<St_Para>{LNKWORD1} | <St_Para>{LNKWORD1}/[^a-z_A-Z0-9] |
<St_Para>{LNKWORD2} { <St_Para>{LNKWORD2} {
g_token->name = yytext; g_token->name = yytext;
return TK_LNKWORD; return TK_LNKWORD;
} }
<St_Para>{WORD1} | <St_Para,St_Text>{WORD1} |
<St_Para>{WORD2} { /* function call */ <St_Para,St_Text>{WORD2} { /* function call */
g_token->name = yytext; g_token->name = yytext;
return TK_WORD; return TK_WORD;
...@@ -369,11 +370,15 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">" ...@@ -369,11 +370,15 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
*/ */
goto find_rule; goto find_rule;
} }
<St_Para>{BLANK}+ | <St_Para,St_Text>{BLANK}+ |
<St_Para>{BLANK}*\n{BLANK}* { /* white space */ <St_Para,St_Text>{BLANK}*\n{BLANK}* { /* white space */
g_token->chars=yytext; g_token->chars=yytext;
return TK_WHITESPACE; return TK_WHITESPACE;
} }
<St_Text>[\\@<>&$#%~] {
g_token->name = yytext;
return TK_COMMAND;
}
<St_Para>({BLANK}*\n)+{BLANK}*\n { <St_Para>({BLANK}*\n)+{BLANK}*\n {
/* start of a new paragraph */ /* start of a new paragraph */
return TK_NEWPARA; return TK_NEWPARA;
...@@ -588,6 +593,11 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">" ...@@ -588,6 +593,11 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
<*>\n { <*>\n {
warn(g_fileName,yylineno,"Error: Unexpected new line character"); warn(g_fileName,yylineno,"Error: Unexpected new line character");
} }
<*>[\\@<>&$#%~] { /* unescaped special character */
warn(g_fileName,yylineno,"Warning: Unexpected character `%s', assuming command \\%s was meant.",yytext,yytext);
g_token->name = yytext;
return TK_COMMAND;
}
<*>. { <*>. {
warn(g_fileName,yylineno,"Error: Unexpected character `%s'",yytext); warn(g_fileName,yylineno,"Error: Unexpected character `%s'",yytext);
} }
...@@ -672,6 +682,11 @@ void doctokenizerYYsetStateInternalRef() ...@@ -672,6 +682,11 @@ void doctokenizerYYsetStateInternalRef()
BEGIN(St_IntRef); BEGIN(St_IntRef);
} }
void doctokenizerYYsetStateText()
{
BEGIN(St_Text);
}
void doctokenizerYYcleanup() void doctokenizerYYcleanup()
{ {
yy_delete_buffer( YY_CURRENT_BUFFER ); yy_delete_buffer( YY_CURRENT_BUFFER );
......
...@@ -68,6 +68,7 @@ class DocParamSect; ...@@ -68,6 +68,7 @@ class DocParamSect;
class DocParamList; class DocParamList;
class DocInternalRef; class DocInternalRef;
class DocCopy; class DocCopy;
class DocText;
/*! @brief Abstract visitor that participates in the visitor pattern. /*! @brief Abstract visitor that participates in the visitor pattern.
*/ */
...@@ -164,6 +165,8 @@ class DocVisitor ...@@ -164,6 +165,8 @@ class DocVisitor
virtual void visitPost(DocInternalRef *) = 0; virtual void visitPost(DocInternalRef *) = 0;
virtual void visitPre(DocCopy *) = 0; virtual void visitPre(DocCopy *) = 0;
virtual void visitPost(DocCopy *) = 0; virtual void visitPost(DocCopy *) = 0;
virtual void visitPre(DocText *) = 0;
virtual void visitPost(DocText *) = 0;
/*! @} */ /*! @} */
}; };
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include "version.h" #include "version.h"
#include "doxygen.h" #include "doxygen.h"
#include "scanner.h" #include "scanner.h"
#include "doc.h"
#include "entry.h" #include "entry.h"
#include "index.h" #include "index.h"
#include "logos.h" #include "logos.h"
...@@ -56,6 +55,7 @@ ...@@ -56,6 +55,7 @@
#include "rtfgen.h" #include "rtfgen.h"
#include "xmlgen.h" #include "xmlgen.h"
#include "defgen.h" #include "defgen.h"
#include "perlmodgen.h"
#include "reflist.h" #include "reflist.h"
#include "page.h" #include "page.h"
//#include "packagedef.h" //#include "packagedef.h"
...@@ -1112,6 +1112,7 @@ static void findUsingDeclarations(Entry *root) ...@@ -1112,6 +1112,7 @@ static void findUsingDeclarations(Entry *root)
"<generated>",1, "<generated>",1,
root->name,ClassDef::Class); root->name,ClassDef::Class);
Doxygen::hiddenClasses.append(root->name,usingCd); Doxygen::hiddenClasses.append(root->name,usingCd);
usingCd->setClassIsArtificial();
} }
// add the namespace the correct scope // add the namespace the correct scope
...@@ -6020,7 +6021,7 @@ static void generatePageDocs() ...@@ -6020,7 +6021,7 @@ static void generatePageDocs()
{ {
scName=pi->context->name(); scName=pi->context->name();
} }
parseDoc(*outputList,pi->defFileName,pi->defLine,scName,0,pi->doc); outputList->parseDoc(pi->defFileName,pi->defLine,scName,0,pi->doc,FALSE);
outputList->endTextBlock(); outputList->endTextBlock();
endFile(*outputList); endFile(*outputList);
//outputList->enable(OutputGenerator::Man); //outputList->enable(OutputGenerator::Man);
...@@ -6091,7 +6092,13 @@ static void generateExampleDocs() ...@@ -6091,7 +6092,13 @@ static void generateExampleDocs()
startTitle(*outputList,n); startTitle(*outputList,n);
outputList->docify(pi->name); outputList->docify(pi->name);
endTitle(*outputList,n,0); endTitle(*outputList,n,0);
parseExample(*outputList,pi->doc+"\n\\include "+pi->name,pi->name); outputList->parseDoc(pi->name, // file
pi->defLine, // startLine
pi->context?pi->context->name().data():0, // context
0, // memberDef
pi->doc+"\n\\include "+pi->name, // docs
TRUE // is example
);
endFile(*outputList); endFile(*outputList);
} }
outputList->enable(OutputGenerator::Man); outputList->enable(OutputGenerator::Man);
...@@ -7809,13 +7816,13 @@ void generateOutput() ...@@ -7809,13 +7816,13 @@ void generateOutput()
msg("Generating style sheet...\n"); msg("Generating style sheet...\n");
outputList->writeStyleInfo(0); // write first part outputList->writeStyleInfo(0); // write first part
outputList->disableAllBut(OutputGenerator::Latex); outputList->disableAllBut(OutputGenerator::Latex);
parseText(*outputList, outputList->parseText(
theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME")) theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME"))
); );
outputList->writeStyleInfo(1); // write second part outputList->writeStyleInfo(1); // write second part
//parseText(*outputList,theTranslator->trWrittenBy()); //parseText(*outputList,theTranslator->trWrittenBy());
outputList->writeStyleInfo(2); // write third part outputList->writeStyleInfo(2); // write third part
parseText(*outputList, outputList->parseText(
theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME")) theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME"))
); );
outputList->writeStyleInfo(3); // write fourth part outputList->writeStyleInfo(3); // write fourth part
...@@ -7879,6 +7886,11 @@ void generateOutput() ...@@ -7879,6 +7886,11 @@ void generateOutput()
msg("Generating AutoGen DEF output...\n"); msg("Generating AutoGen DEF output...\n");
generateDEF(); generateDEF();
} }
if (Config_getBool("GENERATE_PERLMOD"))
{
msg("Generating PerlMod output...\n");
generatePerlMod();
}
if (Config_getBool("GENERATE_HTMLHELP") && !Config_getString("HHC_LOCATION").isEmpty()) if (Config_getBool("GENERATE_HTMLHELP") && !Config_getString("HHC_LOCATION").isEmpty())
{ {
msg("Running html help compiler...\n"); msg("Running html help compiler...\n");
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "memberlist.h" #include "memberlist.h"
#include "classlist.h" #include "classlist.h"
#include "filedef.h" #include "filedef.h"
#include "doc.h"
#include "doxygen.h" #include "doxygen.h"
#include "memberdef.h" #include "memberdef.h"
#include "classdef.h" #include "classdef.h"
...@@ -114,11 +113,11 @@ void FileDef::writeDetailedDocumentation(OutputList &ol) ...@@ -114,11 +113,11 @@ void FileDef::writeDetailedDocumentation(OutputList &ol)
//if (latexOn) ol.enable(OutputGenerator::Latex); //if (latexOn) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState(); ol.popGeneratorState();
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription()); ol.parseText(theTranslator->trDetailedDescription());
ol.endGroupHeader(); ol.endGroupHeader();
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{ {
parseDoc(ol,briefFile(),briefLine(),0,0,briefDescription()); ol.parseDoc(briefFile(),briefLine(),0,0,briefDescription(),FALSE);
} }
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") && if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
!documentation().isEmpty()) !documentation().isEmpty())
...@@ -129,7 +128,7 @@ void FileDef::writeDetailedDocumentation(OutputList &ol) ...@@ -129,7 +128,7 @@ void FileDef::writeDetailedDocumentation(OutputList &ol)
{ {
//if (doc.at(dl-1)!='.' && doc.at(dl-1)!='!' && doc.at(dl-1)!='?') //if (doc.at(dl-1)!='.' && doc.at(dl-1)!='!' && doc.at(dl-1)!='?')
// doc+='.'; // doc+='.';
parseDoc(ol,docFile(),docLine(),0,0,documentation()+"\n"); ol.parseDoc(docFile(),docLine(),0,0,documentation()+"\n",FALSE);
} }
//printf("Writing source ref for file %s\n",name().data()); //printf("Writing source ref for file %s\n",name().data());
if (Config_getBool("SOURCE_BROWSER")) if (Config_getBool("SOURCE_BROWSER"))
...@@ -139,10 +138,10 @@ void FileDef::writeDetailedDocumentation(OutputList &ol) ...@@ -139,10 +138,10 @@ void FileDef::writeDetailedDocumentation(OutputList &ol)
int fileMarkerPos = refText.find("@0"); int fileMarkerPos = refText.find("@0");
if (fileMarkerPos!=-1) // should always pass this. if (fileMarkerPos!=-1) // should always pass this.
{ {
parseText(ol,refText.left(fileMarkerPos)); //text left from marker 1 ol.parseText(refText.left(fileMarkerPos)); //text left from marker 1
ol.writeObjectLink(0,getSourceFileBase(), ol.writeObjectLink(0,getSourceFileBase(),
0,name()); 0,name());
parseText(ol,refText.right( ol.parseText(refText.right(
refText.length()-fileMarkerPos-2)); // text right from marker 2 refText.length()-fileMarkerPos-2)); // text right from marker 2
} }
} }
...@@ -167,7 +166,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -167,7 +166,7 @@ void FileDef::writeDocumentation(OutputList &ol)
QCString pageTitle=name()+" File Reference"; QCString pageTitle=name()+" File Reference";
startFile(ol,getOutputFileBase(),name(),pageTitle); startFile(ol,getOutputFileBase(),name(),pageTitle);
startTitle(ol,getOutputFileBase()); startTitle(ol,getOutputFileBase());
parseText(ol,theTranslator->trFileReference(docname)); ol.parseText(theTranslator->trFileReference(docname));
addGroupListToTitle(ol,this); addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),docName()); endTitle(ol,getOutputFileBase(),docName());
//ol.newParagraph(); //ol.newParagraph();
...@@ -190,11 +189,11 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -190,11 +189,11 @@ void FileDef::writeDocumentation(OutputList &ol)
} }
else if (briefDescription()) else if (briefDescription())
{ {
parseDoc(ol,briefFile(),briefLine(),0,0,briefDescription()); ol.parseDoc(briefFile(),briefLine(),0,0,briefDescription(),FALSE);
ol.writeString(" \n"); ol.writeString(" \n");
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(0,"_details"); ol.startTextLink(0,"_details");
parseText(ol,theTranslator->trMore()); ol.parseText(theTranslator->trMore());
ol.endTextLink(); ol.endTextLink();
ol.enableAll(); ol.enableAll();
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
...@@ -288,7 +287,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -288,7 +287,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
ol.newParagraph(); ol.newParagraph();
ol.startInclDepGraph(); ol.startInclDepGraph();
parseText(ol,theTranslator->trInclDepGraph(name())); ol.parseText(theTranslator->trInclDepGraph(name()));
ol.endInclDepGraph(incDepGraph); ol.endInclDepGraph(incDepGraph);
ol.enableAll(); ol.enableAll();
} }
...@@ -304,7 +303,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -304,7 +303,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
ol.newParagraph(); ol.newParagraph();
ol.startInclDepGraph(); ol.startInclDepGraph();
parseText(ol,theTranslator->trInclByDepGraph()); ol.parseText(theTranslator->trInclByDepGraph());
ol.endInclDepGraph(incDepGraph); ol.endInclDepGraph(incDepGraph);
ol.enableAll(); ol.enableAll();
} }
...@@ -317,7 +316,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -317,7 +316,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
ol.newParagraph(); ol.newParagraph();
ol.startTextLink(includeName(),0); ol.startTextLink(includeName(),0);
parseText(ol,theTranslator->trGotoSourceCode()); ol.parseText(theTranslator->trGotoSourceCode());
ol.endTextLink(); ol.endTextLink();
ol.enableAll(); ol.enableAll();
} }
...@@ -338,7 +337,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -338,7 +337,7 @@ void FileDef::writeDocumentation(OutputList &ol)
if (!found) if (!found)
{ {
ol.startMemberHeader(); ol.startMemberHeader();
parseText(ol,theTranslator->trNamespaces()); ol.parseText(theTranslator->trNamespaces());
ol.endMemberHeader(); ol.endMemberHeader();
ol.startMemberList(); ol.startMemberList();
found=TRUE; found=TRUE;
...@@ -418,9 +417,9 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -418,9 +417,9 @@ void FileDef::writeDocumentation(OutputList &ol)
// write Author section (Man only) // write Author section (Man only)
ol.disableAllBut(OutputGenerator::Man); ol.disableAllBut(OutputGenerator::Man);
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trAuthor(TRUE,TRUE)); ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader(); ol.endGroupHeader();
parseText(ol,theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME"))); ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
ol.enableAll(); ol.enableAll();
if (!Config_getString("GENERATE_TAGFILE").isEmpty()) if (!Config_getString("GENERATE_TAGFILE").isEmpty())
...@@ -438,13 +437,13 @@ void FileDef::writeSource(OutputList &ol) ...@@ -438,13 +437,13 @@ void FileDef::writeSource(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
startFile(ol,getSourceFileBase(),0,docname+" Source File"); startFile(ol,getSourceFileBase(),0,docname+" Source File");
startTitle(ol,0); startTitle(ol,0);
parseText(ol,docname); ol.parseText(docname);
endTitle(ol,0,0); endTitle(ol,0,0);
if (isLinkable()) if (isLinkable())
{ {
ol.startTextLink(getOutputFileBase(),0); ol.startTextLink(getOutputFileBase(),0);
parseText(ol,theTranslator->trGotoDocumentation()); ol.parseText(theTranslator->trGotoDocumentation());
ol.endTextLink(); ol.endTextLink();
} }
......
...@@ -171,7 +171,7 @@ void FormulaList::generateBitmaps(const char *path) ...@@ -171,7 +171,7 @@ void FormulaList::generateBitmaps(const char *path)
// Then we run ghostscript to convert the postscript to a pixmap // Then we run ghostscript to convert the postscript to a pixmap
// The pixmap is a truecolor image, where only black and white are // The pixmap is a truecolor image, where only black and white are
// used. // used.
#ifdef _WIN32 #if defined(_WIN32) && !defined(__CYGWIN__)
char gsArgs[256]; char gsArgs[256];
sprintf(gsArgs,"-q -g%dx%d -r%dx%dx -sDEVICE=ppmraw " sprintf(gsArgs,"-q -g%dx%d -r%dx%dx -sDEVICE=ppmraw "
"-sOutputFile=%s.pnm -dNOPAUSE -dBATCH -- %s.ps", "-sOutputFile=%s.pnm -dNOPAUSE -dBATCH -- %s.ps",
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include "filedef.h" #include "filedef.h"
#include "classlist.h" #include "classlist.h"
#include "outputlist.h" #include "outputlist.h"
#include "doc.h"
#include "namespacedef.h" #include "namespacedef.h"
#include "language.h" #include "language.h"
#include "util.h" #include "util.h"
...@@ -359,13 +358,13 @@ void GroupDef::writeDetailedDocumentation(OutputList &ol) ...@@ -359,13 +358,13 @@ void GroupDef::writeDetailedDocumentation(OutputList &ol)
ol.writeAnchor(0,"_details"); ol.writeAnchor(0,"_details");
ol.popGeneratorState(); ol.popGeneratorState();
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription()); ol.parseText(theTranslator->trDetailedDescription());
ol.endGroupHeader(); ol.endGroupHeader();
// repeat brief description // repeat brief description
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{ {
parseDoc(ol,briefFile(),briefLine(),name(),0,briefDescription()); ol.parseDoc(briefFile(),briefLine(),name(),0,briefDescription(),FALSE);
ol.newParagraph(); ol.newParagraph();
} }
} }
...@@ -373,7 +372,7 @@ void GroupDef::writeDetailedDocumentation(OutputList &ol) ...@@ -373,7 +372,7 @@ void GroupDef::writeDetailedDocumentation(OutputList &ol)
// write documentation // write documentation
if (!documentation().isEmpty()) if (!documentation().isEmpty())
{ {
parseDoc(ol,docFile(),docLine(),name(),0,documentation()+"\n"); ol.parseDoc(docFile(),docLine(),name(),0,documentation()+"\n",FALSE);
} }
} }
} }
...@@ -396,13 +395,13 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -396,13 +395,13 @@ void GroupDef::writeDocumentation(OutputList &ol)
} }
else if (!briefDescription().isEmpty()) else if (!briefDescription().isEmpty())
{ {
parseDoc(ol,briefFile(),briefLine(),name(),0,briefDescription()); ol.parseDoc(briefFile(),briefLine(),name(),0,briefDescription(),FALSE);
ol.writeString(" \n"); ol.writeString(" \n");
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::RTF);
ol.startTextLink(0,"_details"); ol.startTextLink(0,"_details");
parseText(ol,theTranslator->trMore()); ol.parseText(theTranslator->trMore());
ol.endTextLink(); ol.endTextLink();
//ol.enable(OutputGenerator::Latex); //ol.enable(OutputGenerator::Latex);
ol.popGeneratorState(); ol.popGeneratorState();
...@@ -422,7 +421,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -422,7 +421,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (fileList->count()>0) if (fileList->count()>0)
{ {
ol.startMemberHeader(); ol.startMemberHeader();
parseText(ol,theTranslator->trFile(TRUE,FALSE)); ol.parseText(theTranslator->trFile(TRUE,FALSE));
ol.endMemberHeader(); ol.endMemberHeader();
ol.startMemberList(); ol.startMemberList();
FileDef *fd=fileList->first(); FileDef *fd=fileList->first();
...@@ -440,7 +439,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -440,7 +439,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{ {
ol.startMemberDescription(); ol.startMemberDescription();
parseDoc(ol,briefFile(),briefLine(),0,0,fd->briefDescription()); ol.parseDoc(briefFile(),briefLine(),0,0,fd->briefDescription(),FALSE);
ol.endMemberDescription(); ol.endMemberDescription();
ol.newParagraph(); ol.newParagraph();
} }
...@@ -453,7 +452,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -453,7 +452,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (namespaceList->count()>0) if (namespaceList->count()>0)
{ {
ol.startMemberHeader(); ol.startMemberHeader();
parseText(ol,theTranslator->trNamespaces()); ol.parseText(theTranslator->trNamespaces());
ol.endMemberHeader(); ol.endMemberHeader();
ol.startMemberList(); ol.startMemberList();
NamespaceDef *nd=namespaceList->first(); NamespaceDef *nd=namespaceList->first();
...@@ -471,7 +470,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -471,7 +470,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{ {
ol.startMemberDescription(); ol.startMemberDescription();
parseDoc(ol,briefFile(),briefLine(),0,0,nd->briefDescription()); ol.parseDoc(briefFile(),briefLine(),0,0,nd->briefDescription(),FALSE);
ol.endMemberDescription(); ol.endMemberDescription();
ol.newParagraph(); ol.newParagraph();
} }
...@@ -484,7 +483,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -484,7 +483,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (groupList->count()>0) if (groupList->count()>0)
{ {
ol.startMemberHeader(); ol.startMemberHeader();
parseText(ol,theTranslator->trModules()); ol.parseText(theTranslator->trModules());
ol.endMemberHeader(); ol.endMemberHeader();
ol.startMemberList(); ol.startMemberList();
GroupDef *gd=groupList->first(); GroupDef *gd=groupList->first();
...@@ -501,7 +500,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -501,7 +500,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (!gd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) if (!gd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{ {
ol.startMemberDescription(); ol.startMemberDescription();
parseDoc(ol,briefFile(),briefLine(),0,0,gd->briefDescription()); ol.parseDoc(briefFile(),briefLine(),0,0,gd->briefDescription(),FALSE);
ol.endMemberDescription(); ol.endMemberDescription();
ol.newParagraph(); ol.newParagraph();
} }
...@@ -561,7 +560,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -561,7 +560,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.endSection(si->label,SectionInfo::Subsection); ol.endSection(si->label,SectionInfo::Subsection);
} }
ol.startTextBlock(); ol.startTextBlock();
parseDoc(ol,pi->defFileName,pi->defLine,0,0,pi->doc); ol.parseDoc(pi->defFileName,pi->defLine,0,0,pi->doc,FALSE);
ol.endTextBlock(); ol.endTextBlock();
} }
} }
......
...@@ -32,8 +32,6 @@ static QString htmlAttribsToString(const HtmlAttribList &attribs) ...@@ -32,8 +32,6 @@ static QString htmlAttribsToString(const HtmlAttribList &attribs)
HtmlAttrib *att; HtmlAttrib *att;
for (li.toFirst();(att=li.current());++li) for (li.toFirst();(att=li.current());++li)
{ {
printf("Found attion name=`%s' value=`%s'\n",
att->name.data(),att->value.data());
result+=" "; result+=" ";
result+=att->name; result+=att->name;
if (!att->value.isEmpty()) result+="=\""+att->value+"\""; if (!att->value.isEmpty()) result+="=\""+att->value+"\"";
...@@ -165,7 +163,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s) ...@@ -165,7 +163,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
{ {
case DocVerbatim::Code: // fall though case DocVerbatim::Code: // fall though
m_t << "<div class=\"fragment\"><pre>"; m_t << "<div class=\"fragment\"><pre>";
parseCode(m_ci,s->context(),s->text().latin1(),FALSE,0); parseCode(m_ci,s->context(),s->text().latin1(),s->isExample(),s->exampleFile());
m_t << "</pre></div>"; m_t << "</pre></div>";
break; break;
case DocVerbatim::Verbatim: case DocVerbatim::Verbatim:
...@@ -195,7 +193,7 @@ void HtmlDocVisitor::visit(DocInclude *inc) ...@@ -195,7 +193,7 @@ void HtmlDocVisitor::visit(DocInclude *inc)
{ {
case DocInclude::Include: case DocInclude::Include:
m_t << "<div class=\"fragment\"><pre>"; m_t << "<div class=\"fragment\"><pre>";
parseCode(m_ci,inc->context(),inc->text().latin1(),FALSE,0); parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile());
m_t << "</pre></div>"; m_t << "</pre></div>";
break; break;
case DocInclude::DontInclude: case DocInclude::DontInclude:
...@@ -222,7 +220,7 @@ void HtmlDocVisitor::visit(DocIncOperator *op) ...@@ -222,7 +220,7 @@ void HtmlDocVisitor::visit(DocIncOperator *op)
} }
if (op->type()!=DocIncOperator::Skip) if (op->type()!=DocIncOperator::Skip)
{ {
parseCode(m_ci,op->context(),op->text().latin1(),FALSE,0); parseCode(m_ci,op->context(),op->text().latin1(),op->isExample(),op->exampleFile());
} }
if (op->isLast()) if (op->isLast())
{ {
...@@ -786,6 +784,14 @@ void HtmlDocVisitor::visitPost(DocCopy *) ...@@ -786,6 +784,14 @@ void HtmlDocVisitor::visitPost(DocCopy *)
{ {
} }
void HtmlDocVisitor::visitPre(DocText *)
{
}
void HtmlDocVisitor::visitPost(DocText *)
{
}
void HtmlDocVisitor::filter(const char *str) void HtmlDocVisitor::filter(const char *str)
{ {
if (str==0) return; if (str==0) return;
......
...@@ -122,6 +122,8 @@ class HtmlDocVisitor : public DocVisitor ...@@ -122,6 +122,8 @@ class HtmlDocVisitor : public DocVisitor
void visitPost(DocInternalRef *); void visitPost(DocInternalRef *);
void visitPre(DocCopy *); void visitPre(DocCopy *);
void visitPost(DocCopy *); void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
private: private:
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include "message.h" #include "message.h"
#include "index.h" #include "index.h"
#include "doxygen.h" #include "doxygen.h"
#include "doc.h"
#include "code.h" #include "code.h"
#include "config.h" #include "config.h"
#include "filedef.h" #include "filedef.h"
...@@ -187,7 +186,7 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE) ...@@ -187,7 +186,7 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE)
{ {
ol.startQuickIndexItem(extLink,"index"+Doxygen::htmlFileExtension); ol.startQuickIndexItem(extLink,"index"+Doxygen::htmlFileExtension);
} }
parseText(ol,theTranslator->trMainPage()); ol.parseText(theTranslator->trMainPage());
ol.endQuickIndexItem(); ol.endQuickIndexItem();
//if (documentedPackages>0) //if (documentedPackages>0)
...@@ -201,7 +200,7 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE) ...@@ -201,7 +200,7 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE)
{ {
if (!compact) ol.writeListItem(); if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"modules"+Doxygen::htmlFileExtension); ol.startQuickIndexItem(extLink,"modules"+Doxygen::htmlFileExtension);
parseText(ol,theTranslator->trModules()); ol.parseText(theTranslator->trModules());
ol.endQuickIndexItem(); ol.endQuickIndexItem();
} }
if (documentedNamespaces>0) if (documentedNamespaces>0)
...@@ -210,11 +209,11 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE) ...@@ -210,11 +209,11 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE)
ol.startQuickIndexItem(extLink,"namespaces"+Doxygen::htmlFileExtension); ol.startQuickIndexItem(extLink,"namespaces"+Doxygen::htmlFileExtension);
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{ {
parseText(ol,theTranslator->trPackages()); ol.parseText(theTranslator->trPackages());
} }
else else
{ {
parseText(ol,theTranslator->trNamespaceList()); ol.parseText(theTranslator->trNamespaceList());
} }
ol.endQuickIndexItem(); ol.endQuickIndexItem();
} }
...@@ -222,7 +221,7 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE) ...@@ -222,7 +221,7 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE)
{ {
if (!compact) ol.writeListItem(); if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"hierarchy"+Doxygen::htmlFileExtension); ol.startQuickIndexItem(extLink,"hierarchy"+Doxygen::htmlFileExtension);
parseText(ol,theTranslator->trClassHierarchy()); ol.parseText(theTranslator->trClassHierarchy());
ol.endQuickIndexItem(); ol.endQuickIndexItem();
} }
if (annotatedClasses>0) if (annotatedClasses>0)
...@@ -231,19 +230,19 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE) ...@@ -231,19 +230,19 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE)
{ {
if (!compact) ol.writeListItem(); if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"classes"+Doxygen::htmlFileExtension); ol.startQuickIndexItem(extLink,"classes"+Doxygen::htmlFileExtension);
parseText(ol,theTranslator->trAlphabeticalList()); ol.parseText(theTranslator->trAlphabeticalList());
ol.endQuickIndexItem(); ol.endQuickIndexItem();
} }
if (!compact) ol.writeListItem(); if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"annotated"+Doxygen::htmlFileExtension); ol.startQuickIndexItem(extLink,"annotated"+Doxygen::htmlFileExtension);
parseText(ol,theTranslator->trCompoundList()); ol.parseText(theTranslator->trCompoundList());
ol.endQuickIndexItem(); ol.endQuickIndexItem();
} }
if (documentedHtmlFiles>0) if (documentedHtmlFiles>0)
{ {
if (!compact) ol.writeListItem(); if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"files"+Doxygen::htmlFileExtension); ol.startQuickIndexItem(extLink,"files"+Doxygen::htmlFileExtension);
parseText(ol,theTranslator->trFileList()); ol.parseText(theTranslator->trFileList());
ol.endQuickIndexItem(); ol.endQuickIndexItem();
} }
//if (documentedIncludeFiles>0 && Config_getBool("VERBATIM_HEADERS")) //if (documentedIncludeFiles>0 && Config_getBool("VERBATIM_HEADERS"))
...@@ -264,42 +263,42 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE) ...@@ -264,42 +263,42 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE)
{ {
if (!compact) ol.writeListItem(); if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"namespacemembers"+Doxygen::htmlFileExtension); ol.startQuickIndexItem(extLink,"namespacemembers"+Doxygen::htmlFileExtension);
parseText(ol,theTranslator->trNamespaceMembers()); ol.parseText(theTranslator->trNamespaceMembers());
ol.endQuickIndexItem(); ol.endQuickIndexItem();
} }
if (documentedMembers>0) if (documentedMembers>0)
{ {
if (!compact) ol.writeListItem(); if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"functions"+Doxygen::htmlFileExtension); ol.startQuickIndexItem(extLink,"functions"+Doxygen::htmlFileExtension);
parseText(ol,theTranslator->trCompoundMembers()); ol.parseText(theTranslator->trCompoundMembers());
ol.endQuickIndexItem(); ol.endQuickIndexItem();
} }
if (documentedFunctions>0) if (documentedFunctions>0)
{ {
if (!compact) ol.writeListItem(); if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"globals"+Doxygen::htmlFileExtension); ol.startQuickIndexItem(extLink,"globals"+Doxygen::htmlFileExtension);
parseText(ol,theTranslator->trFileMembers()); ol.parseText(theTranslator->trFileMembers());
ol.endQuickIndexItem(); ol.endQuickIndexItem();
} }
if (indexedPages>0) if (indexedPages>0)
{ {
if (!compact) ol.writeListItem(); if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"pages"+Doxygen::htmlFileExtension); ol.startQuickIndexItem(extLink,"pages"+Doxygen::htmlFileExtension);
parseText(ol,theTranslator->trRelatedPages()); ol.parseText(theTranslator->trRelatedPages());
ol.endQuickIndexItem(); ol.endQuickIndexItem();
} }
if (Doxygen::exampleSDict->count()>0) if (Doxygen::exampleSDict->count()>0)
{ {
if (!compact) ol.writeListItem(); if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,"examples"+Doxygen::htmlFileExtension); ol.startQuickIndexItem(extLink,"examples"+Doxygen::htmlFileExtension);
parseText(ol,theTranslator->trExamples()); ol.parseText(theTranslator->trExamples());
ol.endQuickIndexItem(); ol.endQuickIndexItem();
} }
if (Config_getBool("SEARCHENGINE")) if (Config_getBool("SEARCHENGINE"))
{ {
if (!compact) ol.writeListItem(); if (!compact) ol.writeListItem();
ol.startQuickIndexItem("_cgi",""); ol.startQuickIndexItem("_cgi","");
parseText(ol,theTranslator->trSearch()); ol.parseText(theTranslator->trSearch());
ol.endQuickIndexItem(); ol.endQuickIndexItem();
} }
if (compact) if (compact)
...@@ -341,7 +340,7 @@ void endFile(OutputList &ol,bool external) ...@@ -341,7 +340,7 @@ void endFile(OutputList &ol,bool external)
ol.writeFooter(0,external); // write the footer ol.writeFooter(0,external); // write the footer
if (Config_getString("HTML_FOOTER").isEmpty()) if (Config_getString("HTML_FOOTER").isEmpty())
{ {
parseText(ol,theTranslator->trGeneratedAt( ol.parseText(theTranslator->trGeneratedAt(
dateToString(TRUE), dateToString(TRUE),
Config_getString("PROJECT_NAME") Config_getString("PROJECT_NAME")
)); ));
...@@ -714,7 +713,7 @@ void writeHierarchicalIndex(OutputList &ol) ...@@ -714,7 +713,7 @@ void writeHierarchicalIndex(OutputList &ol)
{ {
title.prepend(Config_getString("PROJECT_NAME")+" "); title.prepend(Config_getString("PROJECT_NAME")+" ");
} }
parseText(ol,title); ol.parseText(title);
endTitle(ol,0,0); endTitle(ol,0,0);
ol.startTextBlock(); ol.startTextBlock();
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
...@@ -737,13 +736,13 @@ void writeHierarchicalIndex(OutputList &ol) ...@@ -737,13 +736,13 @@ void writeHierarchicalIndex(OutputList &ol)
ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::RTF);
ol.startTextLink("inherits",0); ol.startTextLink("inherits",0);
parseText(ol,theTranslator->trGotoGraphicalHierarchy()); ol.parseText(theTranslator->trGotoGraphicalHierarchy());
ol.endTextLink(); ol.endTextLink();
ol.newParagraph(); ol.newParagraph();
ol.enable(OutputGenerator::Latex); ol.enable(OutputGenerator::Latex);
ol.enable(OutputGenerator::RTF); ol.enable(OutputGenerator::RTF);
} }
parseText(ol,theTranslator->trClassHierarchyDescription()); ol.parseText(theTranslator->trClassHierarchyDescription());
ol.endTextBlock(); ol.endTextBlock();
writeClassHierarchy(ol); writeClassHierarchy(ol);
endFile(ol); endFile(ol);
...@@ -762,7 +761,7 @@ void writeGraphicalClassHierarchy(OutputList &ol) ...@@ -762,7 +761,7 @@ void writeGraphicalClassHierarchy(OutputList &ol)
QCString htmlHelpTitle = title; QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title; QCString ftvHelpTitle = title;
if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" "); if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" ");
parseText(ol,title); ol.parseText(title);
endTitle(ol,0,0); endTitle(ol,0,0);
ol.startTextBlock(); ol.startTextBlock();
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
...@@ -781,7 +780,7 @@ void writeGraphicalClassHierarchy(OutputList &ol) ...@@ -781,7 +780,7 @@ void writeGraphicalClassHierarchy(OutputList &ol)
ftvHelp->addContentsItem(FALSE,0,"inherits",0,ftvHelpTitle); ftvHelp->addContentsItem(FALSE,0,"inherits",0,ftvHelpTitle);
} }
ol.startTextLink("hierarchy",0); ol.startTextLink("hierarchy",0);
parseText(ol,theTranslator->trGotoTextualHierarchy()); ol.parseText(theTranslator->trGotoTextualHierarchy());
ol.endTextLink(); ol.endTextLink();
ol.newParagraph(); ol.newParagraph();
//parseText(ol,theTranslator->trClassHierarchyDescription()); //parseText(ol,theTranslator->trClassHierarchyDescription());
...@@ -841,7 +840,7 @@ void writeFileIndex(OutputList &ol) ...@@ -841,7 +840,7 @@ void writeFileIndex(OutputList &ol)
QCString htmlHelpTitle = title; QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title; QCString ftvHelpTitle = title;
if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" "); if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" ");
parseText(ol,title); ol.parseText(title);
endTitle(ol,0,0); endTitle(ol,0,0);
ol.startTextBlock(); ol.startTextBlock();
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
...@@ -862,7 +861,7 @@ void writeFileIndex(OutputList &ol) ...@@ -862,7 +861,7 @@ void writeFileIndex(OutputList &ol)
ftvHelp->incContentsDepth(); ftvHelp->incContentsDepth();
} }
//ol.newParagraph(); //ol.newParagraph();
parseText(ol,theTranslator->trFileListDescription(Config_getBool("EXTRACT_ALL"))); ol.parseText(theTranslator->trFileListDescription(Config_getBool("EXTRACT_ALL")));
//ol.newParagraph(); //ol.newParagraph();
ol.endTextBlock(); ol.endTextBlock();
...@@ -1000,7 +999,7 @@ void writeFileIndex(OutputList &ol) ...@@ -1000,7 +999,7 @@ void writeFileIndex(OutputList &ol)
ol.docify(" "); ol.docify(" ");
ol.startTextLink(fd->includeName(),0); ol.startTextLink(fd->includeName(),0);
ol.docify("["); ol.docify("[");
parseText(ol,theTranslator->trCode()); ol.parseText(theTranslator->trCode());
ol.docify("]"); ol.docify("]");
ol.endTextLink(); ol.endTextLink();
ol.popGeneratorState(); ol.popGeneratorState();
...@@ -1011,10 +1010,12 @@ void writeFileIndex(OutputList &ol) ...@@ -1011,10 +1010,12 @@ void writeFileIndex(OutputList &ol)
if (hasBrief) if (hasBrief)
{ {
//ol.docify(" ("); //ol.docify(" (");
parseDoc(ol, ol.parseDoc(
fd->briefFile(),fd->briefLine(), fd->briefFile(),fd->briefLine(),
0,0, 0,0,
abbreviate(fd->briefDescription(),fd->name())); abbreviate(fd->briefDescription(),fd->name()),
FALSE
);
//ol.docify(")"); //ol.docify(")");
} }
ol.endIndexValue(fd->getOutputFileBase(),hasBrief); ol.endIndexValue(fd->getOutputFileBase(),hasBrief);
...@@ -1080,7 +1081,7 @@ void writeNamespaceIndex(OutputList &ol) ...@@ -1080,7 +1081,7 @@ void writeNamespaceIndex(OutputList &ol)
QCString htmlHelpTitle = title; QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title; QCString ftvHelpTitle = title;
if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" "); if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" ");
parseText(ol,title); ol.parseText(title);
endTitle(ol,0,0); endTitle(ol,0,0);
ol.startTextBlock(); ol.startTextBlock();
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
...@@ -1103,11 +1104,11 @@ void writeNamespaceIndex(OutputList &ol) ...@@ -1103,11 +1104,11 @@ void writeNamespaceIndex(OutputList &ol)
//ol.newParagraph(); //ol.newParagraph();
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{ {
parseText(ol,theTranslator->trPackageListDescription()); ol.parseText(theTranslator->trPackageListDescription());
} }
else else
{ {
parseText(ol,theTranslator->trNamespaceListDescription(Config_getBool("EXTRACT_ALL"))); ol.parseText(theTranslator->trNamespaceListDescription(Config_getBool("EXTRACT_ALL")));
} }
//ol.newParagraph(); //ol.newParagraph();
ol.endTextBlock(); ol.endTextBlock();
...@@ -1134,10 +1135,12 @@ void writeNamespaceIndex(OutputList &ol) ...@@ -1134,10 +1135,12 @@ void writeNamespaceIndex(OutputList &ol)
if (hasBrief) if (hasBrief)
{ {
//ol.docify(" ("); //ol.docify(" (");
parseDoc(ol, ol.parseDoc(
nd->briefFile(),nd->briefLine(), nd->briefFile(),nd->briefLine(),
nd->name(),0, nd->name(),0,
abbreviate(nd->briefDescription(),nd->displayName())); abbreviate(nd->briefDescription(),nd->displayName()),
FALSE
);
//ol.docify(")"); //ol.docify(")");
} }
ol.endIndexValue(nd->getOutputFileBase(),hasBrief); ol.endIndexValue(nd->getOutputFileBase(),hasBrief);
...@@ -1209,12 +1212,12 @@ void writeAnnotatedClassList(OutputList &ol) ...@@ -1209,12 +1212,12 @@ void writeAnnotatedClassList(OutputList &ol)
ol.startIndexValue(hasBrief); ol.startIndexValue(hasBrief);
if (hasBrief) if (hasBrief)
{ {
//ol.docify(" ("); ol.parseDoc(
parseDoc(ol,
cd->briefFile(),cd->briefLine(), cd->briefFile(),cd->briefLine(),
cd->name(),0, cd->name(),0,
abbreviate(cd->briefDescription(),cd->name())); abbreviate(cd->briefDescription(),cd->name()),
//ol.docify(")"); FALSE
);
} }
ol.endIndexValue(cd->getOutputFileBase(),hasBrief); ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
//ol.writeEndAnnoItem(cd->getOutputFileBase()); //ol.writeEndAnnoItem(cd->getOutputFileBase());
...@@ -1432,7 +1435,7 @@ void writeAlphabeticalIndex(OutputList &ol) ...@@ -1432,7 +1435,7 @@ void writeAlphabeticalIndex(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
startFile(ol,"classes"+Doxygen::htmlFileExtension,0,"Alphabetical index"); startFile(ol,"classes"+Doxygen::htmlFileExtension,0,"Alphabetical index");
startTitle(ol,0); startTitle(ol,0);
parseText(ol,Config_getString("PROJECT_NAME")+" "+theTranslator->trCompoundIndex()); ol.parseText(Config_getString("PROJECT_NAME")+" "+theTranslator->trCompoundIndex());
endTitle(ol,0,0); endTitle(ol,0,0);
writeAlphabeticalClassList(ol); writeAlphabeticalClassList(ol);
endFile(ol); endFile(ol);
...@@ -1457,7 +1460,7 @@ void writeAnnotatedIndex(OutputList &ol) ...@@ -1457,7 +1460,7 @@ void writeAnnotatedIndex(OutputList &ol)
QCString htmlHelpTitle = title; QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title; QCString ftvHelpTitle = title;
if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" "); if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" ");
parseText(ol,title); ol.parseText(title);
endTitle(ol,0,0); endTitle(ol,0,0);
ol.startTextBlock(); ol.startTextBlock();
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
...@@ -1474,7 +1477,7 @@ void writeAnnotatedIndex(OutputList &ol) ...@@ -1474,7 +1477,7 @@ void writeAnnotatedIndex(OutputList &ol)
ftvHelp->addContentsItem(TRUE,0,"annotated",0,ftvHelpTitle); ftvHelp->addContentsItem(TRUE,0,"annotated",0,ftvHelpTitle);
ftvHelp->incContentsDepth(); ftvHelp->incContentsDepth();
} }
parseText(ol,theTranslator->trCompoundListDescription()); ol.parseText(theTranslator->trCompoundListDescription());
ol.endTextBlock(); ol.endTextBlock();
writeAnnotatedClassList(ol); writeAnnotatedClassList(ol);
if (hasHtmlHelp) if (hasHtmlHelp)
...@@ -1701,7 +1704,7 @@ void writeMemberIndex(OutputList &ol) ...@@ -1701,7 +1704,7 @@ void writeMemberIndex(OutputList &ol)
QCString ftvHelpTitle = title; QCString ftvHelpTitle = title;
if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" "); if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" ");
startTitle(ol,0); startTitle(ol,0);
parseText(ol,title); ol.parseText(title);
endTitle(ol,0,0); endTitle(ol,0,0);
bool quickIndex = documentedMembers>maxItemsBeforeQuickIndex; bool quickIndex = documentedMembers>maxItemsBeforeQuickIndex;
if (quickIndex) if (quickIndex)
...@@ -1721,7 +1724,7 @@ void writeMemberIndex(OutputList &ol) ...@@ -1721,7 +1724,7 @@ void writeMemberIndex(OutputList &ol)
FTVHelp *ftvHelp = FTVHelp::getInstance(); FTVHelp *ftvHelp = FTVHelp::getInstance();
ftvHelp->addContentsItem(FALSE,0,"functions",0,ftvHelpTitle); ftvHelp->addContentsItem(FALSE,0,"functions",0,ftvHelpTitle);
} }
parseText(ol,theTranslator->trCompoundMembersDescription(Config_getBool("EXTRACT_ALL"))); ol.parseText(theTranslator->trCompoundMembersDescription(Config_getBool("EXTRACT_ALL")));
writeMemberList(ol,quickIndex); writeMemberList(ol,quickIndex);
endFile(ol); endFile(ol);
ol.popGeneratorState(); ol.popGeneratorState();
...@@ -1958,7 +1961,7 @@ void writeFileMemberIndex(OutputList &ol) ...@@ -1958,7 +1961,7 @@ void writeFileMemberIndex(OutputList &ol)
QCString ftvHelpTitle = title; QCString ftvHelpTitle = title;
if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" "); if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" ");
startTitle(ol,0); startTitle(ol,0);
parseText(ol,title); ol.parseText(title);
endTitle(ol,0,0); endTitle(ol,0,0);
bool quickIndex = documentedMembers>maxItemsBeforeQuickIndex; bool quickIndex = documentedMembers>maxItemsBeforeQuickIndex;
if (quickIndex) if (quickIndex)
...@@ -1978,7 +1981,7 @@ void writeFileMemberIndex(OutputList &ol) ...@@ -1978,7 +1981,7 @@ void writeFileMemberIndex(OutputList &ol)
FTVHelp *ftvHelp = FTVHelp::getInstance(); FTVHelp *ftvHelp = FTVHelp::getInstance();
ftvHelp->addContentsItem(FALSE,0,"globals",0,ftvHelpTitle); ftvHelp->addContentsItem(FALSE,0,"globals",0,ftvHelpTitle);
} }
parseText(ol,theTranslator->trFileMembersDescription(Config_getBool("EXTRACT_ALL"))); ol.parseText(theTranslator->trFileMembersDescription(Config_getBool("EXTRACT_ALL")));
writeFileMemberList(ol,quickIndex); writeFileMemberList(ol,quickIndex);
endFile(ol); endFile(ol);
ol.popGeneratorState(); ol.popGeneratorState();
...@@ -1997,7 +2000,7 @@ void writeNamespaceMemberIndex(OutputList &ol) ...@@ -1997,7 +2000,7 @@ void writeNamespaceMemberIndex(OutputList &ol)
QCString ftvHelpTitle = title; QCString ftvHelpTitle = title;
if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" "); if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" ");
startTitle(ol,0); startTitle(ol,0);
parseText(ol,title); ol.parseText(title);
endTitle(ol,0,0); endTitle(ol,0,0);
bool quickIndex = documentedMembers>maxItemsBeforeQuickIndex; bool quickIndex = documentedMembers>maxItemsBeforeQuickIndex;
if (quickIndex) if (quickIndex)
...@@ -2017,7 +2020,7 @@ void writeNamespaceMemberIndex(OutputList &ol) ...@@ -2017,7 +2020,7 @@ void writeNamespaceMemberIndex(OutputList &ol)
FTVHelp *ftvHelp = FTVHelp::getInstance(); FTVHelp *ftvHelp = FTVHelp::getInstance();
ftvHelp->addContentsItem(FALSE,0,"namespacemembers",0,ftvHelpTitle); ftvHelp->addContentsItem(FALSE,0,"namespacemembers",0,ftvHelpTitle);
} }
parseText(ol,theTranslator->trNamespaceMemberDescription(Config_getBool("EXTRACT_ALL"))); ol.parseText(theTranslator->trNamespaceMemberDescription(Config_getBool("EXTRACT_ALL")));
writeNamespaceMemberList(ol,quickIndex); writeNamespaceMemberList(ol,quickIndex);
endFile(ol); endFile(ol);
ol.popGeneratorState(); ol.popGeneratorState();
...@@ -2036,7 +2039,7 @@ void writeExampleIndex(OutputList &ol) ...@@ -2036,7 +2039,7 @@ void writeExampleIndex(OutputList &ol)
QCString htmlHelpTitle = title; QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title; QCString ftvHelpTitle = title;
if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" "); if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" ");
parseText(ol,title); ol.parseText(title);
endTitle(ol,0,0); endTitle(ol,0,0);
ol.startTextBlock(); ol.startTextBlock();
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
...@@ -2056,7 +2059,7 @@ void writeExampleIndex(OutputList &ol) ...@@ -2056,7 +2059,7 @@ void writeExampleIndex(OutputList &ol)
ftvHelp->addContentsItem(TRUE,0,"examples",0,ftvHelpTitle); ftvHelp->addContentsItem(TRUE,0,"examples",0,ftvHelpTitle);
ftvHelp->incContentsDepth(); ftvHelp->incContentsDepth();
} }
parseText(ol,theTranslator->trExamplesDescription()); ol.parseText(theTranslator->trExamplesDescription());
//ol.newParagraph(); //ol.newParagraph();
ol.endTextBlock(); ol.endTextBlock();
ol.startItemList(); ol.startItemList();
...@@ -2140,7 +2143,7 @@ void writePageIndex(OutputList &ol) ...@@ -2140,7 +2143,7 @@ void writePageIndex(OutputList &ol)
QCString htmlHelpTitle = title; QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title; QCString ftvHelpTitle = title;
if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" "); if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" ");
parseText(ol,title); ol.parseText(title);
endTitle(ol,0,0); endTitle(ol,0,0);
ol.startTextBlock(); ol.startTextBlock();
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
...@@ -2160,7 +2163,7 @@ void writePageIndex(OutputList &ol) ...@@ -2160,7 +2163,7 @@ void writePageIndex(OutputList &ol)
ftvHelp->addContentsItem(TRUE,0,"pages",0,ftvHelpTitle); ftvHelp->addContentsItem(TRUE,0,"pages",0,ftvHelpTitle);
ftvHelp->incContentsDepth(); ftvHelp->incContentsDepth();
} }
parseText(ol,theTranslator->trRelatedPagesDescription()); ol.parseText(theTranslator->trRelatedPagesDescription());
ol.endTextBlock(); ol.endTextBlock();
startIndexHierarchy(ol,0); startIndexHierarchy(ol,0);
PageSDict::Iterator pdi(*Doxygen::pageSDict); PageSDict::Iterator pdi(*Doxygen::pageSDict);
...@@ -2235,12 +2238,12 @@ void writeGraphInfo(OutputList &ol) ...@@ -2235,12 +2238,12 @@ void writeGraphInfo(OutputList &ol)
generateGraphLegend(Config_getString("HTML_OUTPUT")); generateGraphLegend(Config_getString("HTML_OUTPUT"));
startFile(ol,"graph_legend",0,"Graph Legend"); startFile(ol,"graph_legend",0,"Graph Legend");
startTitle(ol,0); startTitle(ol,0);
parseText(ol,theTranslator->trLegendTitle()); ol.parseText(theTranslator->trLegendTitle());
endTitle(ol,0,0); endTitle(ol,0,0);
bool oldStripCommentsState = Config_getBool("STRIP_CODE_COMMENTS"); bool oldStripCommentsState = Config_getBool("STRIP_CODE_COMMENTS");
// temporarily disable the stripping of comments for our own code example! // temporarily disable the stripping of comments for our own code example!
Config_getBool("STRIP_CODE_COMMENTS") = FALSE; Config_getBool("STRIP_CODE_COMMENTS") = FALSE;
parseDoc(ol,"graph_legend",1,0,0,theTranslator->trLegendDocs()); ol.parseDoc("graph_legend",1,0,0,theTranslator->trLegendDocs(),FALSE);
Config_getBool("STRIP_CODE_COMMENTS") = oldStripCommentsState; Config_getBool("STRIP_CODE_COMMENTS") = oldStripCommentsState;
endFile(ol); endFile(ol);
ol.popGeneratorState(); ol.popGeneratorState();
...@@ -2631,7 +2634,7 @@ void writeGroupIndex(OutputList &ol) ...@@ -2631,7 +2634,7 @@ void writeGroupIndex(OutputList &ol)
QCString htmlHelpTitle = title; QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title; QCString ftvHelpTitle = title;
if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" "); if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" ");
parseText(ol,title); ol.parseText(title);
endTitle(ol,0,0); endTitle(ol,0,0);
ol.startTextBlock(); ol.startTextBlock();
HtmlHelp *htmlHelp = 0; HtmlHelp *htmlHelp = 0;
...@@ -2651,7 +2654,7 @@ void writeGroupIndex(OutputList &ol) ...@@ -2651,7 +2654,7 @@ void writeGroupIndex(OutputList &ol)
ftvHelp->addContentsItem(TRUE,0,"modules",0,ftvHelpTitle); ftvHelp->addContentsItem(TRUE,0,"modules",0,ftvHelpTitle);
ftvHelp->incContentsDepth(); ftvHelp->incContentsDepth();
} }
parseText(ol,theTranslator->trModulesDescription()); ol.parseText(theTranslator->trModulesDescription());
ol.endTextBlock(); ol.endTextBlock();
writeGroupHierarchy(ol); writeGroupHierarchy(ol);
if (hasHtmlHelp) if (hasHtmlHelp)
...@@ -2719,25 +2722,25 @@ void writeIndex(OutputList &ol) ...@@ -2719,25 +2722,25 @@ void writeIndex(OutputList &ol)
ol.startTitleHead(0); ol.startTitleHead(0);
if (Doxygen::mainPage && !Doxygen::mainPage->title.isEmpty()) if (Doxygen::mainPage && !Doxygen::mainPage->title.isEmpty())
{ {
parseDoc(ol,defFileName,defLine,0,0,Doxygen::mainPage->title); ol.parseDoc(defFileName,defLine,0,0,Doxygen::mainPage->title,FALSE);
} }
else else
{ {
parseText(ol,projPrefix+theTranslator->trDocumentation()); ol.parseText(projPrefix+theTranslator->trDocumentation());
} }
ol.endTitleHead(0,0); ol.endTitleHead(0,0);
ol.newParagraph(); ol.newParagraph();
if (!Config_getString("PROJECT_NUMBER").isEmpty()) if (!Config_getString("PROJECT_NUMBER").isEmpty())
{ {
ol.startProjectNumber(); ol.startProjectNumber();
parseDoc(ol,defFileName,defLine,0,0,Config_getString("PROJECT_NUMBER")); ol.parseDoc(defFileName,defLine,0,0,Config_getString("PROJECT_NUMBER"),FALSE);
ol.endProjectNumber(); ol.endProjectNumber();
} }
if (Config_getBool("DISABLE_INDEX") && Doxygen::mainPage==0) writeQuickLinks(ol,FALSE); if (Config_getBool("DISABLE_INDEX") && Doxygen::mainPage==0) writeQuickLinks(ol,FALSE);
if (Doxygen::mainPage) if (Doxygen::mainPage)
{ {
parseDoc(ol,defFileName,defLine,0,0,Doxygen::mainPage->doc); ol.parseDoc(defFileName,defLine,0,0,Doxygen::mainPage->doc,FALSE);
if (!Config_getString("GENERATE_TAGFILE").isEmpty()) if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{ {
...@@ -2776,16 +2779,16 @@ void writeIndex(OutputList &ol) ...@@ -2776,16 +2779,16 @@ void writeIndex(OutputList &ol)
ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex);
} }
parseText(ol,projPrefix+theTranslator->trReferenceManual()); ol.parseText(projPrefix+theTranslator->trReferenceManual());
if (!Config_getString("PROJECT_NUMBER").isEmpty()) if (!Config_getString("PROJECT_NUMBER").isEmpty())
{ {
ol.startProjectNumber(); ol.startProjectNumber();
parseDoc(ol,defFileName,defLine,0,0,Config_getString("PROJECT_NUMBER")); ol.parseDoc(defFileName,defLine,0,0,Config_getString("PROJECT_NUMBER"),FALSE);
ol.endProjectNumber(); ol.endProjectNumber();
} }
ol.endIndexSection(isTitlePageStart); ol.endIndexSection(isTitlePageStart);
ol.startIndexSection(isTitlePageAuthor); ol.startIndexSection(isTitlePageAuthor);
parseText(ol,theTranslator->trGeneratedBy()); ol.parseText(theTranslator->trGeneratedBy());
ol.endIndexSection(isTitlePageAuthor); ol.endIndexSection(isTitlePageAuthor);
ol.enable(OutputGenerator::Latex); ol.enable(OutputGenerator::Latex);
...@@ -2794,11 +2797,11 @@ void writeIndex(OutputList &ol) ...@@ -2794,11 +2797,11 @@ void writeIndex(OutputList &ol)
ol.startIndexSection(isMainPage); ol.startIndexSection(isMainPage);
if (!Doxygen::mainPage->title.isEmpty()) if (!Doxygen::mainPage->title.isEmpty())
{ {
parseDoc(ol,defFileName,defLine,0,0,Doxygen::mainPage->title); ol.parseDoc(defFileName,defLine,0,0,Doxygen::mainPage->title,FALSE);
} }
else else
{ {
parseText(ol,projPrefix+theTranslator->trMainPage()); ol.parseText(projPrefix+theTranslator->trMainPage());
} }
ol.endIndexSection(isMainPage); ol.endIndexSection(isMainPage);
} }
...@@ -2813,37 +2816,37 @@ void writeIndex(OutputList &ol) ...@@ -2813,37 +2816,37 @@ void writeIndex(OutputList &ol)
if (documentedGroups>0) if (documentedGroups>0)
{ {
ol.startIndexSection(isModuleIndex); ol.startIndexSection(isModuleIndex);
parseText(ol,projPrefix+theTranslator->trModuleIndex()); ol.parseText(projPrefix+theTranslator->trModuleIndex());
ol.endIndexSection(isModuleIndex); ol.endIndexSection(isModuleIndex);
} }
if (documentedNamespaces>0) if (documentedNamespaces>0)
{ {
ol.startIndexSection(isNamespaceIndex); ol.startIndexSection(isNamespaceIndex);
parseText(ol,projPrefix+theTranslator->trNamespaceIndex()); ol.parseText(projPrefix+theTranslator->trNamespaceIndex());
ol.endIndexSection(isNamespaceIndex); ol.endIndexSection(isNamespaceIndex);
} }
if (hierarchyClasses>0) if (hierarchyClasses>0)
{ {
ol.startIndexSection(isClassHierarchyIndex); ol.startIndexSection(isClassHierarchyIndex);
parseText(ol,projPrefix+theTranslator->trHierarchicalIndex()); ol.parseText(projPrefix+theTranslator->trHierarchicalIndex());
ol.endIndexSection(isClassHierarchyIndex); ol.endIndexSection(isClassHierarchyIndex);
} }
if (annotatedClasses>0) if (annotatedClasses>0)
{ {
ol.startIndexSection(isCompoundIndex); ol.startIndexSection(isCompoundIndex);
parseText(ol,projPrefix+theTranslator->trCompoundIndex()); ol.parseText(projPrefix+theTranslator->trCompoundIndex());
ol.endIndexSection(isCompoundIndex); ol.endIndexSection(isCompoundIndex);
} }
if (documentedFiles>0) if (documentedFiles>0)
{ {
ol.startIndexSection(isFileIndex); ol.startIndexSection(isFileIndex);
parseText(ol,projPrefix+theTranslator->trFileIndex()); ol.parseText(projPrefix+theTranslator->trFileIndex());
ol.endIndexSection(isFileIndex); ol.endIndexSection(isFileIndex);
} }
if (indexedPages>0) if (indexedPages>0)
{ {
ol.startIndexSection(isPageIndex); ol.startIndexSection(isPageIndex);
parseText(ol,projPrefix+theTranslator->trPageIndex()); ol.parseText(projPrefix+theTranslator->trPageIndex());
ol.endIndexSection(isPageIndex); ol.endIndexSection(isPageIndex);
} }
ol.lastIndexPage(); ol.lastIndexPage();
...@@ -2856,37 +2859,37 @@ void writeIndex(OutputList &ol) ...@@ -2856,37 +2859,37 @@ void writeIndex(OutputList &ol)
if (documentedGroups>0) if (documentedGroups>0)
{ {
ol.startIndexSection(isModuleDocumentation); ol.startIndexSection(isModuleDocumentation);
parseText(ol,projPrefix+theTranslator->trModuleDocumentation()); ol.parseText(projPrefix+theTranslator->trModuleDocumentation());
ol.endIndexSection(isModuleDocumentation); ol.endIndexSection(isModuleDocumentation);
} }
if (documentedNamespaces>0) if (documentedNamespaces>0)
{ {
ol.startIndexSection(isNamespaceDocumentation); ol.startIndexSection(isNamespaceDocumentation);
parseText(ol,projPrefix+theTranslator->trNamespaceDocumentation()); ol.parseText(projPrefix+theTranslator->trNamespaceDocumentation());
ol.endIndexSection(isNamespaceDocumentation); ol.endIndexSection(isNamespaceDocumentation);
} }
if (annotatedClasses>0) if (annotatedClasses>0)
{ {
ol.startIndexSection(isClassDocumentation); ol.startIndexSection(isClassDocumentation);
parseText(ol,projPrefix+theTranslator->trClassDocumentation()); ol.parseText(projPrefix+theTranslator->trClassDocumentation());
ol.endIndexSection(isClassDocumentation); ol.endIndexSection(isClassDocumentation);
} }
if (documentedFiles>0) if (documentedFiles>0)
{ {
ol.startIndexSection(isFileDocumentation); ol.startIndexSection(isFileDocumentation);
parseText(ol,projPrefix+theTranslator->trFileDocumentation()); ol.parseText(projPrefix+theTranslator->trFileDocumentation());
ol.endIndexSection(isFileDocumentation); ol.endIndexSection(isFileDocumentation);
} }
if (Doxygen::exampleSDict->count()>0) if (Doxygen::exampleSDict->count()>0)
{ {
ol.startIndexSection(isExampleDocumentation); ol.startIndexSection(isExampleDocumentation);
parseText(ol,projPrefix+theTranslator->trExampleDocumentation()); ol.parseText(projPrefix+theTranslator->trExampleDocumentation());
ol.endIndexSection(isExampleDocumentation); ol.endIndexSection(isExampleDocumentation);
} }
if (documentedPages>0) if (documentedPages>0)
{ {
ol.startIndexSection(isPageDocumentation); ol.startIndexSection(isPageDocumentation);
parseText(ol,projPrefix+theTranslator->trPageDocumentation()); ol.parseText(projPrefix+theTranslator->trPageDocumentation());
ol.endIndexSection(isPageDocumentation); ol.endIndexSection(isPageDocumentation);
} }
ol.endIndexSection(isEndIndex); ol.endIndexSection(isEndIndex);
...@@ -2905,7 +2908,7 @@ void writeIndex(OutputList &ol) ...@@ -2905,7 +2908,7 @@ void writeIndex(OutputList &ol)
// ol.endSection(si->label,FALSE); // ol.endSection(si->label,FALSE);
//} //}
ol.startTextBlock(); ol.startTextBlock();
parseDoc(ol,defFileName,defLine,0,0,Doxygen::mainPage->doc); ol.parseDoc(defFileName,defLine,0,0,Doxygen::mainPage->doc,FALSE);
ol.endTextBlock(); ol.endTextBlock();
endFile(ol); endFile(ol);
ol.enable(OutputGenerator::Man); ol.enable(OutputGenerator::Man);
......
...@@ -211,7 +211,7 @@ void LatexDocVisitor::visit(DocVerbatim *s) ...@@ -211,7 +211,7 @@ void LatexDocVisitor::visit(DocVerbatim *s)
{ {
case DocVerbatim::Code: // fall though case DocVerbatim::Code: // fall though
m_t << "\n\n\\footnotesize\\begin{verbatim}"; m_t << "\n\n\\footnotesize\\begin{verbatim}";
parseCode(m_ci,s->context(),s->text().latin1(),FALSE,0); parseCode(m_ci,s->context(),s->text().latin1(),s->isExample(),s->exampleFile());
m_t << "\\end{verbatim}\\normalsize" << endl; m_t << "\\end{verbatim}\\normalsize" << endl;
break; break;
case DocVerbatim::Verbatim: case DocVerbatim::Verbatim:
...@@ -246,7 +246,7 @@ void LatexDocVisitor::visit(DocInclude *inc) ...@@ -246,7 +246,7 @@ void LatexDocVisitor::visit(DocInclude *inc)
{ {
case DocInclude::Include: case DocInclude::Include:
m_t << "\n\n\\footnotesize\\begin{verbatim}"; m_t << "\n\n\\footnotesize\\begin{verbatim}";
parseCode(m_ci,inc->context(),inc->text().latin1(),FALSE,0); parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile());
m_t << "\\end{verbatim}\\normalsize" << endl; m_t << "\\end{verbatim}\\normalsize" << endl;
break; break;
case DocInclude::DontInclude: case DocInclude::DontInclude:
...@@ -272,7 +272,7 @@ void LatexDocVisitor::visit(DocIncOperator *op) ...@@ -272,7 +272,7 @@ void LatexDocVisitor::visit(DocIncOperator *op)
} }
if (op->type()!=DocIncOperator::Skip) if (op->type()!=DocIncOperator::Skip)
{ {
parseCode(m_ci,op->context(),op->text().latin1(),FALSE,0); parseCode(m_ci,op->context(),op->text().latin1(),op->isExample(),op->exampleFile());
} }
if (op->isLast()) if (op->isLast())
{ {
...@@ -878,6 +878,14 @@ void LatexDocVisitor::visitPost(DocCopy *) ...@@ -878,6 +878,14 @@ void LatexDocVisitor::visitPost(DocCopy *)
{ {
} }
void LatexDocVisitor::visitPre(DocText *)
{
}
void LatexDocVisitor::visitPost(DocText *)
{
}
void LatexDocVisitor::filter(const char *str) void LatexDocVisitor::filter(const char *str)
{ {
filterLatexString(m_t,str,FALSE,m_insidePre); filterLatexString(m_t,str,FALSE,m_insidePre);
......
...@@ -122,6 +122,8 @@ class LatexDocVisitor : public DocVisitor ...@@ -122,6 +122,8 @@ class LatexDocVisitor : public DocVisitor
void visitPost(DocInternalRef *); void visitPost(DocInternalRef *);
void visitPre(DocCopy *); void visitPre(DocCopy *);
void visitPost(DocCopy *); void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
private: private:
......
...@@ -32,7 +32,6 @@ HEADERS = bufstr.h \ ...@@ -32,7 +32,6 @@ HEADERS = bufstr.h \
define.h \ define.h \
definition.h \ definition.h \
diagram.h \ diagram.h \
doc.h \
docparser.h \ docparser.h \
doctokenizer.h \ doctokenizer.h \
docvisitor.h \ docvisitor.h \
...@@ -66,8 +65,8 @@ HEADERS = bufstr.h \ ...@@ -66,8 +65,8 @@ HEADERS = bufstr.h \
namespacedef.h \ namespacedef.h \
outputgen.h \ outputgen.h \
outputlist.h \ outputlist.h \
packagedef.h \
page.h \ page.h \
perlmodgen.h \
pngenc.h \ pngenc.h \
pre.h \ pre.h \
printdocvisitor.h \ printdocvisitor.h \
...@@ -133,7 +132,6 @@ SOURCES = ce_lex.cpp \ ...@@ -133,7 +132,6 @@ SOURCES = ce_lex.cpp \
define.cpp \ define.cpp \
definition.cpp \ definition.cpp \
diagram.cpp \ diagram.cpp \
doc.cpp \
docparser.cpp \ docparser.cpp \
doctokenizer.cpp \ doctokenizer.cpp \
dot.cpp \ dot.cpp \
...@@ -164,7 +162,7 @@ SOURCES = ce_lex.cpp \ ...@@ -164,7 +162,7 @@ SOURCES = ce_lex.cpp \
namespacedef.cpp \ namespacedef.cpp \
outputgen.cpp \ outputgen.cpp \
outputlist.cpp \ outputlist.cpp \
packagedef.cpp \ perlmodgen.cpp \
pngenc.cpp \ pngenc.cpp \
pre.cpp \ pre.cpp \
reflist.cpp \ reflist.cpp \
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
#include "message.h" #include "message.h"
ManDocVisitor::ManDocVisitor(QTextStream &t,BaseCodeDocInterface &ci) ManDocVisitor::ManDocVisitor(QTextStream &t,BaseCodeDocInterface &ci)
: m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE) : m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE), m_firstCol(TRUE),
m_indent(0)
{ {
} }
...@@ -39,6 +40,7 @@ void ManDocVisitor::visit(DocWord *w) ...@@ -39,6 +40,7 @@ void ManDocVisitor::visit(DocWord *w)
{ {
if (m_hide) return; if (m_hide) return;
filter(w->word()); filter(w->word());
m_firstCol=FALSE;
} }
void ManDocVisitor::visit(DocLinkedWord *w) void ManDocVisitor::visit(DocLinkedWord *w)
...@@ -47,6 +49,7 @@ void ManDocVisitor::visit(DocLinkedWord *w) ...@@ -47,6 +49,7 @@ void ManDocVisitor::visit(DocLinkedWord *w)
m_t << "\\fB"; m_t << "\\fB";
filter(w->word()); filter(w->word());
m_t << "\\fP"; m_t << "\\fP";
m_firstCol=FALSE;
} }
void ManDocVisitor::visit(DocWhiteSpace *w) void ManDocVisitor::visit(DocWhiteSpace *w)
...@@ -55,10 +58,12 @@ void ManDocVisitor::visit(DocWhiteSpace *w) ...@@ -55,10 +58,12 @@ void ManDocVisitor::visit(DocWhiteSpace *w)
if (m_insidePre) if (m_insidePre)
{ {
m_t << w->chars(); m_t << w->chars();
m_firstCol=w->chars().at(w->chars().length()-1)=='\n';
} }
else else
{ {
m_t << " "; m_t << " ";
m_firstCol=FALSE;
} }
} }
...@@ -67,71 +72,52 @@ void ManDocVisitor::visit(DocSymbol *s) ...@@ -67,71 +72,52 @@ void ManDocVisitor::visit(DocSymbol *s)
if (m_hide) return; if (m_hide) return;
switch(s->symbol()) switch(s->symbol())
{ {
case DocSymbol::BSlash: m_t << "$\\backslash$"; break; case DocSymbol::BSlash: m_t << "\\\\"; break;
case DocSymbol::At: m_t << "@"; break; case DocSymbol::At: m_t << "@"; break;
case DocSymbol::Less: m_t << "$<$"; break; case DocSymbol::Less: m_t << "<"; break;
case DocSymbol::Greater: m_t << "$>$"; break; case DocSymbol::Greater: m_t << ">"; break;
case DocSymbol::Amp: m_t << "\\&"; break; case DocSymbol::Amp: m_t << "&"; break;
case DocSymbol::Dollar: m_t << "\\$"; break; case DocSymbol::Dollar: m_t << "$"; break;
case DocSymbol::Hash: m_t << "\\#"; break; case DocSymbol::Hash: m_t << "#"; break;
case DocSymbol::Percent: m_t << "\\%"; break; case DocSymbol::Percent: m_t << "%"; break;
case DocSymbol::Copy: m_t << "\\copyright"; break; case DocSymbol::Copy: m_t << "(c)"; break;
case DocSymbol::Apos: m_t << "'"; break; case DocSymbol::Apos: m_t << "'"; break;
case DocSymbol::Quot: m_t << "''"; break; case DocSymbol::Quot: m_t << "''"; break;
case DocSymbol::Uml: case DocSymbol::Uml: m_t << s->letter() << "\\*(4"; break;
if (s->letter()=='i') case DocSymbol::Acute: m_t << s->letter() << "\\*(`"; break;
m_t << "\\\"{\\i}"; case DocSymbol::Grave: m_t << s->letter() << "\\*:"; break;
else case DocSymbol::Circ: m_t << s->letter() << "\\*^"; break;
m_t << "\\\"{" << s->letter() << "}"; case DocSymbol::Tilde: m_t << s->letter() << "\\*~"; break;
break; case DocSymbol::Szlig: m_t << "s\\*:"; break;
case DocSymbol::Acute: case DocSymbol::Cedil: m_t << s->letter() << "\\*,"; break;
if (s->letter()=='i') case DocSymbol::Ring: m_t << s->letter() << "\\*o"; break;
m_t << "\\'{\\i}"; case DocSymbol::Nbsp: m_t << " "; break;
else
m_t << "\\'{" << s->letter() << "}";
break;
case DocSymbol::Grave:
if (s->letter()=='i')
m_t << "\\`{\\i}";
else
m_t << "\\`{" << s->letter() << "}";
break;
case DocSymbol::Circ:
if (s->letter()=='i')
m_t << "\\^{\\i}";
else
m_t << "\\^{" << s->letter() << "}";
break;
case DocSymbol::Tilde: m_t << "\\~{" << s->letter() << "}"; break;
case DocSymbol::Szlig: m_t << "\"s"; break;
case DocSymbol::Cedil: m_t << "\\c{" << s->letter() << "}"; break;
case DocSymbol::Ring: m_t << "\\" << s->letter() << s->letter(); break;
case DocSymbol::Nbsp: m_t << "\\ "; break;
default: default:
err("Error: unknown symbol found\n"); err("Error: unknown symbol found\n");
} }
m_firstCol=FALSE;
} }
void ManDocVisitor::visit(DocURL *u) void ManDocVisitor::visit(DocURL *u)
{ {
if (m_hide) return; if (m_hide) return;
if (Config_getBool("PDF_HYPERLINKS")) m_t << u->url();
{ m_firstCol=FALSE;
m_t << "\\href{" << u->url() << "}";
}
m_t << "{\\tt " << u->url() << "}";
} }
void ManDocVisitor::visit(DocLineBreak *) void ManDocVisitor::visit(DocLineBreak *)
{ {
if (m_hide) return; if (m_hide) return;
m_t << "\\par\n"; m_t << endl << ".br" << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visit(DocHorRuler *) void ManDocVisitor::visit(DocHorRuler *)
{ {
if (m_hide) return; if (m_hide) return;
m_t << "\n\n"; if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visit(DocStyleChange *s) void ManDocVisitor::visit(DocStyleChange *s)
...@@ -140,25 +126,30 @@ void ManDocVisitor::visit(DocStyleChange *s) ...@@ -140,25 +126,30 @@ void ManDocVisitor::visit(DocStyleChange *s)
switch (s->style()) switch (s->style())
{ {
case DocStyleChange::Bold: case DocStyleChange::Bold:
if (s->enable()) m_t << "{\\bf "; else m_t << "} "; if (s->enable()) m_t << "\\fB"; else m_t << "\\fP";
m_firstCol=FALSE;
break; break;
case DocStyleChange::Italic: case DocStyleChange::Italic:
if (s->enable()) m_t << "{\\em "; else m_t << "} "; if (s->enable()) m_t << "\\fI"; else m_t << "\\fP";
m_firstCol=FALSE;
break; break;
case DocStyleChange::Code: case DocStyleChange::Code:
if (s->enable()) m_t << "{\\tt "; else m_t << "} "; if (s->enable()) m_t << "\\fC"; else m_t << "\\fP";
m_firstCol=FALSE;
break; break;
case DocStyleChange::Subscript: case DocStyleChange::Subscript:
if (s->enable()) m_t << "$_{\\mbox{"; else m_t << "}}$ "; if (s->enable()) m_t << "\\*<"; else m_t << "\\*> ";
m_firstCol=FALSE;
break; break;
case DocStyleChange::Superscript: case DocStyleChange::Superscript:
if (s->enable()) m_t << "$^{\\mbox{"; else m_t << "}}$ "; if (s->enable()) m_t << "\\*{"; else m_t << "\\*} ";
m_firstCol=FALSE;
break; break;
case DocStyleChange::Center: case DocStyleChange::Center:
if (s->enable()) m_t << "\\begin{center}"; else m_t << "\\end{center} "; /* not supported */
break; break;
case DocStyleChange::Small: case DocStyleChange::Small:
if (s->enable()) m_t << "\\footnotesize "; else m_t << "\\normalsize "; /* not supported */
break; break;
} }
} }
...@@ -169,14 +160,22 @@ void ManDocVisitor::visit(DocVerbatim *s) ...@@ -169,14 +160,22 @@ void ManDocVisitor::visit(DocVerbatim *s)
switch(s->type()) switch(s->type())
{ {
case DocVerbatim::Code: // fall though case DocVerbatim::Code: // fall though
m_t << "\n\n\\footnotesize\\begin{verbatim}"; if (!m_firstCol) m_t << endl;
parseCode(m_ci,s->context(),s->text().latin1(),FALSE,0); m_t << ".PP" << endl;
m_t << "\\end{verbatim}\\normalsize" << endl; m_t << ".nf" << endl;
parseCode(m_ci,s->context(),s->text().latin1(),s->isExample(),s->exampleFile());
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
break; break;
case DocVerbatim::Verbatim: case DocVerbatim::Verbatim:
m_t << "\n\n\\footnotesize\\begin{verbatim}"; if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_t << ".nf" << endl;
m_t << s->text(); m_t << s->text();
m_t << "\\end{verbatim}\\normalsize" << endl; if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
break; break;
case DocVerbatim::HtmlOnly: case DocVerbatim::HtmlOnly:
/* nothing */ /* nothing */
...@@ -187,15 +186,9 @@ void ManDocVisitor::visit(DocVerbatim *s) ...@@ -187,15 +186,9 @@ void ManDocVisitor::visit(DocVerbatim *s)
} }
} }
void ManDocVisitor::visit(DocAnchor *anc) void ManDocVisitor::visit(DocAnchor *)
{ {
if (m_hide) return; /* no support for anchors in man pages */
m_t << "\\label{" << anc->anchor() << "}" << endl;
if (!anc->file().isEmpty() && Config_getBool("PDF_HYPERLINKS"))
{
m_t << "\\hypertarget{" << anc->file() << "_" << anc->anchor()
<< "}{}" << endl;
}
} }
void ManDocVisitor::visit(DocInclude *inc) void ManDocVisitor::visit(DocInclude *inc)
...@@ -204,18 +197,26 @@ void ManDocVisitor::visit(DocInclude *inc) ...@@ -204,18 +197,26 @@ void ManDocVisitor::visit(DocInclude *inc)
switch(inc->type()) switch(inc->type())
{ {
case DocInclude::Include: case DocInclude::Include:
m_t << "\n\n\\footnotesize\\begin{verbatim}"; if (!m_firstCol) m_t << endl;
parseCode(m_ci,inc->context(),inc->text().latin1(),FALSE,0); m_t << ".PP" << endl;
m_t << "\\end{verbatim}\\normalsize" << endl; m_t << ".nf" << endl;
parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile());
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
break; break;
case DocInclude::DontInclude: case DocInclude::DontInclude:
break; break;
case DocInclude::HtmlInclude: case DocInclude::HtmlInclude:
break; break;
case DocInclude::VerbInclude: case DocInclude::VerbInclude:
m_t << "\n\n\\footnotesize\\begin{verbatim}"; if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_t << ".nf" << endl;
m_t << inc->text(); m_t << inc->text();
m_t << "\\end{verbatim}\\normalsize" << endl; if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
break; break;
} }
} }
...@@ -226,17 +227,21 @@ void ManDocVisitor::visit(DocIncOperator *op) ...@@ -226,17 +227,21 @@ void ManDocVisitor::visit(DocIncOperator *op)
// op->type(),op->isFirst(),op->isLast(),op->text().data()); // op->type(),op->isFirst(),op->isLast(),op->text().data());
if (op->isFirst()) if (op->isFirst())
{ {
m_t << "\n\n\\footnotesize\\begin{verbatim}"; if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_t << ".nf" << endl;
m_hide = TRUE; m_hide = TRUE;
} }
if (op->type()!=DocIncOperator::Skip) if (op->type()!=DocIncOperator::Skip)
{ {
parseCode(m_ci,op->context(),op->text().latin1(),FALSE,0); parseCode(m_ci,op->context(),op->text().latin1(),op->isExample(),op->exampleFile());
} }
if (op->isLast()) if (op->isLast())
{ {
m_hide = FALSE; m_hide = FALSE;
m_t << "\\end{verbatim}\\normalsize" << endl; if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
} }
else else
{ {
...@@ -250,47 +255,47 @@ void ManDocVisitor::visit(DocFormula *f) ...@@ -250,47 +255,47 @@ void ManDocVisitor::visit(DocFormula *f)
m_t << f->text(); m_t << f->text();
} }
void ManDocVisitor::visit(DocIndexEntry *i) void ManDocVisitor::visit(DocIndexEntry *)
{ {
m_t << "\\index{" << i->entry() << "@{";
m_t << "}}";
} }
//-------------------------------------- //--------------------------------------
// visitor functions for compound nodes // visitor functions for compound nodes
//-------------------------------------- //--------------------------------------
void ManDocVisitor::visitPre(DocAutoList *l) void ManDocVisitor::visitPre(DocAutoList *)
{ {
if (l->isEnumList()) m_indent+=2;
{
m_t << "\\begin{enumerate}" << endl;
}
else
{
m_t << "\\begin{itemize}" << endl;
}
} }
void ManDocVisitor::visitPost(DocAutoList *l) void ManDocVisitor::visitPost(DocAutoList *)
{ {
if (l->isEnumList()) m_indent-=2;
m_t << ".PP" << endl;
}
void ManDocVisitor::visitPre(DocAutoListItem *li)
{
QCString ws;
ws.fill(' ',m_indent-2);
if (!m_firstCol) m_t << endl;
m_t << ".IP \"" << ws;
if (((DocAutoList *)li->parent())->isEnumList())
{ {
m_t << "\\end{enumerate}" << endl; m_t << li->itemNumber() << ".\" " << m_indent+2;
} }
else else // bullet list
{ {
m_t << "\\end{itemize}" << endl; m_t << "\\(bu\" " << m_indent;
} }
} m_t << endl;
m_firstCol=TRUE;
void ManDocVisitor::visitPre(DocAutoListItem *)
{
m_t << "\\item ";
} }
void ManDocVisitor::visitPost(DocAutoListItem *) void ManDocVisitor::visitPost(DocAutoListItem *)
{ {
m_t << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visitPre(DocPara *) void ManDocVisitor::visitPre(DocPara *)
...@@ -303,7 +308,12 @@ void ManDocVisitor::visitPost(DocPara *p) ...@@ -303,7 +308,12 @@ void ManDocVisitor::visitPost(DocPara *p)
!(p->parent() && // and for parameter sections !(p->parent() && // and for parameter sections
p->parent()->kind()==DocNode::Kind_ParamSect p->parent()->kind()==DocNode::Kind_ParamSect
) )
) m_t << endl << endl; )
{
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
}
} }
void ManDocVisitor::visitPre(DocRoot *) void ManDocVisitor::visitPre(DocRoot *)
...@@ -316,7 +326,12 @@ void ManDocVisitor::visitPost(DocRoot *) ...@@ -316,7 +326,12 @@ void ManDocVisitor::visitPost(DocRoot *)
void ManDocVisitor::visitPre(DocSimpleSect *s) void ManDocVisitor::visitPre(DocSimpleSect *s)
{ {
m_t << "\\begin{Desc}\n\\item["; if (!m_firstCol)
{
m_t << endl;
m_t << ".PP" << endl;
}
m_t << "\\fB";
switch(s->type()) switch(s->type())
{ {
case DocSimpleSect::See: case DocSimpleSect::See:
...@@ -354,13 +369,17 @@ void ManDocVisitor::visitPre(DocSimpleSect *s) ...@@ -354,13 +369,17 @@ void ManDocVisitor::visitPre(DocSimpleSect *s)
// special case 1: user defined title // special case 1: user defined title
if (s->type()!=DocSimpleSect::User) if (s->type()!=DocSimpleSect::User)
{ {
m_t << ":]"; m_t << ":\\fP" << endl;
m_t << ".RS 4" << endl;
} }
} }
void ManDocVisitor::visitPost(DocSimpleSect *) void ManDocVisitor::visitPost(DocSimpleSect *)
{ {
m_t << "\\end{Desc}" << endl; if (!m_firstCol) m_t << endl;
m_t << ".RE" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visitPre(DocTitle *) void ManDocVisitor::visitPre(DocTitle *)
...@@ -369,117 +388,124 @@ void ManDocVisitor::visitPre(DocTitle *) ...@@ -369,117 +388,124 @@ void ManDocVisitor::visitPre(DocTitle *)
void ManDocVisitor::visitPost(DocTitle *) void ManDocVisitor::visitPost(DocTitle *)
{ {
m_t << "]"; m_t << "\\fP";
m_t << ".RS 4" << endl;
} }
void ManDocVisitor::visitPre(DocSimpleList *) void ManDocVisitor::visitPre(DocSimpleList *)
{ {
m_t << "\\begin{itemize}" << endl; m_indent+=2;
} }
void ManDocVisitor::visitPost(DocSimpleList *) void ManDocVisitor::visitPost(DocSimpleList *)
{ {
m_t << "\\end{itemize}" << endl; m_indent-=2;
m_t << ".PP" << endl;
} }
void ManDocVisitor::visitPre(DocSimpleListItem *) void ManDocVisitor::visitPre(DocSimpleListItem *)
{ {
m_t << "\\item "; QCString ws;
ws.fill(' ',m_indent-2);
if (!m_firstCol) m_t << endl;
m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visitPost(DocSimpleListItem *) void ManDocVisitor::visitPost(DocSimpleListItem *)
{ {
m_t << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visitPre(DocSection *s) void ManDocVisitor::visitPre(DocSection *s)
{ {
if (Config_getBool("PDF_HYPERLINKS")) if (!m_firstCol) m_t << endl;
{ if (s->level()==1) m_t << ".SH"; else m_t << ".SS";
m_t << "\\hypertarget{" << s->file() << "_" << s->anchor() << "}{}"; m_t << " \"";
}
if (Config_getBool("COMPACT_LATEX"))
{
switch(s->level())
{
case 1: m_t << "\\subsubsection{"; break;
case 2: m_t << "\\paragraph{"; break;
case 3: m_t << "\\subparagraph{"; break;
case 4: m_t << "\\subparagraph{"; break;
}
}
else
{
switch(s->level())
{
case 1: m_t << "\\subsection{"; break;
case 2: m_t << "\\subsubsection{"; break;
case 3: m_t << "\\paragraph{"; break;
case 4: m_t << "\\subparagraph{"; break;
}
}
filter(s->title()); filter(s->title());
m_t << "}\\label{" << s->anchor() << "}" << endl; m_t << "\"" << endl;
if (s->level()==1) m_t << ".PP" << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visitPost(DocSection *) void ManDocVisitor::visitPost(DocSection *)
{ {
} }
void ManDocVisitor::visitPre(DocHtmlList *s) void ManDocVisitor::visitPre(DocHtmlList *)
{ {
if (s->type()==DocHtmlList::Ordered) m_indent+=2;
m_t << "\\begin{enumerate}" << endl;
else
m_t << "\\begin{itemize}" << endl;
} }
void ManDocVisitor::visitPost(DocHtmlList *s) void ManDocVisitor::visitPost(DocHtmlList *)
{ {
if (s->type()==DocHtmlList::Ordered) m_indent-=2;
m_t << "\\end{enumerate}" << endl; m_t << ".PP" << endl;
else
m_t << "\\end{itemize}" << endl;
} }
void ManDocVisitor::visitPre(DocHtmlListItem *) void ManDocVisitor::visitPre(DocHtmlListItem *li)
{ {
m_t << "\\item "; QCString ws;
ws.fill(' ',m_indent-2);
if (!m_firstCol) m_t << endl;
m_t << ".IP \"" << ws;
if (((DocHtmlList *)li->parent())->type()==DocHtmlList::Ordered)
{
m_t << li->itemNumber() << ".\" " << m_indent+2;
}
else // bullet list
{
m_t << "\\(bu\" " << m_indent;
}
m_t << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visitPost(DocHtmlListItem *) void ManDocVisitor::visitPost(DocHtmlListItem *)
{ {
m_t << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visitPre(DocHtmlPre *) void ManDocVisitor::visitPre(DocHtmlPre *)
{ {
m_t << "\\small\\begin{alltt}"; if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_t << ".nf" << endl;
m_insidePre=TRUE; m_insidePre=TRUE;
} }
void ManDocVisitor::visitPost(DocHtmlPre *) void ManDocVisitor::visitPost(DocHtmlPre *)
{ {
m_insidePre=FALSE; m_insidePre=FALSE;
m_t << "\\end{alltt}\\normalsize " << endl; if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visitPre(DocHtmlDescList *) void ManDocVisitor::visitPre(DocHtmlDescList *)
{ {
m_t << "\\begin{description}" << endl;
} }
void ManDocVisitor::visitPost(DocHtmlDescList *) void ManDocVisitor::visitPost(DocHtmlDescList *)
{ {
m_t << "\\end{description}" << endl; if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visitPre(DocHtmlDescTitle *) void ManDocVisitor::visitPre(DocHtmlDescTitle *)
{ {
m_t << "\\item["; if (!m_firstCol) m_t << endl;
m_t << ".IP \"\\fB";
m_firstCol=FALSE;
} }
void ManDocVisitor::visitPost(DocHtmlDescTitle *) void ManDocVisitor::visitPost(DocHtmlDescTitle *)
{ {
m_t << "]"; m_t << "\\fP\" 1c" << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visitPre(DocHtmlDescData *) void ManDocVisitor::visitPre(DocHtmlDescData *)
...@@ -490,35 +516,20 @@ void ManDocVisitor::visitPost(DocHtmlDescData *) ...@@ -490,35 +516,20 @@ void ManDocVisitor::visitPost(DocHtmlDescData *)
{ {
} }
void ManDocVisitor::visitPre(DocHtmlTable *t) void ManDocVisitor::visitPre(DocHtmlTable *)
{ {
if (t->hasCaption())
{
m_t << "\\begin{table}[h]";
}
m_t << "\\begin{TabularC}{" << t->numCols() << "}\n\\hline\n";
} }
void ManDocVisitor::visitPost(DocHtmlTable *t) void ManDocVisitor::visitPost(DocHtmlTable *)
{ {
if (t->hasCaption())
{
m_t << "\\end{table}\n";
}
else
{
m_t << "\\\\\\hline\n\\end{TabularC}\n";
}
} }
void ManDocVisitor::visitPre(DocHtmlCaption *) void ManDocVisitor::visitPre(DocHtmlCaption *)
{ {
m_t << "\\\\\\hline\n\\end{TabularC}\n\\centering\n\\caption{";
} }
void ManDocVisitor::visitPost(DocHtmlCaption *) void ManDocVisitor::visitPost(DocHtmlCaption *)
{ {
m_t << "}\n";
} }
void ManDocVisitor::visitPre(DocHtmlRow *) void ManDocVisitor::visitPre(DocHtmlRow *)
...@@ -527,221 +538,117 @@ void ManDocVisitor::visitPre(DocHtmlRow *) ...@@ -527,221 +538,117 @@ void ManDocVisitor::visitPre(DocHtmlRow *)
void ManDocVisitor::visitPost(DocHtmlRow *) void ManDocVisitor::visitPost(DocHtmlRow *)
{ {
m_t << "\\\\\\hline\n";
} }
void ManDocVisitor::visitPre(DocHtmlCell *) void ManDocVisitor::visitPre(DocHtmlCell *)
{ {
} }
void ManDocVisitor::visitPost(DocHtmlCell *c) void ManDocVisitor::visitPost(DocHtmlCell *)
{ {
if (!c->isLast()) m_t << "&";
} }
void ManDocVisitor::visitPre(DocInternal *) void ManDocVisitor::visitPre(DocInternal *)
{ {
m_t << "\\begin{Desc}" << endl if (!m_firstCol) m_t << endl;
<< "\\item[" << theTranslator->trForInternalUseOnly() << "]" << endl; m_t << ".PP" << endl;
m_t << "\\fB" << theTranslator->trForInternalUseOnly() << "\\fP" << endl;
m_t << ".RS 4" << endl;
} }
void ManDocVisitor::visitPost(DocInternal *) void ManDocVisitor::visitPost(DocInternal *)
{ {
m_t << "\\end{Desc}" << endl; if (!m_firstCol) m_t << endl;
m_t << ".RE" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visitPre(DocHRef *href) void ManDocVisitor::visitPre(DocHRef *)
{ {
if (Config_getBool("PDF_HYPERLINKS")) m_t << "\\fC";
{
m_t << "\\href{";
m_t << href->url();
m_t << "}";
}
m_t << "{\\tt ";
} }
void ManDocVisitor::visitPost(DocHRef *) void ManDocVisitor::visitPost(DocHRef *)
{ {
m_t << "}"; m_t << "\\fP";
} }
void ManDocVisitor::visitPre(DocHtmlHeader *header) void ManDocVisitor::visitPre(DocHtmlHeader *header)
{ {
if (Config_getBool("COMPACT_LATEX")) if (!m_firstCol) m_t << endl;
{ if (header->level()==1) m_t << ".SH"; else m_t << ".SS";
switch(header->level()) m_t << " \"";
{
case 1: m_t << "\\subsection*{"; break;
case 2: m_t << "\\subsubsection*{"; break;
case 3: m_t << "\\paragraph*{"; break;
}
}
else
{
switch(header->level())
{
case 1: m_t << "\\section*{"; break;
case 2: m_t << "\\subsection*{"; break;
case 3: m_t << "\\subsubsection*{"; break;
}
}
} }
void ManDocVisitor::visitPost(DocHtmlHeader *) void ManDocVisitor::visitPost(DocHtmlHeader *header)
{ {
m_t << "}"; m_t << "\"" << endl;
if (header->level()==1) m_t << ".PP" << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visitPre(DocImage *img) void ManDocVisitor::visitPre(DocImage *)
{ {
if (img->type()==DocImage::Latex)
{
if (img->hasCaption())
{
m_t << "\\begin{figure}[H]" << endl;
m_t << "\\begin{center}" << endl;
}
else
{
m_t << "\\mbox{";
}
QString gfxName = img->name();
if (gfxName.right(4)==".eps" || gfxName.right(4)==".pdf")
{
gfxName=gfxName.left(gfxName.length()-4);
}
m_t << "\\includegraphics";
if (!img->width().isEmpty())
{
m_t << "[width=" << img->width() << "]";
}
else if (!img->height().isEmpty())
{
m_t << "[height=" << img->height() << "]";
}
m_t << "{" << gfxName << "}";
if (img->hasCaption())
{
m_t << "\\caption{";
}
}
else // other format -> skip
{
m_hide=TRUE;
}
} }
void ManDocVisitor::visitPost(DocImage *img) void ManDocVisitor::visitPost(DocImage *)
{ {
if (img->type()==DocImage::Latex)
{
m_t << "}" << endl; // end mbox or caption
if (img->hasCaption())
{
m_t << "\\end{center}" << endl;
m_t << "\\end{figure}" << endl;
}
}
else // other format
{
m_hide=FALSE;
}
} }
void ManDocVisitor::visitPre(DocDotFile *df) void ManDocVisitor::visitPre(DocDotFile *)
{ {
QString baseName=df->file();
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
if (baseName.right(4)==".eps" || baseName.right(4)==".pdf")
{
baseName=baseName.left(baseName.length()-4);
}
QString outDir = Config_getString("LATEX_OUTPUT");
writeDotGraphFromFile(df->file(),outDir,baseName,EPS);
if (df->hasCaption())
{
m_t << "\\begin{figure}[H]" << endl;
m_t << "\\begin{center}" << endl;
}
else
{
m_t << "\\mbox{";
}
m_t << "\\includegraphics";
if (!df->width().isEmpty())
{
m_t << "[width=" << df->width() << "]";
}
else if (!df->height().isEmpty())
{
m_t << "[height=" << df->height() << "]";
}
m_t << "{" << baseName << "}";
if (df->hasCaption())
{
m_t << "\\caption{";
}
} }
void ManDocVisitor::visitPost(DocDotFile *df) void ManDocVisitor::visitPost(DocDotFile *)
{ {
m_t << "}" << endl; // end mbox or caption
if (df->hasCaption())
{
m_t << "\\end{center}" << endl;
m_t << "\\end{figure}" << endl;
}
} }
void ManDocVisitor::visitPre(DocLink *) void ManDocVisitor::visitPre(DocLink *)
{ {
m_t << "\\fB "; m_t << "\\fB";
} }
void ManDocVisitor::visitPost(DocLink *) void ManDocVisitor::visitPost(DocLink *)
{ {
m_t << "\\fP "; m_t << "\\fP";
} }
void ManDocVisitor::visitPre(DocRef *ref) void ManDocVisitor::visitPre(DocRef *ref)
{ {
m_t << "\\fB "; m_t << "\\fB";
if (!ref->hasLinkText()) filter(ref->targetTitle()); if (!ref->hasLinkText()) filter(ref->targetTitle());
} }
void ManDocVisitor::visitPost(DocRef *) void ManDocVisitor::visitPost(DocRef *)
{ {
m_t << "\\fP "; m_t << "\\fP";
} }
void ManDocVisitor::visitPre(DocSecRefItem *) void ManDocVisitor::visitPre(DocSecRefItem *)
{ {
m_t << "\\item \\contentsline{section}{"; QCString ws;
ws.fill(' ',m_indent-2);
if (!m_firstCol) m_t << endl;
m_t << ".IP \"" << ws << "\\(bu\" " << m_indent << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visitPost(DocSecRefItem *ref) void ManDocVisitor::visitPost(DocSecRefItem *)
{ {
m_t << "}{\\ref{" << ref->anchor() << "}}{}" << endl; m_t << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visitPre(DocSecRefList *) void ManDocVisitor::visitPre(DocSecRefList *)
{ {
m_t << "\\footnotesize" << endl; m_indent+=2;
m_t << "\\begin{multicols}{2}" << endl;
m_t << "\\begin{CompactList}" << endl;
} }
void ManDocVisitor::visitPost(DocSecRefList *) void ManDocVisitor::visitPost(DocSecRefList *)
{ {
m_t << "\\end{CompactList}" << endl; m_indent-=2;
m_t << "\\end{multicols}" << endl; m_t << ".PP" << endl;
m_t << "\\normalsize" << endl;
} }
void ManDocVisitor::visitPre(DocLanguage *) void ManDocVisitor::visitPre(DocLanguage *)
...@@ -754,8 +661,12 @@ void ManDocVisitor::visitPost(DocLanguage *) ...@@ -754,8 +661,12 @@ void ManDocVisitor::visitPost(DocLanguage *)
void ManDocVisitor::visitPre(DocParamSect *s) void ManDocVisitor::visitPre(DocParamSect *s)
{ {
m_t << "\\begin{Desc}" << endl; if (!m_firstCol)
m_t << "\\item["; {
m_t << endl;
m_t << ".PP" << endl;
}
m_t << "\\fB";
switch(s->type()) switch(s->type())
{ {
case DocParamSect::Param: case DocParamSect::Param:
...@@ -767,19 +678,21 @@ void ManDocVisitor::visitPre(DocParamSect *s) ...@@ -767,19 +678,21 @@ void ManDocVisitor::visitPre(DocParamSect *s)
default: default:
ASSERT(0); ASSERT(0);
} }
m_t << ":]" << endl; m_t << ":\\fP" << endl;
m_t << "\\begin{description}" << endl; m_t << ".RS 4" << endl;
} }
void ManDocVisitor::visitPost(DocParamSect *) void ManDocVisitor::visitPost(DocParamSect *)
{ {
m_t << "\\end{description}" << endl; if (!m_firstCol) m_t << endl;
m_t << "\\end{Desc}" << endl; m_t << ".RE" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visitPre(DocParamList *pl) void ManDocVisitor::visitPre(DocParamList *pl)
{ {
m_t << "\\item[{\\em "; m_t << "\\fI";
QStrListIterator li(pl->parameters()); QStrListIterator li(pl->parameters());
const char *s; const char *s;
bool first=TRUE; bool first=TRUE;
...@@ -788,42 +701,47 @@ void ManDocVisitor::visitPre(DocParamList *pl) ...@@ -788,42 +701,47 @@ void ManDocVisitor::visitPre(DocParamList *pl)
if (!first) m_t << ","; else first=FALSE; if (!first) m_t << ","; else first=FALSE;
m_t << s; m_t << s;
} }
m_t << "}]"; m_t << "\\fP ";
} }
void ManDocVisitor::visitPost(DocParamList *) void ManDocVisitor::visitPost(DocParamList *pl)
{ {
if (!pl->isLast())
{
if (!m_firstCol) m_t << endl;
m_t << ".br" << endl;
}
} }
void ManDocVisitor::visitPre(DocXRefItem *x) void ManDocVisitor::visitPre(DocXRefItem *x)
{ {
m_t << "\\begin{Desc}" << endl; if (!m_firstCol)
m_t << "\\item[";
if (Config_getBool("PDF_HYPERLINKS"))
{ {
m_t << "\\hyperlink{" << x->file() << "_" << x->anchor() << "}{"; m_t << endl;
} m_t << ".PP" << endl;
else
{
m_t << "{\\bf ";
} }
m_t << "\\fB";
filter(x->title()); filter(x->title());
m_t << "}]"; m_t << "\\fP" << endl;
m_t << ".RS 4" << endl;
} }
void ManDocVisitor::visitPost(DocXRefItem *) void ManDocVisitor::visitPost(DocXRefItem *)
{ {
m_t << "\\end{Desc}" << endl; if (!m_firstCol) m_t << endl;
m_t << ".RE" << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
} }
void ManDocVisitor::visitPre(DocInternalRef *) void ManDocVisitor::visitPre(DocInternalRef *)
{ {
m_t << "\\fB "; m_t << "\\fB";
} }
void ManDocVisitor::visitPost(DocInternalRef *) void ManDocVisitor::visitPost(DocInternalRef *)
{ {
m_t << "\\fP "; m_t << "\\fP";
} }
void ManDocVisitor::visitPre(DocCopy *) void ManDocVisitor::visitPre(DocCopy *)
...@@ -834,6 +752,14 @@ void ManDocVisitor::visitPost(DocCopy *) ...@@ -834,6 +752,14 @@ void ManDocVisitor::visitPost(DocCopy *)
{ {
} }
void ManDocVisitor::visitPre(DocText *)
{
}
void ManDocVisitor::visitPost(DocText *)
{
}
void ManDocVisitor::filter(const char *str) void ManDocVisitor::filter(const char *str)
{ {
if (str) if (str)
......
...@@ -122,6 +122,8 @@ class ManDocVisitor : public DocVisitor ...@@ -122,6 +122,8 @@ class ManDocVisitor : public DocVisitor
void visitPost(DocInternalRef *); void visitPost(DocInternalRef *);
void visitPre(DocCopy *); void visitPre(DocCopy *);
void visitPost(DocCopy *); void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
private: private:
...@@ -139,6 +141,8 @@ class ManDocVisitor : public DocVisitor ...@@ -139,6 +141,8 @@ class ManDocVisitor : public DocVisitor
BaseCodeDocInterface &m_ci; BaseCodeDocInterface &m_ci;
bool m_insidePre; bool m_insidePre;
bool m_hide; bool m_hide;
bool m_firstCol;
int m_indent;
}; };
#endif #endif
...@@ -619,5 +619,6 @@ void ManGenerator::printDoc(DocNode *n) ...@@ -619,5 +619,6 @@ void ManGenerator::printDoc(DocNode *n)
ManDocVisitor *visitor = new ManDocVisitor(t,*this); ManDocVisitor *visitor = new ManDocVisitor(t,*this);
n->accept(visitor); n->accept(visitor);
delete visitor; delete visitor;
t << endl;
} }
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "outputlist.h" #include "outputlist.h"
#include "example.h" #include "example.h"
#include "membergroup.h" #include "membergroup.h"
#include "doc.h"
#include "groupdef.h" #include "groupdef.h"
#include "defargs.h" #include "defargs.h"
//#include "xml.h" //#include "xml.h"
...@@ -904,7 +903,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -904,7 +903,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
!annMemb) !annMemb)
{ {
ol.startMemberDescription(); ol.startMemberDescription();
parseDoc(ol,briefFile(),briefLine(),cname,this,briefDescription()); ol.parseDoc(briefFile(),briefLine(),cname,this,briefDescription(),FALSE);
if (detailsVisible) if (detailsVisible)
{ {
ol.pushGeneratorState(); ol.pushGeneratorState();
...@@ -1225,9 +1224,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1225,9 +1224,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
//printf("md=%s initLines=%d init=`%s'\n",name().data(),initLines,init.data()); //printf("md=%s initLines=%d init=`%s'\n",name().data(),initLines,init.data());
ol.startBold(); ol.startBold();
if (mtype==Define) if (mtype==Define)
parseText(ol,theTranslator->trDefineValue()); ol.parseText(theTranslator->trDefineValue());
else else
parseText(ol,theTranslator->trInitialValue()); ol.parseText(theTranslator->trInitialValue());
ol.endBold(); ol.endBold();
initParseCodeContext(); initParseCodeContext();
ol.startCodeFragment(); ol.startCodeFragment();
...@@ -1249,14 +1248,14 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1249,14 +1248,14 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
) )
) )
{ {
parseDoc(ol,briefFile(),briefLine(),scopeName,this,brief); ol.parseDoc(briefFile(),briefLine(),scopeName,this,brief,FALSE);
ol.newParagraph(); ol.newParagraph();
} }
/* write detailed description */ /* write detailed description */
if (!detailed.isEmpty()) if (!detailed.isEmpty())
{ {
parseDoc(ol,docFile(),docLine(),scopeName,this,detailed+"\n"); ol.parseDoc(docFile(),docLine(),scopeName,this,detailed+"\n",FALSE);
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::RTF); ol.disableAllBut(OutputGenerator::RTF);
ol.newParagraph(); ol.newParagraph();
...@@ -1282,7 +1281,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1282,7 +1281,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.docify(a->name); ol.docify(a->name);
ol.endDescTableTitle(); ol.endDescTableTitle();
ol.startDescTableData(); ol.startDescTableData();
parseDoc(ol,docFile(),docLine(),scopeName,this,a->docs+"\n"); ol.parseDoc(docFile(),docLine(),scopeName,this,a->docs+"\n",FALSE);
ol.endDescTableData(); ol.endDescTableData();
} }
} }
...@@ -1333,7 +1332,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1333,7 +1332,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (!fmd->briefDescription().isEmpty()) if (!fmd->briefDescription().isEmpty())
{ {
parseDoc(ol,fmd->briefFile(),fmd->briefLine(),scopeName,fmd,fmd->briefDescription()); ol.parseDoc(fmd->briefFile(),fmd->briefLine(),scopeName,fmd,fmd->briefDescription(),FALSE);
//ol.newParagraph(); //ol.newParagraph();
} }
if (!fmd->briefDescription().isEmpty() && if (!fmd->briefDescription().isEmpty() &&
...@@ -1343,7 +1342,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1343,7 +1342,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
} }
if (!fmd->documentation().isEmpty()) if (!fmd->documentation().isEmpty())
{ {
parseDoc(ol,fmd->docFile(),fmd->docLine(),scopeName,fmd,fmd->documentation()+"\n"); ol.parseDoc(fmd->docFile(),fmd->docLine(),scopeName,fmd,fmd->documentation()+"\n",FALSE);
} }
ol.endDescTableData(); ol.endDescTableData();
} }
...@@ -1380,7 +1379,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1380,7 +1379,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
int markerPos = reimplFromLine.find("@0"); int markerPos = reimplFromLine.find("@0");
if (markerPos!=-1) // should always pass this. if (markerPos!=-1) // should always pass this.
{ {
parseText(ol,reimplFromLine.left(markerPos)); //text left from marker ol.parseText(reimplFromLine.left(markerPos)); //text left from marker
if (bmd->isLinkable()) // replace marker with link if (bmd->isLinkable()) // replace marker with link
{ {
Definition *bd=bmd->group; Definition *bd=bmd->group;
...@@ -1404,7 +1403,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1404,7 +1403,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
writePageRef(ol,bcd->getOutputFileBase(),0); writePageRef(ol,bcd->getOutputFileBase(),0);
} }
} }
parseText(ol,reimplFromLine.right( ol.parseText(reimplFromLine.right(
reimplFromLine.length()-markerPos-2)); // text right from marker reimplFromLine.length()-markerPos-2)); // text right from marker
ol.disableAllBut(OutputGenerator::RTF); ol.disableAllBut(OutputGenerator::RTF);
...@@ -1456,7 +1455,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1456,7 +1455,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// now replace all markers in reimplInLine with links to the classes // now replace all markers in reimplInLine with links to the classes
while ((newIndex=marker.match(reimplInLine,index,&matchLen))!=-1) while ((newIndex=marker.match(reimplInLine,index,&matchLen))!=-1)
{ {
parseText(ol,reimplInLine.mid(index,newIndex-index)); ol.parseText(reimplInLine.mid(index,newIndex-index));
bool ok; bool ok;
uint entryIndex = reimplInLine.mid(newIndex+1,matchLen-1).toUInt(&ok); uint entryIndex = reimplInLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
//bmd=bml->at(entryIndex); //bmd=bml->at(entryIndex);
...@@ -1490,7 +1489,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1490,7 +1489,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
++mli; ++mli;
index=newIndex+matchLen; index=newIndex+matchLen;
} }
parseText(ol,reimplInLine.right(reimplInLine.length()-index)); ol.parseText(reimplInLine.right(reimplInLine.length()-index));
ol.disableAllBut(OutputGenerator::RTF); ol.disableAllBut(OutputGenerator::RTF);
ol.newParagraph(); ol.newParagraph();
ol.enableAll(); ol.enableAll();
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include "language.h" #include "language.h"
#include "doxygen.h" #include "doxygen.h"
#include "outputlist.h" #include "outputlist.h"
#include "doc.h"
#include "groupdef.h" #include "groupdef.h"
MemberList::MemberList() : QList<MemberDef>() MemberList::MemberList() : QList<MemberDef>()
...@@ -285,7 +284,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -285,7 +284,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
if (fmd->hasOneLineInitializer()) // enum value has initializer if (fmd->hasOneLineInitializer()) // enum value has initializer
{ {
typeDecl.writeString(" = "); typeDecl.writeString(" = ");
parseText(typeDecl,fmd->initializer()); typeDecl.parseText(fmd->initializer());
} }
} }
...@@ -341,10 +340,11 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -341,10 +340,11 @@ void MemberList::writePlainDeclarations(OutputList &ol,
if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{ {
ol.startMemberDescription(); ol.startMemberDescription();
parseDoc(ol, ol.parseDoc(
md->briefFile(),md->briefLine(), md->briefFile(),md->briefLine(),
cd?cd->name().data():0,md, cd?cd->name().data():0,md,
md->briefDescription() md->briefDescription(),
FALSE
); );
if (md->isDetailedSectionLinkable()) if (md->isDetailedSectionLinkable())
{ {
...@@ -360,7 +360,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -360,7 +360,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
{ {
ol.startTextLink(0,md->anchor()); ol.startTextLink(0,md->anchor());
} }
parseText(ol,theTranslator->trMore()); ol.parseText(theTranslator->trMore());
ol.endTextLink(); ol.endTextLink();
ol.startEmphasis(); ol.startEmphasis();
ol.enableAll(); ol.enableAll();
...@@ -418,14 +418,14 @@ void MemberList::writeDeclarations(OutputList &ol, ...@@ -418,14 +418,14 @@ void MemberList::writeDeclarations(OutputList &ol,
if (title) if (title)
{ {
ol.startMemberHeader(); ol.startMemberHeader();
parseText(ol,title); ol.parseText(title);
ol.endMemberHeader(); ol.endMemberHeader();
} }
if (subtitle && subtitle[0]!=0) if (subtitle && subtitle[0]!=0)
{ {
//printf("subtitle=`%s'\n",subtitle); //printf("subtitle=`%s'\n",subtitle);
ol.startMemberSubtitle(); ol.startMemberSubtitle();
parseDoc(ol,"<generated>",1,0,0,subtitle); ol.parseDoc("<generated>",1,0,0,subtitle,FALSE);
ol.endMemberSubtitle(); ol.endMemberSubtitle();
} }
...@@ -442,14 +442,14 @@ void MemberList::writeDeclarations(OutputList &ol, ...@@ -442,14 +442,14 @@ void MemberList::writeDeclarations(OutputList &ol,
ol.startMemberGroupHeader(hasHeader); ol.startMemberGroupHeader(hasHeader);
if (hasHeader) if (hasHeader)
{ {
parseText(ol,mg->header()); ol.parseText(mg->header());
} }
ol.endMemberGroupHeader(); ol.endMemberGroupHeader();
if (!mg->documentation().isEmpty()) if (!mg->documentation().isEmpty())
{ {
//printf("Member group has docs!\n"); //printf("Member group has docs!\n");
ol.startMemberGroupDocs(); ol.startMemberGroupDocs();
parseDoc(ol,"<generated>",1,0,0,mg->documentation()+"\n"); ol.parseDoc("<generated>",1,0,0,mg->documentation()+"\n",FALSE);
ol.endMemberGroupDocs(); ol.endMemberGroupDocs();
} }
ol.startMemberGroup(); ol.startMemberGroup();
...@@ -476,7 +476,7 @@ void MemberList::writeDocumentation(OutputList &ol, ...@@ -476,7 +476,7 @@ void MemberList::writeDocumentation(OutputList &ol,
{ {
ol.writeRuler(); ol.writeRuler();
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,title); ol.parseText(title);
ol.endGroupHeader(); ol.endGroupHeader();
} }
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "namespacedef.h" #include "namespacedef.h"
#include "outputlist.h" #include "outputlist.h"
#include "util.h" #include "util.h"
#include "doc.h"
#include "language.h" #include "language.h"
#include "classdef.h" #include "classdef.h"
#include "classlist.h" #include "classlist.h"
...@@ -198,12 +197,12 @@ void NamespaceDef::writeDetailedDocumentation(OutputList &ol) ...@@ -198,12 +197,12 @@ void NamespaceDef::writeDetailedDocumentation(OutputList &ol)
//if (latexOn) ol.enable(OutputGenerator::Latex); //if (latexOn) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState(); ol.popGeneratorState();
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription()); ol.parseText(theTranslator->trDetailedDescription());
ol.endGroupHeader(); ol.endGroupHeader();
ol.startTextBlock(); ol.startTextBlock();
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{ {
parseDoc(ol,briefFile(),briefLine(),name(),0,briefDescription()); ol.parseDoc(briefFile(),briefLine(),name(),0,briefDescription(),FALSE);
} }
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") && if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
!documentation().isEmpty()) !documentation().isEmpty())
...@@ -212,7 +211,7 @@ void NamespaceDef::writeDetailedDocumentation(OutputList &ol) ...@@ -212,7 +211,7 @@ void NamespaceDef::writeDetailedDocumentation(OutputList &ol)
} }
if (!documentation().isEmpty()) if (!documentation().isEmpty())
{ {
parseDoc(ol,docFile(),docLine(),name(),0,documentation()+"\n"); ol.parseDoc(docFile(),docLine(),name(),0,documentation()+"\n",FALSE);
ol.newParagraph(); ol.newParagraph();
} }
ol.endTextBlock(); ol.endTextBlock();
...@@ -227,11 +226,11 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -227,11 +226,11 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
//ol.docify(pageTitle); //ol.docify(pageTitle);
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA")) if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{ {
parseText(ol,theTranslator->trPackage(displayName())); ol.parseText(theTranslator->trPackage(displayName()));
} }
else else
{ {
parseText(ol,theTranslator->trNamespaceReference(displayName())); ol.parseText(theTranslator->trNamespaceReference(displayName()));
} }
addGroupListToTitle(ol,this); addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),displayName()); endTitle(ol,getOutputFileBase(),displayName());
...@@ -252,12 +251,12 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -252,12 +251,12 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
} }
else if (!briefDescription().isEmpty()) else if (!briefDescription().isEmpty())
{ {
parseDoc(ol,briefFile(),briefLine(),name(),0,briefDescription()); ol.parseDoc(briefFile(),briefLine(),name(),0,briefDescription(),FALSE);
ol.writeString(" \n"); ol.writeString(" \n");
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(0,"_details"); ol.startTextLink(0,"_details");
parseText(ol,theTranslator->trMore()); ol.parseText(theTranslator->trMore());
ol.endTextLink(); ol.endTextLink();
ol.popGeneratorState(); ol.popGeneratorState();
} }
...@@ -315,9 +314,9 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -315,9 +314,9 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Man); ol.disableAllBut(OutputGenerator::Man);
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trAuthor(TRUE,TRUE)); ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader(); ol.endGroupHeader();
parseText(ol,theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME"))); ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
if (!Config_getString("GENERATE_TAGFILE").isEmpty()) if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{ {
......
...@@ -86,8 +86,8 @@ class BaseOutputDocInterface : public BaseCodeDocInterface ...@@ -86,8 +86,8 @@ class BaseOutputDocInterface : public BaseCodeDocInterface
}; };
virtual void parseDoc(const char *,int, const char *,MemberDef *, virtual void parseDoc(const char *,int, const char *,MemberDef *,
const QCString &) const QCString &,bool) {}
{} virtual void parseText(const QCString &) {}
/*! Start of a bullet list: e.g. \c <ul> in html. writeListItem() is /*! Start of a bullet list: e.g. \c <ul> in html. writeListItem() is
* Used for the bullet items. * Used for the bullet items.
...@@ -297,7 +297,7 @@ class BaseOutputDocInterface : public BaseCodeDocInterface ...@@ -297,7 +297,7 @@ class BaseOutputDocInterface : public BaseCodeDocInterface
class OutputGenerator : public BaseOutputDocInterface class OutputGenerator : public BaseOutputDocInterface
{ {
public: public:
enum OutputType { Html, Latex, Man, RTF, XML, DEF }; enum OutputType { Html, Latex, Man, RTF, XML, DEF, Perl };
OutputGenerator(); OutputGenerator();
virtual ~OutputGenerator(); virtual ~OutputGenerator();
......
...@@ -193,7 +193,7 @@ void OutputList::popGeneratorState() ...@@ -193,7 +193,7 @@ void OutputList::popGeneratorState()
void OutputList::parseDoc(const char *fileName,int startLine, void OutputList::parseDoc(const char *fileName,int startLine,
const char * clName,MemberDef * md, const char * clName,MemberDef * md,
const QCString &docStr) const QCString &docStr,bool isExample)
{ {
int count=0; int count=0;
OutputGenerator *og=outputs->first(); OutputGenerator *og=outputs->first();
...@@ -204,7 +204,31 @@ void OutputList::parseDoc(const char *fileName,int startLine, ...@@ -204,7 +204,31 @@ void OutputList::parseDoc(const char *fileName,int startLine,
} }
if (count==0) return; // no output formats enabled. if (count==0) return; // no output formats enabled.
DocNode *root = validatingParseDoc(fileName,startLine,clName,md,docStr); DocNode *root = validatingParseDoc(fileName,startLine,
clName,md,docStr,isExample);
og=outputs->first();
while (og)
{
if (og->isEnabled()) og->printDoc(root);
og=outputs->next();
}
delete root;
}
void OutputList::parseText(const QCString &textStr)
{
int count=0;
OutputGenerator *og=outputs->first();
while (og)
{
if (og->isEnabled()) count++;
og=outputs->next();
}
if (count==0) return; // no output formats enabled.
DocNode *root = validatingParseText(textStr);
og=outputs->first(); og=outputs->first();
while (og) while (og)
......
...@@ -64,7 +64,9 @@ class OutputList : public OutputDocInterface ...@@ -64,7 +64,9 @@ class OutputList : public OutputDocInterface
////////////////////////////////////////////////// //////////////////////////////////////////////////
void parseDoc(const char *fileName,int startLine, void parseDoc(const char *fileName,int startLine,
const char *clName,MemberDef *md,const QCString &docStr); const char *clName,MemberDef *md,const QCString &docStr,
bool isExample);
void parseText(const QCString &textStr);
OutputDocInterface *clone() OutputDocInterface *clone()
{ {
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "outputlist.h" #include "outputlist.h"
#include "util.h" #include "util.h"
#include "config.h" #include "config.h"
#include "doc.h"
#include "language.h" #include "language.h"
#include "doxygen.h" #include "doxygen.h"
...@@ -58,17 +57,15 @@ void PackageDef::writeDocumentation(OutputList &ol) ...@@ -58,17 +57,15 @@ void PackageDef::writeDocumentation(OutputList &ol)
ol.docify(title); ol.docify(title);
endTitle(ol,getOutputFileBase(),title); endTitle(ol,getOutputFileBase(),title);
OutputList briefOutput(&ol);
if (!briefDescription().isEmpty()) if (!briefDescription().isEmpty())
{ {
parseDoc(briefOutput,briefFile(),briefLine(),name(),0,briefDescription()); ol.parseDoc(briefFile(),briefLine(),name(),0,briefDescription(),FALSE);
ol+=briefOutput;
ol.writeString(" \n"); ol.writeString(" \n");
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::RTF);
ol.startTextLink(0,"_details"); ol.startTextLink(0,"_details");
parseText(ol,theTranslator->trMore()); ol.parseText(theTranslator->trMore());
ol.endTextLink(); ol.endTextLink();
ol.popGeneratorState(); ol.popGeneratorState();
} }
...@@ -101,20 +98,20 @@ void PackageDef::writeDocumentation(OutputList &ol) ...@@ -101,20 +98,20 @@ void PackageDef::writeDocumentation(OutputList &ol)
ol.writeAnchor(0,"_details"); ol.writeAnchor(0,"_details");
ol.popGeneratorState(); ol.popGeneratorState();
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription()); ol.parseText(theTranslator->trDetailedDescription());
ol.endGroupHeader(); ol.endGroupHeader();
// repeat brief description // repeat brief description
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{ {
ol+=briefOutput; ol.parseDoc(briefFile(),briefLine(),name(),0,briefDescription(),FALSE);
ol.newParagraph(); ol.newParagraph();
} }
// write documentation // write documentation
if (!documentation().isEmpty()) if (!documentation().isEmpty())
{ {
parseDoc(ol,docFile(),docLine(),name(),0,documentation()+"\n"); ol.parseDoc(docFile(),docLine(),name(),0,documentation()+"\n",FALSE);
} }
} }
......
...@@ -84,11 +84,14 @@ class PageInfo ...@@ -84,11 +84,14 @@ class PageInfo
QDictIterator<SectionInfo> sdi(*sectionDict); QDictIterator<SectionInfo> sdi(*sectionDict);
SectionInfo *si; SectionInfo *si;
for (;(si=sdi.current());++sdi) for (;(si=sdi.current());++sdi)
{
if (!si->generated)
{ {
Doxygen::tagFile << " <docanchor>" << si->label << "</docanchor>" << endl; Doxygen::tagFile << " <docanchor>" << si->label << "</docanchor>" << endl;
} }
} }
} }
}
void makePartOfGroup(GroupDef *gd) { m_inGroup = gd; } void makePartOfGroup(GroupDef *gd) { m_inGroup = gd; }
......
/******************************************************************************
*
*
*
*
* Copyright (C) 1997-2002 by Dimitri van Heesch.
* Authors: Dimitri van Heesch, Miguel Lobo.
*
* 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.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#include <stdlib.h>
#include "perlmodgen.h"
#include "docparser.h"
#include "message.h"
#include "doxygen.h"
#include "page.h"
#include <qdir.h>
#include <qstack.h>
#include <qdict.h>
#include <qfile.h>
#include <qtextstream.h>
#define PERLOUTPUT_MAX_INDENTATION 40
class PerlModOutputStream
{
public:
QString m_s;
QTextStream *m_t;
PerlModOutputStream(QTextStream *t = 0) : m_t(t) { }
void add(char c);
void add(const char *s);
void add(QCString &s);
void add(QString &s);
void add(int n);
void add(unsigned int n);
};
void PerlModOutputStream::add(char c)
{
if (m_t != 0)
(*m_t) << c;
else
m_s += c;
}
void PerlModOutputStream::add(const char *s)
{
if (m_t != 0)
(*m_t) << s;
else
m_s += s;
}
void PerlModOutputStream::add(QCString &s)
{
if (m_t != 0)
(*m_t) << s;
else
m_s += s;
}
void PerlModOutputStream::add(QString &s)
{
if (m_t != 0)
(*m_t) << s;
else
m_s += s;
}
void PerlModOutputStream::add(int n)
{
if (m_t != 0)
(*m_t) << n;
else
m_s += n;
}
void PerlModOutputStream::add(unsigned int n)
{
if (m_t != 0)
(*m_t) << n;
else
m_s += n;
}
class PerlModOutput
{
public:
PerlModOutput(PerlModOutputStream *os) : m_stream(os), m_indentation(0) { m_spaces[0] = 0; }
virtual ~PerlModOutput() { }
inline PerlModOutput &openSave() { iopenSave(); return *this; }
inline PerlModOutput &closeSave(QString &s) { icloseSave(s); return *this; }
inline PerlModOutput &add(char c) { m_stream->add(c); return *this; }
inline PerlModOutput &add(const char *s) { m_stream->add(s); return *this; }
inline PerlModOutput &add(QCString &s) { m_stream->add(s); return *this; }
inline PerlModOutput &add(QString &s) { m_stream->add(s); return *this; }
inline PerlModOutput &add(int n) { m_stream->add(n); return *this; }
inline PerlModOutput &add(unsigned int n) { m_stream->add(n); return *this; }
PerlModOutput &addQuoted(const char *s) { iaddQuoted(s); return *this; }
inline PerlModOutput &indent() { m_stream->add(m_spaces); return *this; }
inline PerlModOutput &open(char c, const char *s = 0) { iopen(c, s); return *this; }
inline PerlModOutput &close(char c = 0) { iclose(c); return *this; }
inline PerlModOutput &addField(const char *s) { iaddField(s); return *this; }
inline PerlModOutput &addFieldQuoted(const char *field, const char *content)
{
iaddFieldQuoted(field, content); return *this;
}
inline PerlModOutput &openList(const char *s = 0) { open('[', s); return *this; }
inline PerlModOutput &closeList() { close(']'); return *this; }
inline PerlModOutput &openHash(const char *s = 0 ) { open('{', s); return *this; }
inline PerlModOutput &closeHash() { close('}'); return *this; }
protected:
void iopenSave();
void icloseSave(QString &);
void incIndent();
void decIndent();
void iaddQuoted(const char *);
void iaddFieldQuoted(const char *, const char *);
void iaddField(const char *);
void iopen(char, const char *);
void iclose(char);
private:
PerlModOutputStream *m_stream;
int m_indentation;
QStack<PerlModOutputStream> m_saved;
char m_spaces[PERLOUTPUT_MAX_INDENTATION * 2 + 2];
};
void PerlModOutput::iopenSave()
{
m_saved.push(m_stream);
m_stream = new PerlModOutputStream();
}
void PerlModOutput::icloseSave(QString &s)
{
s = m_stream->m_s;
delete m_stream;
m_stream = m_saved.pop();
}
void PerlModOutput::incIndent()
{
if (m_indentation < PERLOUTPUT_MAX_INDENTATION)
{
char *s = &m_spaces[m_indentation * 2];
*s++ = ' '; *s++ = ' '; *s = 0;
}
m_indentation++;
}
void PerlModOutput::decIndent()
{
m_indentation--;
if (m_indentation < PERLOUTPUT_MAX_INDENTATION)
m_spaces[m_indentation * 2] = 0;
}
void PerlModOutput::iaddQuoted(const char *s)
{
char c;
while ((c = *s++) != 0) {
if (c == '\'')
m_stream->add('\\');
m_stream->add(c);
}
}
inline void PerlModOutput::iaddField(const char *s)
{
indent();
m_stream->add(s);
m_stream->add(" => ");
}
void PerlModOutput::iaddFieldQuoted(const char *field, const char *content)
{
iaddField(field);
m_stream->add('\'');
iaddQuoted(content);
m_stream->add("',\n");
}
void PerlModOutput::iopen(char c, const char *s)
{
if (s != 0)
iaddField(s);
else
indent();
m_stream->add(c);
m_stream->add('\n');
incIndent();
}
void PerlModOutput::iclose(char c)
{
decIndent();
indent();
if (c != 0)
m_stream->add(c);
m_stream->add(",\n");
}
/*! @brief Concrete visitor implementation for Perl output. */
class PerlModDocVisitor : public DocVisitor
{
public:
PerlModDocVisitor(PerlModOutput &);
virtual ~PerlModDocVisitor() {}
void finish();
//--------------------------------------
// visitor functions for leaf nodes
//--------------------------------------
void visit(DocWord *);
void visit(DocLinkedWord *);
void visit(DocWhiteSpace *);
void visit(DocSymbol *);
void visit(DocURL *);
void visit(DocLineBreak *);
void visit(DocHorRuler *);
void visit(DocStyleChange *);
void visit(DocVerbatim *);
void visit(DocAnchor *);
void visit(DocInclude *);
void visit(DocIncOperator *);
void visit(DocFormula *);
void visit(DocIndexEntry *);
//--------------------------------------
// visitor functions for compound nodes
//--------------------------------------
void visitPre(DocAutoList *);
void visitPost(DocAutoList *);
void visitPre(DocAutoListItem *);
void visitPost(DocAutoListItem *);
void visitPre(DocPara *) ;
void visitPost(DocPara *);
void visitPre(DocRoot *);
void visitPost(DocRoot *);
void visitPre(DocSimpleSect *);
void visitPost(DocSimpleSect *);
void visitPre(DocTitle *);
void visitPost(DocTitle *);
void visitPre(DocSimpleList *);
void visitPost(DocSimpleList *);
void visitPre(DocSimpleListItem *);
void visitPost(DocSimpleListItem *);
void visitPre(DocSection *);
void visitPost(DocSection *);
void visitPre(DocHtmlList *);
void visitPost(DocHtmlList *) ;
void visitPre(DocHtmlListItem *);
void visitPost(DocHtmlListItem *);
void visitPre(DocHtmlPre *);
void visitPost(DocHtmlPre *);
void visitPre(DocHtmlDescList *);
void visitPost(DocHtmlDescList *);
void visitPre(DocHtmlDescTitle *);
void visitPost(DocHtmlDescTitle *);
void visitPre(DocHtmlDescData *);
void visitPost(DocHtmlDescData *);
void visitPre(DocHtmlTable *);
void visitPost(DocHtmlTable *);
void visitPre(DocHtmlRow *);
void visitPost(DocHtmlRow *) ;
void visitPre(DocHtmlCell *);
void visitPost(DocHtmlCell *);
void visitPre(DocHtmlCaption *);
void visitPost(DocHtmlCaption *);
void visitPre(DocInternal *);
void visitPost(DocInternal *);
void visitPre(DocHRef *);
void visitPost(DocHRef *);
void visitPre(DocHtmlHeader *);
void visitPost(DocHtmlHeader *);
void visitPre(DocImage *);
void visitPost(DocImage *);
void visitPre(DocDotFile *);
void visitPost(DocDotFile *);
void visitPre(DocLink *);
void visitPost(DocLink *);
void visitPre(DocRef *);
void visitPost(DocRef *);
void visitPre(DocSecRefItem *);
void visitPost(DocSecRefItem *);
void visitPre(DocSecRefList *);
void visitPost(DocSecRefList *);
void visitPre(DocLanguage *);
void visitPost(DocLanguage *);
void visitPre(DocParamSect *);
void visitPost(DocParamSect *);
void visitPre(DocParamList *);
void visitPost(DocParamList *);
void visitPre(DocXRefItem *);
void visitPost(DocXRefItem *);
void visitPre(DocInternalRef *);
void visitPost(DocInternalRef *);
void visitPre(DocCopy *);
void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
private:
//--------------------------------------
// helper functions
//--------------------------------------
void addLink(const QString &ref,const QString &file,
const QString &anchor);
void enterText();
void leaveText();
void openItem(const char *);
void closeItem();
void singleItem(const char *);
void openSubBlock(const char * = 0);
void closeSubBlock();
//--------------------------------------
// state variables
//--------------------------------------
PerlModOutput &m_output;
bool m_textmode;
QString m_other;
};
PerlModDocVisitor::PerlModDocVisitor(PerlModOutput &output)
: m_output(output), m_textmode(false)
{
m_output.openList("doc");
}
void PerlModDocVisitor::finish()
{
leaveText();
m_output.closeList()
.add(m_other);
}
void PerlModDocVisitor::addLink(const QString &,const QString &file,const QString &anchor)
{
QString link = file;
if (!anchor.isEmpty())
(link += "_1") += anchor;
m_output.addFieldQuoted("link", link);
}
void PerlModDocVisitor::openItem(const char *name)
{
leaveText();
m_output.openHash().addFieldQuoted("type", name);
}
void PerlModDocVisitor::closeItem()
{
m_output.closeHash();
}
void PerlModDocVisitor::enterText()
{
if (m_textmode)
return;
openItem("text");
m_output.addField("content").add('\'');
m_textmode = true;
}
void PerlModDocVisitor::leaveText()
{
if (!m_textmode)
return;
m_output.add("\'\n");
closeItem();
m_textmode = false;
}
void PerlModDocVisitor::singleItem(const char *name)
{
openItem(name);
closeItem();
}
void PerlModDocVisitor::openSubBlock(const char *s)
{
m_output.openList(s);
}
void PerlModDocVisitor::closeSubBlock()
{
leaveText();
m_output.closeList();
}
void PerlModDocVisitor::visit(DocWord *w)
{
enterText();
m_output.addQuoted(w->word());
}
void PerlModDocVisitor::visit(DocLinkedWord *w)
{
openItem("url");
addLink(w->ref(), w->file(), w->anchor());
m_output.addFieldQuoted("content", w->word());
closeItem();
}
void PerlModDocVisitor::visit(DocWhiteSpace *)
{
enterText();
m_output.add(' ');
}
void PerlModDocVisitor::visit(DocSymbol *sy)
{
char c = 0;
const char *s = 0;
switch(sy->symbol())
{
case DocSymbol::At: c = '@'; break;
case DocSymbol::Less: c = '<'; break;
case DocSymbol::Greater: c = '>'; break;
case DocSymbol::Amp: c = '&'; break;
case DocSymbol::Dollar: c = '$'; break;
case DocSymbol::Hash: c = '#'; break;
case DocSymbol::Percent: c = '%'; break;
case DocSymbol::Quot: c = '"'; break;
case DocSymbol::Szlig: c = ''; break;
case DocSymbol::Nbsp: c = ''; break;
case DocSymbol::Uml: c = sy->letter(); break;
case DocSymbol::Acute: c = sy->letter(); break;
case DocSymbol::Grave: c = sy->letter(); break;
case DocSymbol::Circ: c = sy->letter(); break;
case DocSymbol::Tilde: c = sy->letter(); break;
case DocSymbol::Cedil: c = sy->letter(); break;
case DocSymbol::Ring: c = sy->letter(); break;
case DocSymbol::BSlash: s = "\\\\"; break;
case DocSymbol::Copy: s = "(c)"; break;
case DocSymbol::Apos: s = "\\\'"; break;
default:
err("Error: unknown symbol found\n");
}
enterText();
if (c != 0)
m_output.add(c);
else
m_output.add(s);
}
void PerlModDocVisitor::visit(DocURL *u)
{
openItem("url");
m_output.addQuoted(u->url());
closeItem();
}
void PerlModDocVisitor::visit(DocLineBreak *) { singleItem("linebreak"); }
void PerlModDocVisitor::visit(DocHorRuler *) { singleItem("hruler"); }
void PerlModDocVisitor::visit(DocStyleChange *s)
{
switch (s->style())
{
case DocStyleChange::Bold: break; // bold
case DocStyleChange::Italic: break; // italic
case DocStyleChange::Code: break; // code
case DocStyleChange::Subscript: break; // subscript
case DocStyleChange::Superscript: break; // superscript
case DocStyleChange::Center: break; // center
case DocStyleChange::Small: break; // small
default:
err("Error: unknown style found.\n");
}
}
void PerlModDocVisitor::visit(DocVerbatim *s)
{
const char *type = 0;
switch(s->type())
{
case DocVerbatim::Code:
#if 0
m_output.add("<programlisting>");
parseCode(m_ci,s->context(),s->text(),FALSE,0);
m_output.add("</programlisting>");
#endif
return;
case DocVerbatim::Verbatim: type = "preformatted"; break;
case DocVerbatim::HtmlOnly: type = "htmlonly"; break;
case DocVerbatim::LatexOnly: type = "latexonly"; break;
}
openItem(type);
m_output.addFieldQuoted("content", s->text());
closeItem();
}
void PerlModDocVisitor::visit(DocAnchor *anc)
{
QString anchor = anc->file() + "_1" + anc->anchor();
openItem("anchor");
m_output.addFieldQuoted("id", anchor);
closeItem();
}
void PerlModDocVisitor::visit(DocInclude *inc)
{
const char *type = 0;
switch(inc->type())
{
case DocInclude::Include:
#if 0
m_output.add("<programlisting>");
parseCode(m_ci,inc->context(),inc->text(),FALSE,0);
m_output.add("</programlisting>");
#endif
return;
case DocInclude::DontInclude: return;
case DocInclude::HtmlInclude: type = "htmlonly"; break;
case DocInclude::VerbInclude: type = "preformatted"; break;
}
openItem(type);
m_output.addFieldQuoted("content", inc->text());
closeItem();
}
void PerlModDocVisitor::visit(DocIncOperator *)
{
#if 0
//printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
// op->type(),op->isFirst(),op->isLast(),op->text().data());
if (op->isFirst())
{
m_output.add("<programlisting>");
}
if (op->type()!=DocIncOperator::Skip)
{
parseCode(m_ci,op->context(),op->text(),FALSE,0);
}
if (op->isLast())
{
m_output.add("</programlisting>");
}
else
{
m_output.add('\n');
}
#endif
}
void PerlModDocVisitor::visit(DocFormula *f)
{
openItem("formula");
QString id;
id += f->id();
m_output.addFieldQuoted("id", id).addFieldQuoted("content", f->text());
closeItem();
}
void PerlModDocVisitor::visit(DocIndexEntry *)
{
#if 0
m_output.add("<indexentry>"
"<primaryie>");
m_output.addQuoted(ie->entry());
m_output.add("</primaryie>"
"<secondaryie></secondaryie>"
"</indexentry>");
#endif
}
//--------------------------------------
// visitor functions for compound nodes
//--------------------------------------
void PerlModDocVisitor::visitPre(DocAutoList *l)
{
openItem(l->isEnumList() ? "ordered_list" : "itemized_list");
openSubBlock("content");
}
void PerlModDocVisitor::visitPost(DocAutoList *) { closeSubBlock(); }
void PerlModDocVisitor::visitPre(DocAutoListItem *) { openSubBlock(); }
void PerlModDocVisitor::visitPost(DocAutoListItem *) { closeSubBlock(); }
void PerlModDocVisitor::visitPre(DocPara *)
{
openItem("para");
openSubBlock("content");
}
void PerlModDocVisitor::visitPost(DocPara *)
{
closeSubBlock();
closeItem();
}
void PerlModDocVisitor::visitPre(DocRoot *)
{
}
void PerlModDocVisitor::visitPost(DocRoot *)
{
}
void PerlModDocVisitor::visitPre(DocSimpleSect *s)
{
leaveText();
const char *type;
switch (s->type())
{
case DocSimpleSect::See: type = "see"; break;
case DocSimpleSect::Return: type = "return"; break;
case DocSimpleSect::Author: type = "author"; break;
case DocSimpleSect::Authors: type = "authors"; break;
case DocSimpleSect::Version: type = "version"; break;
case DocSimpleSect::Since: type = "since"; break;
case DocSimpleSect::Date: type = "date"; break;
case DocSimpleSect::Note: type = "bug"; break;
case DocSimpleSect::Warning: type = "warning"; break;
case DocSimpleSect::Pre: type = "pre"; break;
case DocSimpleSect::Post: type = "post"; break;
case DocSimpleSect::Invar: type = "invariant"; break;
case DocSimpleSect::Remark: type = "remark"; break;
case DocSimpleSect::Attention: type = "attention"; break;
case DocSimpleSect::User: type = "par"; break;
default: type = "illegal"; break;
}
m_output.openSave().openList(type);
}
void PerlModDocVisitor::visitPost(DocSimpleSect *)
{
QString content;
leaveText();
m_output.closeList().closeSave(content);
m_other += content;
}
void PerlModDocVisitor::visitPre(DocTitle *)
{
openItem("title");
openSubBlock("content");
}
void PerlModDocVisitor::visitPost(DocTitle *)
{
closeSubBlock();
closeItem();
}
void PerlModDocVisitor::visitPre(DocSimpleList *)
{
openItem("itemized_list");
openSubBlock("content");
}
void PerlModDocVisitor::visitPost(DocSimpleList *) { closeSubBlock(); }
void PerlModDocVisitor::visitPre(DocSimpleListItem *) { openSubBlock(); }
void PerlModDocVisitor::visitPost(DocSimpleListItem *) { closeSubBlock(); }
void PerlModDocVisitor::visitPre(DocSection *s)
{
QString sect = "sect" + (s->level() + 1);
openItem(sect);
openSubBlock("content");
}
void PerlModDocVisitor::visitPost(DocSection *) { closeSubBlock(); }
void PerlModDocVisitor::visitPre(DocHtmlList *l)
{
openItem((l->type() == DocHtmlList::Ordered) ? "ordered_list" : "itemized_list");
openSubBlock("content");
}
void PerlModDocVisitor::visitPost(DocHtmlList *) { closeSubBlock(); }
void PerlModDocVisitor::visitPre(DocHtmlListItem *) { openSubBlock(); }
void PerlModDocVisitor::visitPost(DocHtmlListItem *) { closeSubBlock(); }
void PerlModDocVisitor::visitPre(DocHtmlPre *)
{
openItem("preformatted");
openSubBlock("content");
//m_insidePre=TRUE;
}
void PerlModDocVisitor::visitPost(DocHtmlPre *)
{
//m_insidePre=FALSE;
closeSubBlock();
closeItem();
}
void PerlModDocVisitor::visitPre(DocHtmlDescList *)
{
#if 0
m_output.add("<variablelist>\n");
#endif
}
void PerlModDocVisitor::visitPost(DocHtmlDescList *)
{
#if 0
m_output.add("</variablelist>\n");
#endif
}
void PerlModDocVisitor::visitPre(DocHtmlDescTitle *)
{
#if 0
m_output.add("<varlistentry><term>");
#endif
}
void PerlModDocVisitor::visitPost(DocHtmlDescTitle *)
{
#if 0
m_output.add("</term></varlistentry>\n");
#endif
}
void PerlModDocVisitor::visitPre(DocHtmlDescData *)
{
#if 0
m_output.add("<listitem>");
#endif
}
void PerlModDocVisitor::visitPost(DocHtmlDescData *)
{
#if 0
m_output.add("</listitem>\n");
#endif
}
void PerlModDocVisitor::visitPre(DocHtmlTable *)
{
#if 0
m_output.add("<table rows=\""); m_output.add(t->numRows());
m_output.add("\" cols=\""); m_output.add(t->numCols()); m_output.add("\">");
#endif
}
void PerlModDocVisitor::visitPost(DocHtmlTable *)
{
#if 0
m_output.add("</table>\n");
#endif
}
void PerlModDocVisitor::visitPre(DocHtmlRow *)
{
#if 0
m_output.add("<row>\n");
#endif
}
void PerlModDocVisitor::visitPost(DocHtmlRow *)
{
#if 0
m_output.add("</row>\n");
#endif
}
void PerlModDocVisitor::visitPre(DocHtmlCell *)
{
#if 0
if (c->isHeading()) m_output.add("<entry thead=\"yes\">"); else m_output.add("<entry thead=\"no\">");
#endif
}
void PerlModDocVisitor::visitPost(DocHtmlCell *)
{
#if 0
m_output.add("</entry>");
#endif
}
void PerlModDocVisitor::visitPre(DocHtmlCaption *)
{
#if 0
m_output.add("<caption>");
#endif
}
void PerlModDocVisitor::visitPost(DocHtmlCaption *)
{
#if 0
m_output.add("</caption>\n");
#endif
}
void PerlModDocVisitor::visitPre(DocInternal *)
{
#if 0
m_output.add("<internal>");
#endif
}
void PerlModDocVisitor::visitPost(DocInternal *)
{
#if 0
m_output.add("</internal>");
#endif
}
void PerlModDocVisitor::visitPre(DocHRef *)
{
#if 0
m_output.add("<ulink url=\""); m_output.add(href->url()); m_output.add("\">");
#endif
}
void PerlModDocVisitor::visitPost(DocHRef *)
{
#if 0
m_output.add("</ulink>");
#endif
}
void PerlModDocVisitor::visitPre(DocHtmlHeader *)
{
#if 0
m_output.add("<sect"); m_output.add(header->level()); m_output.add(">");
#endif
}
void PerlModDocVisitor::visitPost(DocHtmlHeader *)
{
#if 0
m_output.add("</sect"); m_output.add(header->level()); m_output.add(">\n");
#endif
}
void PerlModDocVisitor::visitPre(DocImage *)
{
#if 0
m_output.add("<image type=\"");
switch(img->type())
{
case DocImage::Html: m_output.add("html"); break;
case DocImage::Latex: m_output.add("latex"); break;
case DocImage::Rtf: m_output.add("rtf"); break;
}
m_output.add("\"");
QCString baseName=img->name();
int i;
if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
m_output.add(" name=\""); m_output.add(baseName); m_output.add("\"");
if (!img->width().isEmpty())
{
m_output.add(" width=\"");
m_output.addQuoted(img->width());
m_output.add("\"");
}
else if (!img->height().isEmpty())
{
m_output.add(" height=\"");
m_output.addQuoted(img->height());
m_output.add("\"");
}
m_output.add(">");
#endif
}
void PerlModDocVisitor::visitPost(DocImage *)
{
#if 0
m_output.add("</image>");
#endif
}
void PerlModDocVisitor::visitPre(DocDotFile *)
{
#if 0
m_output.add("<dotfile name=\""); m_output.add(df->file()); m_output.add("\">");
#endif
}
void PerlModDocVisitor::visitPost(DocDotFile *)
{
#if 0
m_output.add("</dotfile>");
#endif
}
void PerlModDocVisitor::visitPre(DocLink *lnk)
{
openItem("link");
addLink(lnk->ref(), lnk->file(), lnk->anchor());
}
void PerlModDocVisitor::visitPost(DocLink *)
{
closeItem();
}
void PerlModDocVisitor::visitPre(DocRef *ref)
{
openItem("ref");
if (!ref->hasLinkText())
m_output.addFieldQuoted("text", ref->targetTitle());
}
void PerlModDocVisitor::visitPost(DocRef *)
{
closeItem();
}
void PerlModDocVisitor::visitPre(DocSecRefItem *)
{
#if 0
m_output.add("<tocitem id=\""); m_output.add(ref->file()); m_output.add("_1"); m_output.add(ref->anchor()); m_output.add("\">");
#endif
}
void PerlModDocVisitor::visitPost(DocSecRefItem *)
{
#if 0
m_output.add("</tocitem>");
#endif
}
void PerlModDocVisitor::visitPre(DocSecRefList *)
{
#if 0
m_output.add("<toclist>");
#endif
}
void PerlModDocVisitor::visitPost(DocSecRefList *)
{
#if 0
m_output.add("</toclist>");
#endif
}
void PerlModDocVisitor::visitPre(DocLanguage *l)
{
openItem("language");
m_output.addFieldQuoted("id", l->id());
}
void PerlModDocVisitor::visitPost(DocLanguage *)
{
closeItem();
}
void PerlModDocVisitor::visitPre(DocParamSect *s)
{
leaveText();
const char *type = 0;
switch(s->type())
{
case DocParamSect::Param: type = "params"; break;
case DocParamSect::RetVal: type = "retvals"; break;
case DocParamSect::Exception: type = "exceptions"; break;
default: ASSERT(0);
}
m_output.openSave().openList(type);
}
void PerlModDocVisitor::visitPost(DocParamSect *)
{
leaveText();
QString content;
m_output.closeList().closeSave(content);
m_other += content;
}
void PerlModDocVisitor::visitPre(DocParamList *pl)
{
leaveText();
m_output.openHash()
.openList("parameters");
QStrListIterator li(pl->parameters());
const char *s;
for (li.toFirst();(s=li.current());++li)
{
m_output.openHash()
.addFieldQuoted("name", s)
.closeHash();
}
m_output.closeList()
.openList("doc");
}
void PerlModDocVisitor::visitPost(DocParamList *)
{
leaveText();
m_output.closeList()
.closeHash();
}
void PerlModDocVisitor::visitPre(DocXRefItem *)
{
#if 0
m_output.add("<xrefsect id=\"");
m_output.add(x->file()); m_output.add("_1"); m_output.add(x->anchor());
m_output.add("\">");
m_output.add("<xreftitle>");
m_output.addQuoted(x->title());
m_output.add("</xreftitle>");
m_output.add("<xrefdescription>");
#endif
}
void PerlModDocVisitor::visitPost(DocXRefItem *)
{
#if 0
m_output.add("</xrefdescription>");
m_output.add("</xrefsect>");
#endif
}
void PerlModDocVisitor::visitPre(DocInternalRef *ref)
{
openItem("ref");
addLink(0,ref->file(),ref->anchor());
}
void PerlModDocVisitor::visitPost(DocInternalRef *)
{
closeItem();
}
void PerlModDocVisitor::visitPre(DocCopy *)
{
}
void PerlModDocVisitor::visitPost(DocCopy *)
{
}
void PerlModDocVisitor::visitPre(DocText *)
{
}
void PerlModDocVisitor::visitPost(DocText *)
{
}
static void addTemplateArgumentList(ArgumentList *al,
PerlModOutput &output,const char * /*name*/)
{
QCString indentStr;
if (!al)
return;
output.openList("template_parameters");
ArgumentListIterator ali(*al);
Argument *a;
for (ali.toFirst();(a=ali.current());++ali)
{
output.openHash();
if (!a->type.isEmpty())
output.addFieldQuoted("type", a->type);
if (!a->name.isEmpty())
output.addFieldQuoted("declaration_name", a->name)
.addFieldQuoted("definition_name", a->name);
if (!a->defval.isEmpty())
output.addFieldQuoted("default", a->defval);
output.closeHash();
}
output.closeList();
}
/*
static void addMemberTemplateLists(MemberDef *md,PerlModOutput &output)
{
ClassDef *cd = md->getClassDef();
const char *cname = cd ? cd->name().data() : 0;
if (md->templateArguments()) // function template prefix
addTemplateArgumentList(md->templateArguments(),output,cname);
}
*/
static void addTemplateList(ClassDef *cd,PerlModOutput &output)
{
addTemplateArgumentList(cd->templateArguments(),output,cd->name());
}
static void addPerlModDocBlock(PerlModOutput &output,
const char *name,
const QCString &fileName,
int lineNr,
const QCString &scope,
MemberDef *md,
const QCString &text)
{
QCString stext = text.stripWhiteSpace();
if (stext.isEmpty())
{
output.addField(name).add("{},\n");
}
else
{
DocNode *root = validatingParseDoc(fileName,lineNr,scope,md,stext,FALSE);
output.openHash(name);
PerlModDocVisitor *visitor = new PerlModDocVisitor(output);
root->accept(visitor);
visitor->finish();
output.closeHash();
delete visitor;
delete root;
}
}
static const char *getProtectionName(Protection prot)
{
switch (prot)
{
case Public: return "public";
case Protected: return "protected";
case Private: return "private";
}
return 0;
}
static const char *getVirtualnessName(Specifier virt)
{
switch(virt)
{
case Normal: return "non_virtual";
case Virtual: return "virtual";
case Pure: return "pure_virtual";
}
return 0;
}
static void generatePerlForMember(MemberDef *md,PerlModOutput &output,Definition *)
{
// + declaration/definition arg lists
// + reimplements
// + reimplementedBy
// + exceptions
// + const/volatile specifiers
// - examples
// - source definition
// - source references
// - source referenced by
// - body code
// - template arguments
// (templateArguments(), definitionTemplateParameterLists())
QCString memType;
bool isFunc=FALSE;
switch (md->memberType())
{
case MemberDef::Define: memType="define"; break;
case MemberDef::EnumValue: ASSERT(0); break;
case MemberDef::Property: memType="property"; break;
case MemberDef::Variable: memType="variable"; break;
case MemberDef::Typedef: memType="typedef"; break;
case MemberDef::Enumeration: memType="enum"; break;
case MemberDef::Function: memType="function"; isFunc=TRUE; break;
case MemberDef::Signal: memType="signal"; isFunc=TRUE; break;
case MemberDef::Prototype: memType="prototype"; isFunc=TRUE; break;
case MemberDef::Friend: memType="friend"; isFunc=TRUE; break;
case MemberDef::DCOP: memType="dcop"; isFunc=TRUE; break;
case MemberDef::Slot: memType="slot"; isFunc=TRUE; break;
}
QCString scopeName;
if (md->getClassDef())
scopeName=md->getClassDef()->name();
else if (md->getNamespaceDef())
scopeName=md->getNamespaceDef()->name();
output.openHash()
.addFieldQuoted("kind", memType)
.addFieldQuoted("name", md->name())
.addFieldQuoted("virtualness", getVirtualnessName(md->virtualness()))
.addFieldQuoted("protection", getProtectionName(md->protection()));
addPerlModDocBlock(output,"brief",md->getDefFileName(),md->getDefLine(),scopeName,md,md->briefDescription());
addPerlModDocBlock(output,"detailed",md->getDefFileName(),md->getDefLine(),scopeName,md,md->documentation());
if (md->memberType()!=MemberDef::Define &&
md->memberType()!=MemberDef::Enumeration)
output.addFieldQuoted("type", md->typeString());
if (isFunc) //function
{
ArgumentList *al = md->argumentList();
output.addFieldQuoted("const", (al && al->constSpecifier) ? "yes" : "no")
.addFieldQuoted("volatile", (al && al->volatileSpecifier) ? "yes" : "no");
output.openList("parameters");
ArgumentList *declAl = md->declArgumentList();
ArgumentList *defAl = md->argumentList();
if (declAl && declAl->count()>0)
{
ArgumentListIterator declAli(*declAl);
ArgumentListIterator defAli(*defAl);
Argument *a;
for (declAli.toFirst();(a=declAli.current());++declAli)
{
Argument *defArg = defAli.current();
output.openHash();
if (!a->name.isEmpty())
output.addFieldQuoted("declaration_name", a->name);
if (defArg && !defArg->name.isEmpty() && defArg->name!=a->name)
output.addFieldQuoted("definition_name", defArg->name);
if (!a->type.isEmpty())
output.addFieldQuoted("type", a->type);
if (!a->array.isEmpty())
output.addFieldQuoted("array", a->array);
if (!a->defval.isEmpty())
output.addFieldQuoted("default_value", a->defval);
if (!a->attrib.isEmpty())
output.addFieldQuoted("attributes", a->attrib);
output.closeHash();
if (defArg) ++defAli;
}
}
output.closeList();
}
else if (md->memberType()==MemberDef::Define &&
md->argsString()!=0) // define
{
output.openList("parameters");
ArgumentListIterator ali(*md->argumentList());
Argument *a;
for (ali.toFirst();(a=ali.current());++ali)
{
output.openHash()
.addFieldQuoted("name", a->type)
.closeHash();
}
output.closeList();
}
if (!md->initializer().isEmpty())
output.addFieldQuoted("initializer", md->initializer());
if (md->excpString())
output.addFieldQuoted("exceptions", md->excpString());
if (md->memberType()==MemberDef::Enumeration) // enum
{
if (md->enumFieldList())
{
output.openList("values");
MemberListIterator emli(*md->enumFieldList());
MemberDef *emd;
for (emli.toFirst();(emd=emli.current());++emli)
{
output.openHash()
.addFieldQuoted("name", emd->name());
if (!emd->initializer().isEmpty())
output.addFieldQuoted("initializer", emd->initializer());
addPerlModDocBlock(output,"brief",emd->getDefFileName(),emd->getDefLine(),scopeName,emd,emd->briefDescription());
addPerlModDocBlock(output,"detailed",emd->getDefFileName(),emd->getDefLine(),scopeName,emd,emd->documentation());
output.closeHash();
}
output.closeList();
}
}
MemberDef *rmd = md->reimplements();
if (rmd)
output.openHash("reimplements")
.addFieldQuoted("name", rmd->name())
.closeHash();
MemberList *rbml = md->reimplementedBy();
if (rbml)
{
MemberListIterator mli(*rbml);
output.openList("reimplemented_by");
for (mli.toFirst();(rmd=mli.current());++mli)
output.openHash()
.addFieldQuoted("name", rmd->name())
.closeHash();
output.closeList();
}
output.closeHash();
}
static void generatePerlSection(Definition *d,PerlModOutput &output,
MemberList *ml,const char *name,const char *header=0)
{
if (ml->count()==0) return; // empty list
output.openHash(name);
if (header)
output.addFieldQuoted("header", header);
output.openList("members");
MemberListIterator mli(*ml);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
generatePerlForMember(md,output,d);
}
output.closeList()
.closeHash();
}
static void addListOfAllMembers(ClassDef *cd, PerlModOutput &output)
{
output.openList("all_members");
MemberNameInfoSDict::Iterator mnii(*cd->memberNameInfoSDict());
MemberNameInfo *mni;
for (mnii.toFirst();(mni=mnii.current());++mnii)
{
MemberNameInfoIterator mii(*mni);
MemberInfo *mi;
for (mii.toFirst();(mi=mii.current());++mii)
{
MemberDef *md=mi->memberDef;
ClassDef *cd=md->getClassDef();
Definition *d=md->getGroupDef();
if (d==0) d = cd;
output.openHash()
.addFieldQuoted("name", md->name())
.addFieldQuoted("virtualness", getVirtualnessName(md->virtualness()))
.addFieldQuoted("protection", getProtectionName(mi->prot));
if (!mi->ambiguityResolutionScope.isEmpty())
output.addFieldQuoted("ambiguity_scope", mi->ambiguityResolutionScope);
output.addFieldQuoted("scope", cd->name())
.closeHash();
}
}
output.closeList();
}
static void generatePerlForClass(ClassDef *cd, PerlModOutput &output)
{
// + brief description
// + detailed description
// + template argument list(s)
// - include file
// + member groups
// + inheritance diagram
// + list of direct super classes
// + list of direct sub classes
// + list of inner classes
// + collaboration diagram
// + list of all members
// + user defined member sections
// + standard member sections
// + detailed member documentation
// - examples using the class
if (cd->isReference()) return; // skip external references.
if (cd->name().find('@')!=-1) return; // skip anonymous compounds.
if (cd->templateMaster()!=0) return; // skip generated template instances.
output.openHash()
.addFieldQuoted("name", cd->name());
if (cd->baseClasses()->count()>0)
{
output.openList("base");
BaseClassListIterator bcli(*cd->baseClasses());
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
output.openHash()
.addFieldQuoted("name", bcd->classDef->displayName())
.addFieldQuoted("virtualness", getVirtualnessName(bcd->virt))
.addFieldQuoted("protection", getProtectionName(bcd->prot))
.closeHash();
output.closeList();
}
if (cd->subClasses()->count()>0)
{
output.openList("derived");
BaseClassListIterator bcli(*cd->baseClasses());
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
output.openHash()
.addFieldQuoted("name", bcd->classDef->displayName())
.addFieldQuoted("virtualness", getVirtualnessName(bcd->virt))
.addFieldQuoted("protection", getProtectionName(bcd->prot))
.closeHash();
output.closeList();
}
ClassSDict *cl = cd->getInnerClasses();
if (cl)
{
output.openList("inner");
ClassSDict::Iterator cli(*cl);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
output.openHash()
.addFieldQuoted("name", cd->name())
.closeHash();
output.closeList();
}
IncludeInfo *ii=cd->includeInfo();
if (ii)
{
QCString nm = ii->includeName;
if (nm.isEmpty() && ii->fileDef) nm = ii->fileDef->docName();
if (!nm.isEmpty())
{
output.openHash("includes");
#if 0
if (ii->fileDef && !ii->fileDef->isReference()) // TODO: support external references
t << " id=\"" << ii->fileDef->getOutputFileBase() << "\"";
#endif
output.addFieldQuoted("local", ii->local ? "yes" : "no")
.addFieldQuoted("name", nm)
.closeHash();
}
}
addTemplateList(cd,output);
addListOfAllMembers(cd,output);
MemberGroupSDict::Iterator mgli(*cd->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
generatePerlSection(cd,output,mg->members(),"user_defined",mg->header());
generatePerlSection(cd,output,&cd->pubTypes,"public_typedefs");
generatePerlSection(cd,output,&cd->pubMethods,"public_methods");
generatePerlSection(cd,output,&cd->pubAttribs,"public_members");
generatePerlSection(cd,output,&cd->pubSlots,"public_slots");
generatePerlSection(cd,output,&cd->signals,"signals");
generatePerlSection(cd,output,&cd->dcopMethods,"dcop_methods");
generatePerlSection(cd,output,&cd->properties,"properties");
generatePerlSection(cd,output,&cd->pubStaticMethods,"public_static_methods");
generatePerlSection(cd,output,&cd->pubStaticAttribs,"public_static_members");
generatePerlSection(cd,output,&cd->proTypes,"protected_typedefs");
generatePerlSection(cd,output,&cd->proMethods,"protected_methods");
generatePerlSection(cd,output,&cd->proAttribs,"protected_members");
generatePerlSection(cd,output,&cd->proSlots,"protected_slots");
generatePerlSection(cd,output,&cd->proStaticMethods,"protected_static_methods");
generatePerlSection(cd,output,&cd->proStaticAttribs,"protected_static_members");
generatePerlSection(cd,output,&cd->priTypes,"private_typedefs");
generatePerlSection(cd,output,&cd->priMethods,"private_methods");
generatePerlSection(cd,output,&cd->priAttribs,"private_members");
generatePerlSection(cd,output,&cd->priSlots,"private_slots");
generatePerlSection(cd,output,&cd->priStaticMethods,"private_static_methods");
generatePerlSection(cd,output,&cd->priStaticAttribs,"private_static_members");
generatePerlSection(cd,output,&cd->friends,"friend_methods");
generatePerlSection(cd,output,&cd->related,"related_methods");
addPerlModDocBlock(output,"brief",cd->getDefFileName(),cd->getDefLine(),cd->name(),0,cd->briefDescription());
addPerlModDocBlock(output,"detailed",cd->getDefFileName(),cd->getDefLine(),cd->name(),0,cd->documentation());
#if 0
DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance);
if (!inheritanceGraph.isTrivial())
{
t << " <inheritancegraph>" << endl;
inheritanceGraph.writePerl(t);
t << " </inheritancegraph>" << endl;
}
DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation);
if (!collaborationGraph.isTrivial())
{
t << " <collaborationgraph>" << endl;
collaborationGraph.writePerl(t);
t << " </collaborationgraph>" << endl;
}
t << " <location file=\""
<< cd->getDefFileName() << "\" line=\""
<< cd->getDefLine() << "\"";
if (cd->getStartBodyLine()!=-1)
{
t << " bodystart=\"" << cd->getStartBodyLine() << "\" bodyend=\""
<< cd->getEndBodyLine() << "\"";
}
t << "/>" << endl;
#endif
output.closeHash();
}
static void generatePerlForNamespace(NamespaceDef *nd, PerlModOutput &output)
{
// + contained class definitions
// + contained namespace definitions
// + member groups
// + normal members
// + brief desc
// + detailed desc
// + location
// - files containing (parts of) the namespace definition
if (nd->isReference()) return; // skip external references
output.openHash()
.addFieldQuoted("name", nd->name());
ClassSDict *cl = nd->classSDict;
if (cl)
{
output.openList("classes");
ClassSDict::Iterator cli(*cl);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
output.openHash()
.addFieldQuoted("name", cd->name())
.closeHash();
output.closeList();
}
NamespaceSDict *nl = nd->namespaceSDict;
if (nl)
{
output.openList("namespaces");
NamespaceSDict::Iterator nli(*nl);
NamespaceDef *nd;
for (nli.toFirst();(nd=nli.current());++nli)
output.openHash()
.addFieldQuoted("name", nd->name())
.closeHash();
output.closeList();
}
MemberGroupSDict::Iterator mgli(*nd->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
generatePerlSection(nd,output,mg->members(),"user-defined",mg->header());
generatePerlSection(nd,output,&nd->decDefineMembers,"defines");
generatePerlSection(nd,output,&nd->decProtoMembers,"prototypes");
generatePerlSection(nd,output,&nd->decTypedefMembers,"typedefs");
generatePerlSection(nd,output,&nd->decEnumMembers,"enums");
generatePerlSection(nd,output,&nd->decFuncMembers,"functions");
generatePerlSection(nd,output,&nd->decVarMembers,"variables");
addPerlModDocBlock(output,"brief",nd->getDefFileName(),nd->getDefLine(),0,0,nd->briefDescription());
addPerlModDocBlock(output,"detailed",nd->getDefFileName(),nd->getDefLine(),0,0,nd->documentation());
output.closeHash();
}
static void generatePerlForFile(FileDef *fd, PerlModOutput &output)
{
// + includes files
// + includedby files
// - include graph
// - included by graph
// - contained class definitions
// - contained namespace definitions
// - member groups
// + normal members
// + brief desc
// + detailed desc
// - source code
// - location
// - number of lines
if (fd->isReference()) return;
output.openHash()
.addFieldQuoted("name", fd->name());
QListIterator<IncludeInfo> ili1(*fd->includeFileList());
IncludeInfo *inc;
output.openList("includes");
for (ili1.toFirst();(inc=ili1.current());++ili1)
{
output.openHash()
.addFieldQuoted("name", inc->includeName);
if (inc->fileDef && !inc->fileDef->isReference())
{
output.addFieldQuoted("ref", inc->fileDef->getOutputFileBase());
}
output.closeHash();
}
output.closeList();
QListIterator<IncludeInfo> ili2(*fd->includedByFileList());
output.openList("included_by");
for (ili2.toFirst();(inc=ili2.current());++ili2)
{
output.openHash()
.addFieldQuoted("name => ", inc->includeName);
if (inc->fileDef && !inc->fileDef->isReference())
{
output.addFieldQuoted("ref", inc->fileDef->getOutputFileBase());
}
output.closeHash();
}
output.closeList();
generatePerlSection(fd,output,&fd->decDefineMembers,"defines");
generatePerlSection(fd,output,&fd->decProtoMembers,"prototypes");
generatePerlSection(fd,output,&fd->decTypedefMembers,"typedefs");
generatePerlSection(fd,output,&fd->decEnumMembers,"enums");
generatePerlSection(fd,output,&fd->decFuncMembers,"functions");
generatePerlSection(fd,output,&fd->decVarMembers,"variables");
addPerlModDocBlock(output,"brief",fd->getDefFileName(),fd->getDefLine(),0,0,fd->briefDescription());
addPerlModDocBlock(output,"detailed",fd->getDefFileName(),fd->getDefLine(),0,0,fd->documentation());
output.closeHash();
}
static void generatePerlForGroup(GroupDef *gd, PerlModOutput &output)
{
// + members
// + member groups
// + files
// + classes
// + namespaces
// - packages
// + pages
// + child groups
// - examples
// + brief description
// + detailed description
if (gd->isReference()) return; // skip external references
output.openHash()
.addFieldQuoted("name", gd->name())
.addFieldQuoted("title", gd->groupTitle());
FileList *fl = gd->getFiles();
if (fl)
{
output.openList("files");
QListIterator<FileDef> fli(*fl);
FileDef *fd = fl->first();
for (fli.toFirst();(fd=fli.current());++fli)
output.openHash()
.addFieldQuoted("name", fd->name())
.closeHash();
output.closeList();
}
ClassSDict *cl = gd->getClasses();
if (cl)
{
output.openList("classes");
ClassSDict::Iterator cli(*cl);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
output.openHash()
.addFieldQuoted("name", cd->name())
.closeHash();
output.closeList();
}
NamespaceList *nl = gd->getNamespaces();
if (nl)
{
output.openList("namespaces");
NamespaceListIterator nli(*nl);
NamespaceDef *nd;
for (nli.toFirst();(nd=nli.current());++nli)
output.openHash()
.addFieldQuoted("name", nd->name())
.closeHash();
output.closeList();
}
PageSDict *pl = gd->getPages();
if (pl)
{
output.openList("pages");
PageSDict::Iterator pli(*pl);
PageInfo *pi;
for (pli.toFirst();(pi=pli.current());++pli)
output.openHash()
.addFieldQuoted("title", pi->title)
.closeHash();
output.closeList();
}
GroupList *gl = gd->getSubGroups();
if (gl)
{
output.openList("groups");
GroupListIterator gli(*gl);
GroupDef *sgd;
for (gli.toFirst();(sgd=gli.current());++gli)
output.openHash()
.addFieldQuoted("title", gd->groupTitle())
.closeHash();
output.closeList();
}
MemberGroupSDict::Iterator mgli(*gd->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
generatePerlSection(gd,output,mg->members(),"user-defined",mg->header());
generatePerlSection(gd,output,&gd->decDefineMembers,"defines");
generatePerlSection(gd,output,&gd->decProtoMembers,"prototypes");
generatePerlSection(gd,output,&gd->decTypedefMembers,"typedefs");
generatePerlSection(gd,output,&gd->decEnumMembers,"enums");
generatePerlSection(gd,output,&gd->decFuncMembers,"functions");
generatePerlSection(gd,output,&gd->decVarMembers,"variables");
addPerlModDocBlock(output,"brief",gd->getDefFileName(),gd->getDefLine(),0,0,gd->briefDescription());
addPerlModDocBlock(output,"detailed",gd->getDefFileName(),gd->getDefLine(),0,0,gd->documentation());
output.closeHash();
}
static void generatePerlForPage(PageInfo *pi, PerlModOutput &output)
{
// + name
// + title
// + documentation
if (pi->isReference()) return;
output.openHash()
.addFieldQuoted("name", pi->name);
SectionInfo *si = Doxygen::sectionDict.find(pi->name);
if (si)
output.addFieldQuoted("title", si->title);
addPerlModDocBlock(output,"detailed",pi->defFileName,pi->defLine,0,0,pi->doc);
}
void generatePerlMod()
{
// + classes
// + namespaces
// + files
// - packages
// + groups
// + related pages
// - examples
QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY");
if (outputDirectory.isEmpty())
{
outputDirectory=QDir::currentDirPath();
}
else
{
QDir dir(outputDirectory);
if (!dir.exists())
{
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(outputDirectory))
{
err("Error: tag OUTPUT_DIRECTORY: Output directory `%s' does not "
"exist and cannot be created\n",outputDirectory.data());
exit(1);
}
else if (!Config_getBool("QUIET"))
{
err("Notice: Output directory `%s' does not exist. "
"I have created it for you.\n", outputDirectory.data());
}
dir.cd(outputDirectory);
}
outputDirectory=dir.absPath();
}
QDir dir(outputDirectory);
if (!dir.exists())
{
dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(outputDirectory))
{
err("Cannot create directory %s\n",outputDirectory.data());
return;
}
}
QCString fileName=outputDirectory+"/DoxyDocs.pm";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
{
err("Cannot open file %s for writing!\n",fileName.data());
return;
}
QTextStream t(&f);
PerlModOutputStream os(&t);
PerlModOutput output(&os);
output.add("$doxydocs =\n").openHash();
output.openList("classes");
ClassSDict::Iterator cli(Doxygen::classSDict);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
generatePerlForClass(cd,output);
output.closeList();
output.openList("namespaces");
NamespaceSDict::Iterator nli(Doxygen::namespaceSDict);
NamespaceDef *nd;
for (nli.toFirst();(nd=nli.current());++nli)
generatePerlForNamespace(nd,output);
output.closeList();
output.openList("files");
FileNameListIterator fnli(Doxygen::inputNameList);
FileName *fn;
for (;(fn=fnli.current());++fnli)
{
FileNameIterator fni(*fn);
FileDef *fd;
for (;(fd=fni.current());++fni)
generatePerlForFile(fd,output);
}
output.closeList();
output.openList("groups");
GroupSDict::Iterator gli(Doxygen::groupSDict);
GroupDef *gd;
for (;(gd=gli.current());++gli)
generatePerlForGroup(gd,output);
output.closeList();
output.openList("pages");
PageSDict::Iterator pdi(*Doxygen::pageSDict);
PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi)
generatePerlForPage(pi,output);
if (Doxygen::mainPage)
generatePerlForPage(Doxygen::mainPage,output);
output.closeList();
output.closeHash().add(";\n1;\n");
}
// Local Variables:
// c-basic-offset: 2
// End:
/******************************************************************************
*
*
*
* Copyright (C) 1997-2002 by 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.
*
*/
#ifndef PERLMODGEN_H
#define PERLMODGEN_H
void generatePerlMod();
#endif
...@@ -592,6 +592,16 @@ class PrintDocVisitor : public DocVisitor ...@@ -592,6 +592,16 @@ class PrintDocVisitor : public DocVisitor
indent_post(); indent_post();
printf("</copy>\n"); printf("</copy>\n");
} }
void visitPre(DocText *)
{
indent_pre();
printf("<text>\n");
}
void visitPost(DocText *)
{
indent_post();
printf("</text>\n");
}
private: private:
// helper functions // helper functions
......
...@@ -271,7 +271,7 @@ void RTFDocVisitor::visit(DocVerbatim *s) ...@@ -271,7 +271,7 @@ void RTFDocVisitor::visit(DocVerbatim *s)
m_t << "{" << endl; m_t << "{" << endl;
m_t << "\\par" << endl; m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample"); m_t << rtf_Style_Reset << getStyle("CodeExample");
parseCode(m_ci,s->context(),s->text().latin1(),FALSE,0); parseCode(m_ci,s->context(),s->text().latin1(),s->isExample(),s->exampleFile());
m_t << "\\par" << endl; m_t << "\\par" << endl;
m_t << "}" << endl; m_t << "}" << endl;
break; break;
...@@ -321,7 +321,7 @@ void RTFDocVisitor::visit(DocInclude *inc) ...@@ -321,7 +321,7 @@ void RTFDocVisitor::visit(DocInclude *inc)
m_t << "{" << endl; m_t << "{" << endl;
m_t << "\\par" << endl; m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample"); m_t << rtf_Style_Reset << getStyle("CodeExample");
parseCode(m_ci,inc->context(),inc->text().latin1(),FALSE,0); parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile());
m_t << "\\par" << endl; m_t << "\\par" << endl;
m_t << "}" << endl; m_t << "}" << endl;
break; break;
...@@ -353,7 +353,7 @@ void RTFDocVisitor::visit(DocIncOperator *op) ...@@ -353,7 +353,7 @@ void RTFDocVisitor::visit(DocIncOperator *op)
} }
if (op->type()!=DocIncOperator::Skip) if (op->type()!=DocIncOperator::Skip)
{ {
parseCode(m_ci,op->context(),op->text().latin1(),FALSE,0); parseCode(m_ci,op->context(),op->text().latin1(),op->isExample(),op->exampleFile());
} }
if (op->isLast()) if (op->isLast())
{ {
...@@ -989,6 +989,14 @@ void RTFDocVisitor::visitPost(DocCopy *) ...@@ -989,6 +989,14 @@ void RTFDocVisitor::visitPost(DocCopy *)
{ {
} }
void RTFDocVisitor::visitPre(DocText *)
{
}
void RTFDocVisitor::visitPost(DocText *)
{
}
static char* getMultiByte(int c) static char* getMultiByte(int c)
{ {
static char s[10]; static char s[10];
......
...@@ -122,6 +122,8 @@ class RTFDocVisitor : public DocVisitor ...@@ -122,6 +122,8 @@ class RTFDocVisitor : public DocVisitor
void visitPost(DocInternalRef *); void visitPost(DocInternalRef *);
void visitPre(DocCopy *); void visitPre(DocCopy *);
void visitPost(DocCopy *); void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
private: private:
......
...@@ -2298,6 +2298,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -2298,6 +2298,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN( ReadFuncArgType ); BEGIN( ReadFuncArgType );
} }
<CopyArgCommentLine>[^\\\@\n]+ { fullArgString+=yytext; } <CopyArgCommentLine>[^\\\@\n]+ { fullArgString+=yytext; }
<CopyArgCommentLine>. { fullArgString+=*yytext; }
<CopyArgComment>\n { fullArgString+=*yytext; yyLineNr++; } <CopyArgComment>\n { fullArgString+=*yytext; yyLineNr++; }
<CopyArgComment>. { fullArgString+=*yytext; } <CopyArgComment>. { fullArgString+=*yytext; }
<ReadTempArgs>"<" { <ReadTempArgs>"<" {
...@@ -3969,6 +3970,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -3969,6 +3970,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
} }
<ClassDoc,Doc>{B}*{CMD}("brief"|"short") { <ClassDoc,Doc>{B}*{CMD}("brief"|"short") {
lastBriefContext=YY_START; lastBriefContext=YY_START;
current->briefFile = yyFileName;
current->briefLine = yyLineNr;
BEGIN( ClassDocBrief ); BEGIN( ClassDocBrief );
} }
<ClassDoc>{B}*"\\inherit"{B}+ { BEGIN( DocBaseClass ); } <ClassDoc>{B}*"\\inherit"{B}+ { BEGIN( DocBaseClass ); }
...@@ -4306,6 +4309,12 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -4306,6 +4309,12 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
} }
} }
} }
<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc,CopyArgComment>{CMD}{CMD}[a-z_A-Z][a-z_A-Z0-9]* { /* escaped command */
if (YY_START==CopyArgComment)
fullArgString+=yytext;
else
current->doc+=yytext;
}
<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc,CopyArgComment>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { <Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc,CopyArgComment>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
bool handled=FALSE; bool handled=FALSE;
if ( useOverrideCommands) if ( useOverrideCommands)
...@@ -4370,6 +4379,12 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -4370,6 +4379,12 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->brief+=yytext; current->brief+=yytext;
} }
<LineDoc,AfterDocLine,CopyArgCommentLine>{CMD}("brief"|"short") {} <LineDoc,AfterDocLine,CopyArgCommentLine>{CMD}("brief"|"short") {}
<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine,CopyArgCommentLine>{CMD}{CMD}[a-z_A-Z][a-z_A-Z0-9]* { /* escaped command */
if (YY_START==CopyArgCommentLine)
fullArgString+=yytext;
else
current->brief+=yytext;
}
<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine,CopyArgCommentLine>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { <JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine,CopyArgCommentLine>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
QCString *pValue=Doxygen::aliasDict[yytext+1]; QCString *pValue=Doxygen::aliasDict[yytext+1];
if (pValue) if (pValue)
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include "classdef.h" #include "classdef.h"
#include "filedef.h" #include "filedef.h"
#include "doxygen.h" #include "doxygen.h"
#include "doc.h"
#include "outputlist.h" #include "outputlist.h"
#include "defargs.h" #include "defargs.h"
#include "language.h" #include "language.h"
...@@ -853,7 +852,7 @@ void writeExample(OutputList &ol,ExampleSDict *ed) ...@@ -853,7 +852,7 @@ void writeExample(OutputList &ol,ExampleSDict *ed)
while ((newIndex=marker.match(exampleLine,index,&matchLen))!=-1) while ((newIndex=marker.match(exampleLine,index,&matchLen))!=-1)
{ {
bool ok; bool ok;
parseText(ol,exampleLine.mid(index,newIndex-index)); ol.parseText(exampleLine.mid(index,newIndex-index));
uint entryIndex = exampleLine.mid(newIndex+1,matchLen-1).toUInt(&ok); uint entryIndex = exampleLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
Example *e=ed->at(entryIndex); Example *e=ed->at(entryIndex);
if (ok && e) if (ok && e)
...@@ -879,7 +878,7 @@ void writeExample(OutputList &ol,ExampleSDict *ed) ...@@ -879,7 +878,7 @@ void writeExample(OutputList &ol,ExampleSDict *ed)
} }
index=newIndex+matchLen; index=newIndex+matchLen;
} }
parseText(ol,exampleLine.right(exampleLine.length()-index)); ol.parseText(exampleLine.right(exampleLine.length()-index));
ol.writeString("."); ol.writeString(".");
} }
...@@ -2292,6 +2291,8 @@ bool resolveRef(/* in */ const char *scName, ...@@ -2292,6 +2291,8 @@ bool resolveRef(/* in */ const char *scName,
QCString tsName = name; QCString tsName = name;
bool memberScopeFirst = tsName.find('#')!=-1; bool memberScopeFirst = tsName.find('#')!=-1;
QCString fullName = substitute(tsName,"#","::"); QCString fullName = substitute(tsName,"#","::");
fullName = substitute(fullName,".","::");
int scopePos=fullName.findRev("::"); int scopePos=fullName.findRev("::");
int bracePos=fullName.findRev('('); // reverse is needed for operator()(...) int bracePos=fullName.findRev('('); // reverse is needed for operator()(...)
...@@ -2309,10 +2310,10 @@ bool resolveRef(/* in */ const char *scName, ...@@ -2309,10 +2310,10 @@ bool resolveRef(/* in */ const char *scName,
return FALSE; return FALSE;
} }
//printf("scName=%s tmpName=%s\n",scName,tmpName.data()); //printf("scName=%s name=%s\n",scName,fullName.data());
// check if this is a class or namespace reference // check if this is a class or namespace reference
if (scName!=fullName && getScopeDefs(scName,name,cd,nd)) if (scName!=fullName && getScopeDefs(scName,fullName,cd,nd))
{ {
if (cd) // scope matches that of a class if (cd) // scope matches that of a class
{ {
...@@ -2425,6 +2426,7 @@ bool generateRef(OutputDocInterface &od,const char *scName, ...@@ -2425,6 +2426,7 @@ bool generateRef(OutputDocInterface &od,const char *scName,
if (linkText.isEmpty()) if (linkText.isEmpty())
{ {
linkText=substitute(name,"#","::"); linkText=substitute(name,"#","::");
linkText=substitute(linkText,".","::");
// strip :: prefix if present // strip :: prefix if present
if (linkText.at(0)==':' && linkText.at(1)==':') if (linkText.at(0)==':' && linkText.at(1)==':')
{ {
...@@ -2550,6 +2552,7 @@ bool generateLink(OutputDocInterface &od,const char *clName, ...@@ -2550,6 +2552,7 @@ bool generateLink(OutputDocInterface &od,const char *clName,
if (linkText.isEmpty()) if (linkText.isEmpty())
{ {
linkText=substitute(lr,"#","::"); linkText=substitute(lr,"#","::");
linkText=substitute(linkText,".","::");
// strip :: prefix if present // strip :: prefix if present
if (linkText.at(0)==':' && linkText.at(1)==':') if (linkText.at(0)==':' && linkText.at(1)==':')
{ {
......
...@@ -148,7 +148,7 @@ void XmlDocVisitor::visit(DocVerbatim *s) ...@@ -148,7 +148,7 @@ void XmlDocVisitor::visit(DocVerbatim *s)
{ {
case DocVerbatim::Code: // fall though case DocVerbatim::Code: // fall though
m_t << "<programlisting>"; m_t << "<programlisting>";
parseCode(m_ci,s->context(),s->text().latin1(),FALSE,0); parseCode(m_ci,s->context(),s->text().latin1(),s->isExample(),s->exampleFile());
m_t << "</programlisting>"; m_t << "</programlisting>";
break; break;
case DocVerbatim::Verbatim: case DocVerbatim::Verbatim:
...@@ -182,7 +182,7 @@ void XmlDocVisitor::visit(DocInclude *inc) ...@@ -182,7 +182,7 @@ void XmlDocVisitor::visit(DocInclude *inc)
{ {
case DocInclude::Include: case DocInclude::Include:
m_t << "<programlisting>"; m_t << "<programlisting>";
parseCode(m_ci,inc->context(),inc->text().latin1(),FALSE,0); parseCode(m_ci,inc->context(),inc->text().latin1(),inc->isExample(),inc->exampleFile());
m_t << "</programlisting>"; m_t << "</programlisting>";
break; break;
case DocInclude::DontInclude: case DocInclude::DontInclude:
...@@ -211,7 +211,7 @@ void XmlDocVisitor::visit(DocIncOperator *op) ...@@ -211,7 +211,7 @@ void XmlDocVisitor::visit(DocIncOperator *op)
} }
if (op->type()!=DocIncOperator::Skip) if (op->type()!=DocIncOperator::Skip)
{ {
parseCode(m_ci,op->context(),op->text().latin1(),FALSE,0); parseCode(m_ci,op->context(),op->text().latin1(),op->isExample(),op->exampleFile());
} }
if (op->isLast()) if (op->isLast())
{ {
...@@ -302,7 +302,7 @@ void XmlDocVisitor::visitPost(DocRoot *) ...@@ -302,7 +302,7 @@ void XmlDocVisitor::visitPost(DocRoot *)
void XmlDocVisitor::visitPre(DocSimpleSect *s) void XmlDocVisitor::visitPre(DocSimpleSect *s)
{ {
m_t << "<simplesect kind=\">"; m_t << "<simplesect kind=\"";
switch(s->type()) switch(s->type())
{ {
case DocSimpleSect::See: case DocSimpleSect::See:
...@@ -701,6 +701,14 @@ void XmlDocVisitor::visitPost(DocCopy *) ...@@ -701,6 +701,14 @@ void XmlDocVisitor::visitPost(DocCopy *)
{ {
} }
void XmlDocVisitor::visitPre(DocText *)
{
}
void XmlDocVisitor::visitPost(DocText *)
{
}
void XmlDocVisitor::filter(const char *str) void XmlDocVisitor::filter(const char *str)
{ {
if (str==0) return; if (str==0) return;
......
...@@ -122,6 +122,8 @@ class XmlDocVisitor : public DocVisitor ...@@ -122,6 +122,8 @@ class XmlDocVisitor : public DocVisitor
void visitPost(DocInternalRef *); void visitPost(DocInternalRef *);
void visitPre(DocCopy *); void visitPre(DocCopy *);
void visitPost(DocCopy *); void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
private: private:
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "util.h" #include "util.h"
#include "defargs.h" #include "defargs.h"
#include "outputgen.h" #include "outputgen.h"
#include "doc.h"
#include "dot.h" #include "dot.h"
#include "code.h" #include "code.h"
#include "page.h" #include "page.h"
...@@ -1201,7 +1200,7 @@ static void writeXMLDocBlock(QTextStream &t, ...@@ -1201,7 +1200,7 @@ static void writeXMLDocBlock(QTextStream &t,
QCString stext = text.stripWhiteSpace(); QCString stext = text.stripWhiteSpace();
if (stext.isEmpty()) return; if (stext.isEmpty()) return;
// convert the documentation string into an abstract syntax tree // convert the documentation string into an abstract syntax tree
DocNode *root = validatingParseDoc(fileName,lineNr,scope,md,stext); DocNode *root = validatingParseDoc(fileName,lineNr,scope,md,stext,FALSE);
// create a code generator // create a code generator
XMLCodeGenerator *xmlCodeGen = new XMLCodeGenerator(t); XMLCodeGenerator *xmlCodeGen = new XMLCodeGenerator(t);
// create a parse tree visitor for XML // create a parse tree visitor for XML
...@@ -1739,25 +1738,25 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti) ...@@ -1739,25 +1738,25 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
} }
generateXMLSection(cd,ti,t,&cd->pubTypes,"public-type"); generateXMLSection(cd,ti,t,&cd->pubTypes,"public-type");
generateXMLSection(cd,ti,t,&cd->pubMembers,"public-func"); generateXMLSection(cd,ti,t,&cd->pubMethods,"public-func");
generateXMLSection(cd,ti,t,&cd->pubAttribs,"public-attrib"); generateXMLSection(cd,ti,t,&cd->pubAttribs,"public-attrib");
generateXMLSection(cd,ti,t,&cd->pubSlots,"public-slot"); generateXMLSection(cd,ti,t,&cd->pubSlots,"public-slot");
generateXMLSection(cd,ti,t,&cd->signals,"signal"); generateXMLSection(cd,ti,t,&cd->signals,"signal");
generateXMLSection(cd,ti,t,&cd->dcopMethods,"dcop-func"); generateXMLSection(cd,ti,t,&cd->dcopMethods,"dcop-func");
generateXMLSection(cd,ti,t,&cd->properties,"property"); generateXMLSection(cd,ti,t,&cd->properties,"property");
generateXMLSection(cd,ti,t,&cd->pubStaticMembers,"public-static-func"); generateXMLSection(cd,ti,t,&cd->pubStaticMethods,"public-static-func");
generateXMLSection(cd,ti,t,&cd->pubStaticAttribs,"public-static-attrib"); generateXMLSection(cd,ti,t,&cd->pubStaticAttribs,"public-static-attrib");
generateXMLSection(cd,ti,t,&cd->proTypes,"protected-type"); generateXMLSection(cd,ti,t,&cd->proTypes,"protected-type");
generateXMLSection(cd,ti,t,&cd->proMembers,"protected-func"); generateXMLSection(cd,ti,t,&cd->proMethods,"protected-func");
generateXMLSection(cd,ti,t,&cd->proAttribs,"protected-attrib"); generateXMLSection(cd,ti,t,&cd->proAttribs,"protected-attrib");
generateXMLSection(cd,ti,t,&cd->proSlots,"protected-slot"); generateXMLSection(cd,ti,t,&cd->proSlots,"protected-slot");
generateXMLSection(cd,ti,t,&cd->proStaticMembers,"protected-static-func"); generateXMLSection(cd,ti,t,&cd->proStaticMethods,"protected-static-func");
generateXMLSection(cd,ti,t,&cd->proStaticAttribs,"protected-static-attrib"); generateXMLSection(cd,ti,t,&cd->proStaticAttribs,"protected-static-attrib");
generateXMLSection(cd,ti,t,&cd->priTypes,"private-type"); generateXMLSection(cd,ti,t,&cd->priTypes,"private-type");
generateXMLSection(cd,ti,t,&cd->priMembers,"private-func"); generateXMLSection(cd,ti,t,&cd->priMethods,"private-func");
generateXMLSection(cd,ti,t,&cd->priAttribs,"private-attrib"); generateXMLSection(cd,ti,t,&cd->priAttribs,"private-attrib");
generateXMLSection(cd,ti,t,&cd->priSlots,"private-slot"); generateXMLSection(cd,ti,t,&cd->priSlots,"private-slot");
generateXMLSection(cd,ti,t,&cd->priStaticMembers,"private-static-func"); generateXMLSection(cd,ti,t,&cd->priStaticMethods,"private-static-func");
generateXMLSection(cd,ti,t,&cd->priStaticAttribs,"private-static-attrib"); generateXMLSection(cd,ti,t,&cd->priStaticAttribs,"private-static-attrib");
generateXMLSection(cd,ti,t,&cd->friends,"friend"); generateXMLSection(cd,ti,t,&cd->friends,"friend");
generateXMLSection(cd,ti,t,&cd->related,"related"); generateXMLSection(cd,ti,t,&cd->related,"related");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment