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 diff is collapsed.
...@@ -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
......
This diff is collapsed.
...@@ -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);
}
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
......
This diff is collapsed.
...@@ -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:
......
This diff is collapsed.
...@@ -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 \
......
This diff is collapsed.
...@@ -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; }
......
This diff is collapsed.
/******************************************************************************
*
*
*
* 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