Commit eb9911da authored by dimitri's avatar dimitri

Release-1.2.18-20021006

parent 5ed55684
DOXYGEN Version 1.2.18-20020927
DOXYGEN Version 1.2.18-20021006
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.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
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
that the text fragments that doxygen generates can be produced in
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):
Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian,
Czech, Danish, Dutch, English, Finnish,
......
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.2.18_20020927
Version: 1.2.18_20021006
Release: 1
Epoch: 1
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
void writeDocumentationForInnerClasses(OutputList &ol);
void writeMemberList(OutputList &ol);
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
* this compound was found.
......@@ -203,12 +203,12 @@ class ClassDef : public Definition
QCString className() const;
/* member lists by protection */
MemberList pubMembers;
MemberList proMembers;
MemberList priMembers;
MemberList pubStaticMembers;
MemberList proStaticMembers;
MemberList priStaticMembers;
MemberList pubMethods;
MemberList proMethods;
MemberList priMethods;
MemberList pubStaticMethods;
MemberList proStaticMethods;
MemberList priStaticMethods;
MemberList pubSlots;
MemberList proSlots;
MemberList priSlots;
......
......@@ -20,7 +20,6 @@
#include "util.h"
#include "outputlist.h"
#include "language.h"
#include "doc.h"
#include "doxygen.h"
ClassList::ClassList() : QList<ClassDef>()
......@@ -79,11 +78,11 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f
ol.startMemberHeader();
if (header)
{
parseText(ol,header);
ol.parseText(header);
}
else
{
parseText(ol,theTranslator->trCompounds());
ol.parseText(theTranslator->trCompounds());
}
ol.endMemberHeader();
ol.startMemberList();
......@@ -117,7 +116,8 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f
if (!cd->briefDescription().isEmpty())
{
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")) ||
!cd->documentation().isEmpty())
{
......@@ -126,7 +126,7 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f
ol.endEmphasis();
ol.docify(" ");
ol.startTextLink(cd->getOutputFileBase(),"_details");
parseText(ol,theTranslator->trMore());
ol.parseText(theTranslator->trMore());
ol.endTextLink();
ol.startEmphasis();
ol.popGeneratorState();
......
......@@ -2191,6 +2191,18 @@ void Config::create()
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 ");
//-----------------------------------------------------------------------------------------------
cb = addBool(
......
......@@ -27,7 +27,6 @@
#include "util.h"
#include "defargs.h"
#include "outputgen.h"
#include "doc.h"
#include "dot.h"
#include "code.h"
......@@ -407,36 +406,36 @@ void generateDEFForClass(ClassDef *cd,QTextStream &t)
}
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->pubStaticMembers.count()+
cd->pubStaticAttribs.count()+cd->proTypes.count()+cd->proMembers.count()+
cd->proAttribs.count()+cd->proSlots.count()+cd->proStaticMembers.count()+
cd->proStaticAttribs.count()+cd->priTypes.count()+cd->priMembers.count()+
cd->priAttribs.count()+cd->priSlots.count()+cd->priStaticMembers.count()+
cd->pubStaticMethods.count()+
cd->pubStaticAttribs.count()+cd->proTypes.count()+cd->proMethods.count()+
cd->proAttribs.count()+cd->proSlots.count()+cd->proStaticMethods.count()+
cd->proStaticAttribs.count()+cd->priTypes.count()+cd->priMethods.count()+
cd->priAttribs.count()+cd->priSlots.count()+cd->priStaticMethods.count()+
cd->priStaticAttribs.count()+cd->friends.count()+cd->related.count();
if (numMembers>0)
{
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->pubSlots,"public-slot");
generateDEFClassSection(cd,t,&cd->signals,"signal");
generateDEFClassSection(cd,t,&cd->dcopMethods,"dcop-func");
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->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->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->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->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->friends,"signal");
generateDEFClassSection(cd,t,&cd->related,"related");
......
......@@ -24,7 +24,6 @@
#include "language.h"
#include "message.h"
#include "outputlist.h"
#include "doc.h"
#include "code.h"
#include "util.h"
#include "groupdef.h"
......@@ -55,6 +54,9 @@ Definition::Definition(const char *df,int dl,
m_partOfGroups=0;
m_specialListItems=0;
m_briefLine=1;
m_briefFile=(QCString)"<"+name+">";
m_docLine=1;
m_docFile=(QCString)"<"+name+">";
}
Definition::~Definition()
......@@ -69,6 +71,7 @@ Definition::~Definition()
void Definition::addSectionsToDefinition(QList<QCString> *anchorList)
{
if (!anchorList) return;
//printf("%s: addSectionsToDefinition(%d)\n",name().data(),anchorList->count());
QCString *s=anchorList->first();
while (s)
{
......@@ -87,6 +90,10 @@ void Definition::addSectionsToDefinition(QList<QCString> *anchorList)
}
si->definition = this;
}
else
{
//printf("Section `%s' not found!\n",s->data());
}
s=anchorList->next();
}
}
......@@ -95,12 +102,14 @@ void Definition::writeDocAnchorsToTagFile()
{
if (!Config_getString("GENERATE_TAGFILE").isEmpty() && m_sectionDict)
{
//printf("%s: writeDocAnchors(%d)\n",name().data(),m_sectionDict->count());
QDictIterator<SectionInfo> sdi(*m_sectionDict);
SectionInfo *si;
for (;(si=sdi.current());++sdi)
{
if (!si->generated)
{
//printf("write an entry!\n");
if (definitionType()==TypeMember) Doxygen::tagFile << " ";
Doxygen::tagFile << " <docanchor>" << si->label << "</docanchor>" << endl;
}
......@@ -265,7 +274,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
if (lineMarkerPos<fileMarkerPos) // line marker before file marker
{
// write text left from linePos marker
parseText(ol,refText.left(lineMarkerPos));
ol.parseText(refText.left(lineMarkerPos));
ol.disableAllBut(OutputGenerator::Html);
// write line link (HTML only)
ol.writeObjectLink(0,m_bodyDef->getSourceFileBase(),
......@@ -277,7 +286,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
ol.enableAll();
// write text between markers
parseText(ol,refText.mid(lineMarkerPos+2,
ol.parseText(refText.mid(lineMarkerPos+2,
fileMarkerPos-lineMarkerPos-2));
ol.disableAllBut(OutputGenerator::Html);
......@@ -291,13 +300,13 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
ol.enableAll();
// write text right from file marker
parseText(ol,refText.right(
ol.parseText(refText.right(
refText.length()-fileMarkerPos-2));
}
else // file marker before line marker
{
// write text left from file marker
parseText(ol,refText.left(fileMarkerPos));
ol.parseText(refText.left(fileMarkerPos));
ol.disableAllBut(OutputGenerator::Html);
// write file link (HTML only)
ol.writeObjectLink(0,m_bodyDef->getSourceFileBase(),
......@@ -309,7 +318,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
ol.enableAll();
// write text between markers
parseText(ol,refText.mid(fileMarkerPos+2,
ol.parseText(refText.mid(fileMarkerPos+2,
lineMarkerPos-fileMarkerPos-2));
ol.disableAllBut(OutputGenerator::Html);
......@@ -323,7 +332,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
ol.enableAll();
// write text right from linePos marker
parseText(ol,refText.right(
ol.parseText(refText.right(
refText.length()-lineMarkerPos-2));
}
}
......@@ -377,7 +386,7 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName,
if (Config_getBool("SOURCE_BROWSER") && members)
{
ol.newParagraph();
parseText(ol,text);
ol.parseText(text);
ol.docify(" ");
QCString ldefLine=theTranslator->trWriteList(members->count());
......@@ -388,7 +397,7 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName,
while ((newIndex=marker.match(ldefLine,index,&matchLen))!=-1)
{
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);
MemberDef *md=members->at(entryIndex);
if (ok && md)
......@@ -452,7 +461,7 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName,
}
index=newIndex+matchLen;
}
parseText(ol,ldefLine.right(ldefLine.length()-index));
ol.parseText(ldefLine.right(ldefLine.length()-index));
ol.writeString(".");
}
ol.popGeneratorState();
......
......@@ -347,7 +347,7 @@ static void includeFile(OutputDocInterface &od,const char *fileName,bool quiet)
FileDef *fd;
if ((fd=findFileDef(Doxygen::exampleNameDict,fileName,ambig)))
{
currentIncludeFile=fileToString(fd->absFilePath());
currentIncludeFile=fileToString(fd->absFilePath(),Config_getBool("FILTER_SOURCE_FILES"));
includeFileOffset=0;
includeFileLength=currentIncludeFile.length();
OutputDocInterface *codeFrag = od.clone();
......@@ -384,7 +384,7 @@ static void verbIncludeFile(OutputDocInterface &od,const char *name)
if ((fd=findFileDef(Doxygen::exampleNameDict,name,ambig)))
{
od.startCodeFragment();
od.codify(fileToString(fd->absFilePath())+"\n");
od.codify(fileToString(fd->absFilePath(),Config_getBool("FILTER_SOURCE_FILES"))+"\n");
od.endCodeFragment();
}
else if (ambig)
......@@ -2959,7 +2959,7 @@ void parseDoc(OutputDocInterface &od,const char *fileName,int startLine,
if (Debug::isFlagSet(Debug::Validate))
{
od.parseDoc(fileName,startLine,clName,md,docStr);
od.parseDoc(fileName,startLine,clName,md,docStr,FALSE);
}
else
{
......@@ -3029,15 +3029,22 @@ void parseDoc(OutputDocInterface &od,const char *fileName,int startLine,
void parseText(OutputDocInterface &od,const QCString &txtString)
{
if (txtString.isEmpty()) return;
inputString = txtString;
outDoc = od.clone();
inputPosition = 0;
docYYrestart( docYYin );
BEGIN( Text );
docYYlex();
od.append(outDoc);
delete outDoc; outDoc=0;
return;
if (Debug::isFlagSet(Debug::Validate))
{
od.parseText(txtString);
}
else
{
inputString = txtString;
outDoc = od.clone();
inputPosition = 0;
docYYrestart( docYYin );
BEGIN( Text );
docYYlex();
od.append(outDoc);
delete outDoc; outDoc=0;
return;
}
}
//----------------------------------------------------------------------------
......@@ -3045,12 +3052,19 @@ void parseText(OutputDocInterface &od,const QCString &txtString)
void parseExample(OutputDocInterface &od,const QCString &docString,
const char *fileName)
{
initParser();
initParseCodeContext();
exampleDoc=TRUE; // cross reference with member docs
exampleName=fileName;
strcpy(yyFileName,fileName);
parseDocument(od,docString);
if (Debug::isFlagSet(Debug::Validate))
{
od.parseDoc(fileName,/*startLine*/1,/*clName*/0,/*md*/0,docString,TRUE);
}
else
{
initParser();
initParseCodeContext();
exampleDoc=TRUE; // cross reference with member docs
exampleName=fileName;
strcpy(yyFileName,fileName);
parseDocument(od,docString);
}
}
//----------------------------------------------------------------------------
......
This diff is collapsed.
......@@ -34,17 +34,26 @@ class MemberDef;
//---------------------------------------------------------------------------
/*! 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 context Class or namespace in which of the item to which this
* block belongs.
* @param md Member definition to which the documentation belongs.
* Can be 0.
* @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
* pointer is handed over to the caller.
*/
DocNode *validatingParseDoc(const char *fileName,int startLine,
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
Kind_ParamSect = 44,
Kind_ParamList = 45,
Kind_InternalRef = 46,
Kind_Copy = 47
Kind_Copy = 47,
Kind_Text = 48
};
/*! Destructor. */
virtual ~DocNode() {}
......@@ -306,20 +316,26 @@ class DocVerbatim : public DocNode
public:
enum Type { Code, HtmlOnly, LatexOnly, Verbatim };
DocVerbatim(DocNode *parent,const QString &context,
const QString &text, Type t) :
m_parent(parent), m_context(context), m_text(text), m_type(t) {}
const QString &text, Type t,bool isExample,
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; }
Type type() const { return m_type; }
QString text() const { return m_text; }
QString context() const { return m_context; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); }
bool isExample() const { return m_isExample; }
QString exampleFile() const { return m_exampleFile; }
private:
DocNode *m_parent;
QString m_context;
QString m_text;
Type m_type;
bool m_isExample;
QString m_exampleFile;
};
/*! @brief Node representing an included text block from file */
......@@ -328,15 +344,19 @@ class DocInclude : public DocNode
public:
enum Type { Include, DontInclude, VerbInclude, HtmlInclude };
DocInclude(DocNode *parent,const QString &file,
const QString context, Type t) :
m_parent(parent), m_file(file), m_context(context), m_type(t) {}
Kind kind() const { return Kind_Include; }
QString file() const { return m_file; }
Type type() const { return m_type; }
QString text() const { return m_text; }
QString context() const { return m_context; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); }
const QString context, 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; }
QString file() const { return m_file; }
Type type() const { return m_type; }
QString text() const { return m_text; }
QString context() const { return m_context; }
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 parse();
private:
......@@ -345,6 +365,8 @@ class DocInclude : public DocNode
QString m_context;
QString m_text;
Type m_type;
bool m_isExample;
QString m_exampleFile;
};
/*! @brief Node representing a include/dontinclude operator block */
......@@ -353,21 +375,24 @@ class DocIncOperator : public DocNode
public:
enum Type { Line, SkipLine, Skip, Until };
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_isFirst(FALSE), m_isLast(FALSE) {}
Kind kind() const { return Kind_IncOperator; }
Type type() const { return m_type; }
QString text() const { return m_text; }
QString pattern() const { return m_pattern; }
QString context() const { return m_context; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); }
void parse();
bool isFirst() const { return m_isFirst; }
bool isLast() const { return m_isLast; }
m_isFirst(FALSE), m_isLast(FALSE),
m_isExample(isExample), m_exampleFile(exampleFile) {}
Kind kind() const { return Kind_IncOperator; }
Type type() const { return m_type; }
QString text() const { return m_text; }
QString pattern() const { return m_pattern; }
QString context() const { return m_context; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); }
bool isFirst() const { return m_isFirst; }
bool isLast() const { return m_isLast; }
void markFirst(bool v=TRUE) { m_isFirst = v; }
void markLast(bool v=TRUE) { m_isLast = v; }
bool isExample() const { return m_isExample; }
QString exampleFile() const { return m_exampleFile; }
void parse();
private:
DocNode *m_parent;
......@@ -377,6 +402,8 @@ class DocIncOperator : public DocNode
QString m_context;
bool m_isFirst;
bool m_isLast;
bool m_isExample;
QString m_exampleFile;
};
/*! @brief Node representing an item of a cross-referenced list */
......@@ -886,7 +913,7 @@ class DocParamList : public DocNode
{
public:
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); }
virtual ~DocParamList()
{ delete m_paragraph; }
......@@ -895,6 +922,10 @@ class DocParamList : public DocNode
DocNode *parent() const { return m_parent; }
const QStrList &parameters() { return m_params; }
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)
{
v->visitPre(this);
......@@ -907,18 +938,21 @@ class DocParamList : public DocNode
DocPara * m_paragraph;
QStrList m_params;
DocParamSect::Type m_type;
bool m_isFirst;
bool m_isLast;
};
/*! @brief Node representing an item of a auto list */
class DocAutoListItem : public DocNode
{
public:
DocAutoListItem(DocNode *parent) : m_parent(parent)
DocAutoListItem(DocNode *parent,int num) : m_parent(parent), m_itemNum(num)
{ m_paragraph=new DocPara(this); }
virtual ~DocAutoListItem() { delete m_paragraph; }
int parse();
Kind kind() const { return Kind_AutoListItem; }
DocNode *parent() const { return m_parent; }
int itemNumber() const { return m_itemNum; }
void accept(DocVisitor *v)
{
v->visitPre(this);
......@@ -928,6 +962,7 @@ class DocAutoListItem : public DocNode
private:
DocNode *m_parent;
DocPara *m_paragraph;
int m_itemNum;
};
/*! @brief Node representing a simple list item */
......@@ -956,17 +991,19 @@ class DocSimpleListItem : public DocNode
class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode
{
public:
DocHtmlListItem(DocNode *parent,const HtmlAttribList &attribs) :
m_parent(parent), m_attribs(attribs) {}
DocHtmlListItem(DocNode *parent,const HtmlAttribList &attribs,int num) :
m_parent(parent), m_attribs(attribs), m_itemNum(num) {}
int parse();
Kind kind() const { return Kind_HtmlListItem; }
int itemNumber() const { return m_itemNum; }
const HtmlAttribList &attribs() const { return m_attribs; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocHtmlListItem>::accept(this,v); }
private:
DocNode * m_parent;
DocNode * m_parent;
HtmlAttribList m_attribs;
int m_itemNum;
};
/*! @brief Node representing a Html description data */
......@@ -1107,6 +1144,16 @@ class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode
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 */
class DocRoot : public CompAccept<DocRoot>, public DocNode
......
......@@ -118,5 +118,6 @@ void doctokenizerYYsetStatePattern();
void doctokenizerYYsetStateLink();
void doctokenizerYYsetStateRef();
void doctokenizerYYsetStateInternalRef();
void doctokenizerYYsetStateText();
#endif
......@@ -264,6 +264,7 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
%x St_Ref
%x St_Ref2
%x St_IntRef
%x St_Text
%%
<St_Para>\r /* skip carriage return */
......@@ -349,17 +350,17 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
g_token->endTag = startNamePos==2;
return TK_HTMLTAG;
}
<St_Para>"&"{ID}";" { /* special symbol */
<St_Para,St_Text>"&"{ID}";" { /* special symbol */
g_token->name = yytext;
return TK_SYMBOL;
}
<St_Para>{LNKWORD1} |
<St_Para>{LNKWORD1}/[^a-z_A-Z0-9] |
<St_Para>{LNKWORD2} {
g_token->name = yytext;
return TK_LNKWORD;
}
<St_Para>{WORD1} |
<St_Para>{WORD2} { /* function call */
<St_Para,St_Text>{WORD1} |
<St_Para,St_Text>{WORD2} { /* function call */
g_token->name = yytext;
return TK_WORD;
......@@ -369,11 +370,15 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
*/
goto find_rule;
}
<St_Para>{BLANK}+ |
<St_Para>{BLANK}*\n{BLANK}* { /* white space */
<St_Para,St_Text>{BLANK}+ |
<St_Para,St_Text>{BLANK}*\n{BLANK}* { /* white space */
g_token->chars=yytext;
return TK_WHITESPACE;
}
<St_Text>[\\@<>&$#%~] {
g_token->name = yytext;
return TK_COMMAND;
}
<St_Para>({BLANK}*\n)+{BLANK}*\n {
/* start of a new paragraph */
return TK_NEWPARA;
......@@ -588,6 +593,11 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
<*>\n {
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);
}
......@@ -672,6 +682,11 @@ void doctokenizerYYsetStateInternalRef()
BEGIN(St_IntRef);
}
void doctokenizerYYsetStateText()
{
BEGIN(St_Text);
}
void doctokenizerYYcleanup()
{
yy_delete_buffer( YY_CURRENT_BUFFER );
......
......@@ -68,6 +68,7 @@ class DocParamSect;
class DocParamList;
class DocInternalRef;
class DocCopy;
class DocText;
/*! @brief Abstract visitor that participates in the visitor pattern.
*/
......@@ -164,6 +165,8 @@ class DocVisitor
virtual void visitPost(DocInternalRef *) = 0;
virtual void visitPre(DocCopy *) = 0;
virtual void visitPost(DocCopy *) = 0;
virtual void visitPre(DocText *) = 0;
virtual void visitPost(DocText *) = 0;
/*! @} */
};
......
......@@ -30,7 +30,6 @@
#include "version.h"
#include "doxygen.h"
#include "scanner.h"
#include "doc.h"
#include "entry.h"
#include "index.h"
#include "logos.h"
......@@ -56,6 +55,7 @@
#include "rtfgen.h"
#include "xmlgen.h"
#include "defgen.h"
#include "perlmodgen.h"
#include "reflist.h"
#include "page.h"
//#include "packagedef.h"
......@@ -1112,6 +1112,7 @@ static void findUsingDeclarations(Entry *root)
"<generated>",1,
root->name,ClassDef::Class);
Doxygen::hiddenClasses.append(root->name,usingCd);
usingCd->setClassIsArtificial();
}
// add the namespace the correct scope
......@@ -6020,7 +6021,7 @@ static void generatePageDocs()
{
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();
endFile(*outputList);
//outputList->enable(OutputGenerator::Man);
......@@ -6091,7 +6092,13 @@ static void generateExampleDocs()
startTitle(*outputList,n);
outputList->docify(pi->name);
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);
}
outputList->enable(OutputGenerator::Man);
......@@ -7809,13 +7816,13 @@ void generateOutput()
msg("Generating style sheet...\n");
outputList->writeStyleInfo(0); // write first part
outputList->disableAllBut(OutputGenerator::Latex);
parseText(*outputList,
outputList->parseText(
theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME"))
);
outputList->writeStyleInfo(1); // write second part
//parseText(*outputList,theTranslator->trWrittenBy());
outputList->writeStyleInfo(2); // write third part
parseText(*outputList,
outputList->parseText(
theTranslator->trGeneratedAt(dateToString(TRUE),Config_getString("PROJECT_NAME"))
);
outputList->writeStyleInfo(3); // write fourth part
......@@ -7879,6 +7886,11 @@ void generateOutput()
msg("Generating AutoGen DEF output...\n");
generateDEF();
}
if (Config_getBool("GENERATE_PERLMOD"))
{
msg("Generating PerlMod output...\n");
generatePerlMod();
}
if (Config_getBool("GENERATE_HTMLHELP") && !Config_getString("HHC_LOCATION").isEmpty())
{
msg("Running html help compiler...\n");
......
......@@ -19,7 +19,6 @@
#include "memberlist.h"
#include "classlist.h"
#include "filedef.h"
#include "doc.h"
#include "doxygen.h"
#include "memberdef.h"
#include "classdef.h"
......@@ -114,11 +113,11 @@ void FileDef::writeDetailedDocumentation(OutputList &ol)
//if (latexOn) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState();
ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription());
ol.parseText(theTranslator->trDetailedDescription());
ol.endGroupHeader();
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") &&
!documentation().isEmpty())
......@@ -129,7 +128,7 @@ void FileDef::writeDetailedDocumentation(OutputList &ol)
{
//if (doc.at(dl-1)!='.' && doc.at(dl-1)!='!' && doc.at(dl-1)!='?')
// 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());
if (Config_getBool("SOURCE_BROWSER"))
......@@ -139,10 +138,10 @@ void FileDef::writeDetailedDocumentation(OutputList &ol)
int fileMarkerPos = refText.find("@0");
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(),
0,name());
parseText(ol,refText.right(
ol.parseText(refText.right(
refText.length()-fileMarkerPos-2)); // text right from marker 2
}
}
......@@ -167,7 +166,7 @@ void FileDef::writeDocumentation(OutputList &ol)
QCString pageTitle=name()+" File Reference";
startFile(ol,getOutputFileBase(),name(),pageTitle);
startTitle(ol,getOutputFileBase());
parseText(ol,theTranslator->trFileReference(docname));
ol.parseText(theTranslator->trFileReference(docname));
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),docName());
//ol.newParagraph();
......@@ -190,11 +189,11 @@ void FileDef::writeDocumentation(OutputList &ol)
}
else if (briefDescription())
{
parseDoc(ol,briefFile(),briefLine(),0,0,briefDescription());
ol.parseDoc(briefFile(),briefLine(),0,0,briefDescription(),FALSE);
ol.writeString(" \n");
ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(0,"_details");
parseText(ol,theTranslator->trMore());
ol.parseText(theTranslator->trMore());
ol.endTextLink();
ol.enableAll();
ol.disable(OutputGenerator::Man);
......@@ -288,7 +287,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.disable(OutputGenerator::Man);
ol.newParagraph();
ol.startInclDepGraph();
parseText(ol,theTranslator->trInclDepGraph(name()));
ol.parseText(theTranslator->trInclDepGraph(name()));
ol.endInclDepGraph(incDepGraph);
ol.enableAll();
}
......@@ -304,7 +303,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.disable(OutputGenerator::Man);
ol.newParagraph();
ol.startInclDepGraph();
parseText(ol,theTranslator->trInclByDepGraph());
ol.parseText(theTranslator->trInclByDepGraph());
ol.endInclDepGraph(incDepGraph);
ol.enableAll();
}
......@@ -317,7 +316,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html);
ol.newParagraph();
ol.startTextLink(includeName(),0);
parseText(ol,theTranslator->trGotoSourceCode());
ol.parseText(theTranslator->trGotoSourceCode());
ol.endTextLink();
ol.enableAll();
}
......@@ -338,7 +337,7 @@ void FileDef::writeDocumentation(OutputList &ol)
if (!found)
{
ol.startMemberHeader();
parseText(ol,theTranslator->trNamespaces());
ol.parseText(theTranslator->trNamespaces());
ol.endMemberHeader();
ol.startMemberList();
found=TRUE;
......@@ -418,9 +417,9 @@ void FileDef::writeDocumentation(OutputList &ol)
// write Author section (Man only)
ol.disableAllBut(OutputGenerator::Man);
ol.startGroupHeader();
parseText(ol,theTranslator->trAuthor(TRUE,TRUE));
ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader();
parseText(ol,theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
ol.enableAll();
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
......@@ -438,13 +437,13 @@ void FileDef::writeSource(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html);
startFile(ol,getSourceFileBase(),0,docname+" Source File");
startTitle(ol,0);
parseText(ol,docname);
ol.parseText(docname);
endTitle(ol,0,0);
if (isLinkable())
{
ol.startTextLink(getOutputFileBase(),0);
parseText(ol,theTranslator->trGotoDocumentation());
ol.parseText(theTranslator->trGotoDocumentation());
ol.endTextLink();
}
......
......@@ -171,7 +171,7 @@ void FormulaList::generateBitmaps(const char *path)
// Then we run ghostscript to convert the postscript to a pixmap
// The pixmap is a truecolor image, where only black and white are
// used.
#ifdef _WIN32
#if defined(_WIN32) && !defined(__CYGWIN__)
char gsArgs[256];
sprintf(gsArgs,"-q -g%dx%d -r%dx%dx -sDEVICE=ppmraw "
"-sOutputFile=%s.pnm -dNOPAUSE -dBATCH -- %s.ps",
......
......@@ -22,7 +22,6 @@
#include "filedef.h"
#include "classlist.h"
#include "outputlist.h"
#include "doc.h"
#include "namespacedef.h"
#include "language.h"
#include "util.h"
......@@ -359,13 +358,13 @@ void GroupDef::writeDetailedDocumentation(OutputList &ol)
ol.writeAnchor(0,"_details");
ol.popGeneratorState();
ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription());
ol.parseText(theTranslator->trDetailedDescription());
ol.endGroupHeader();
// repeat brief description
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{
parseDoc(ol,briefFile(),briefLine(),name(),0,briefDescription());
ol.parseDoc(briefFile(),briefLine(),name(),0,briefDescription(),FALSE);
ol.newParagraph();
}
}
......@@ -373,7 +372,7 @@ void GroupDef::writeDetailedDocumentation(OutputList &ol)
// write documentation
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)
}
else if (!briefDescription().isEmpty())
{
parseDoc(ol,briefFile(),briefLine(),name(),0,briefDescription());
ol.parseDoc(briefFile(),briefLine(),name(),0,briefDescription(),FALSE);
ol.writeString(" \n");
ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF);
ol.startTextLink(0,"_details");
parseText(ol,theTranslator->trMore());
ol.parseText(theTranslator->trMore());
ol.endTextLink();
//ol.enable(OutputGenerator::Latex);
ol.popGeneratorState();
......@@ -422,7 +421,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (fileList->count()>0)
{
ol.startMemberHeader();
parseText(ol,theTranslator->trFile(TRUE,FALSE));
ol.parseText(theTranslator->trFile(TRUE,FALSE));
ol.endMemberHeader();
ol.startMemberList();
FileDef *fd=fileList->first();
......@@ -440,7 +439,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription();
parseDoc(ol,briefFile(),briefLine(),0,0,fd->briefDescription());
ol.parseDoc(briefFile(),briefLine(),0,0,fd->briefDescription(),FALSE);
ol.endMemberDescription();
ol.newParagraph();
}
......@@ -453,7 +452,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (namespaceList->count()>0)
{
ol.startMemberHeader();
parseText(ol,theTranslator->trNamespaces());
ol.parseText(theTranslator->trNamespaces());
ol.endMemberHeader();
ol.startMemberList();
NamespaceDef *nd=namespaceList->first();
......@@ -471,7 +470,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription();
parseDoc(ol,briefFile(),briefLine(),0,0,nd->briefDescription());
ol.parseDoc(briefFile(),briefLine(),0,0,nd->briefDescription(),FALSE);
ol.endMemberDescription();
ol.newParagraph();
}
......@@ -484,7 +483,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (groupList->count()>0)
{
ol.startMemberHeader();
parseText(ol,theTranslator->trModules());
ol.parseText(theTranslator->trModules());
ol.endMemberHeader();
ol.startMemberList();
GroupDef *gd=groupList->first();
......@@ -501,7 +500,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (!gd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription();
parseDoc(ol,briefFile(),briefLine(),0,0,gd->briefDescription());
ol.parseDoc(briefFile(),briefLine(),0,0,gd->briefDescription(),FALSE);
ol.endMemberDescription();
ol.newParagraph();
}
......@@ -561,7 +560,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.endSection(si->label,SectionInfo::Subsection);
}
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();
}
}
......
......@@ -32,8 +32,6 @@ static QString htmlAttribsToString(const HtmlAttribList &attribs)
HtmlAttrib *att;
for (li.toFirst();(att=li.current());++li)
{
printf("Found attion name=`%s' value=`%s'\n",
att->name.data(),att->value.data());
result+=" ";
result+=att->name;
if (!att->value.isEmpty()) result+="=\""+att->value+"\"";
......@@ -165,7 +163,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
{
case DocVerbatim::Code: // fall though
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>";
break;
case DocVerbatim::Verbatim:
......@@ -195,7 +193,7 @@ void HtmlDocVisitor::visit(DocInclude *inc)
{
case DocInclude::Include:
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>";
break;
case DocInclude::DontInclude:
......@@ -222,7 +220,7 @@ void HtmlDocVisitor::visit(DocIncOperator *op)
}
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())
{
......@@ -786,6 +784,14 @@ void HtmlDocVisitor::visitPost(DocCopy *)
{
}
void HtmlDocVisitor::visitPre(DocText *)
{
}
void HtmlDocVisitor::visitPost(DocText *)
{
}
void HtmlDocVisitor::filter(const char *str)
{
if (str==0) return;
......
......@@ -122,6 +122,8 @@ class HtmlDocVisitor : public DocVisitor
void visitPost(DocInternalRef *);
void visitPre(DocCopy *);
void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
private:
......
This diff is collapsed.
......@@ -211,7 +211,7 @@ void LatexDocVisitor::visit(DocVerbatim *s)
{
case DocVerbatim::Code: // fall though
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;
break;
case DocVerbatim::Verbatim:
......@@ -246,7 +246,7 @@ void LatexDocVisitor::visit(DocInclude *inc)
{
case DocInclude::Include:
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;
break;
case DocInclude::DontInclude:
......@@ -272,7 +272,7 @@ void LatexDocVisitor::visit(DocIncOperator *op)
}
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())
{
......@@ -878,6 +878,14 @@ void LatexDocVisitor::visitPost(DocCopy *)
{
}
void LatexDocVisitor::visitPre(DocText *)
{
}
void LatexDocVisitor::visitPost(DocText *)
{
}
void LatexDocVisitor::filter(const char *str)
{
filterLatexString(m_t,str,FALSE,m_insidePre);
......
......@@ -122,6 +122,8 @@ class LatexDocVisitor : public DocVisitor
void visitPost(DocInternalRef *);
void visitPre(DocCopy *);
void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
private:
......
......@@ -32,7 +32,6 @@ HEADERS = bufstr.h \
define.h \
definition.h \
diagram.h \
doc.h \
docparser.h \
doctokenizer.h \
docvisitor.h \
......@@ -66,8 +65,8 @@ HEADERS = bufstr.h \
namespacedef.h \
outputgen.h \
outputlist.h \
packagedef.h \
page.h \
perlmodgen.h \
pngenc.h \
pre.h \
printdocvisitor.h \
......@@ -133,7 +132,6 @@ SOURCES = ce_lex.cpp \
define.cpp \
definition.cpp \
diagram.cpp \
doc.cpp \
docparser.cpp \
doctokenizer.cpp \
dot.cpp \
......@@ -164,7 +162,7 @@ SOURCES = ce_lex.cpp \
namespacedef.cpp \
outputgen.cpp \
outputlist.cpp \
packagedef.cpp \
perlmodgen.cpp \
pngenc.cpp \
pre.cpp \
reflist.cpp \
......
This diff is collapsed.
......@@ -122,6 +122,8 @@ class ManDocVisitor : public DocVisitor
void visitPost(DocInternalRef *);
void visitPre(DocCopy *);
void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
private:
......@@ -139,6 +141,8 @@ class ManDocVisitor : public DocVisitor
BaseCodeDocInterface &m_ci;
bool m_insidePre;
bool m_hide;
bool m_firstCol;
int m_indent;
};
#endif
......@@ -619,5 +619,6 @@ void ManGenerator::printDoc(DocNode *n)
ManDocVisitor *visitor = new ManDocVisitor(t,*this);
n->accept(visitor);
delete visitor;
t << endl;
}
......@@ -28,7 +28,6 @@
#include "outputlist.h"
#include "example.h"
#include "membergroup.h"
#include "doc.h"
#include "groupdef.h"
#include "defargs.h"
//#include "xml.h"
......@@ -904,7 +903,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
!annMemb)
{
ol.startMemberDescription();
parseDoc(ol,briefFile(),briefLine(),cname,this,briefDescription());
ol.parseDoc(briefFile(),briefLine(),cname,this,briefDescription(),FALSE);
if (detailsVisible)
{
ol.pushGeneratorState();
......@@ -1225,9 +1224,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
//printf("md=%s initLines=%d init=`%s'\n",name().data(),initLines,init.data());
ol.startBold();
if (mtype==Define)
parseText(ol,theTranslator->trDefineValue());
ol.parseText(theTranslator->trDefineValue());
else
parseText(ol,theTranslator->trInitialValue());
ol.parseText(theTranslator->trInitialValue());
ol.endBold();
initParseCodeContext();
ol.startCodeFragment();
......@@ -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();
}
/* write detailed description */
if (!detailed.isEmpty())
{
parseDoc(ol,docFile(),docLine(),scopeName,this,detailed+"\n");
ol.parseDoc(docFile(),docLine(),scopeName,this,detailed+"\n",FALSE);
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::RTF);
ol.newParagraph();
......@@ -1282,7 +1281,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.docify(a->name);
ol.endDescTableTitle();
ol.startDescTableData();
parseDoc(ol,docFile(),docLine(),scopeName,this,a->docs+"\n");
ol.parseDoc(docFile(),docLine(),scopeName,this,a->docs+"\n",FALSE);
ol.endDescTableData();
}
}
......@@ -1333,7 +1332,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
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();
}
if (!fmd->briefDescription().isEmpty() &&
......@@ -1343,7 +1342,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
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();
}
......@@ -1380,7 +1379,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
int markerPos = reimplFromLine.find("@0");
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
{
Definition *bd=bmd->group;
......@@ -1404,7 +1403,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
writePageRef(ol,bcd->getOutputFileBase(),0);
}
}
parseText(ol,reimplFromLine.right(
ol.parseText(reimplFromLine.right(
reimplFromLine.length()-markerPos-2)); // text right from marker
ol.disableAllBut(OutputGenerator::RTF);
......@@ -1456,7 +1455,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// now replace all markers in reimplInLine with links to the classes
while ((newIndex=marker.match(reimplInLine,index,&matchLen))!=-1)
{
parseText(ol,reimplInLine.mid(index,newIndex-index));
ol.parseText(reimplInLine.mid(index,newIndex-index));
bool ok;
uint entryIndex = reimplInLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
//bmd=bml->at(entryIndex);
......@@ -1490,7 +1489,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
++mli;
index=newIndex+matchLen;
}
parseText(ol,reimplInLine.right(reimplInLine.length()-index));
ol.parseText(reimplInLine.right(reimplInLine.length()-index));
ol.disableAllBut(OutputGenerator::RTF);
ol.newParagraph();
ol.enableAll();
......
......@@ -24,7 +24,6 @@
#include "language.h"
#include "doxygen.h"
#include "outputlist.h"
#include "doc.h"
#include "groupdef.h"
MemberList::MemberList() : QList<MemberDef>()
......@@ -285,7 +284,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
if (fmd->hasOneLineInitializer()) // enum value has initializer
{
typeDecl.writeString(" = ");
parseText(typeDecl,fmd->initializer());
typeDecl.parseText(fmd->initializer());
}
}
......@@ -341,10 +340,11 @@ void MemberList::writePlainDeclarations(OutputList &ol,
if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription();
parseDoc(ol,
ol.parseDoc(
md->briefFile(),md->briefLine(),
cd?cd->name().data():0,md,
md->briefDescription()
md->briefDescription(),
FALSE
);
if (md->isDetailedSectionLinkable())
{
......@@ -360,7 +360,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
{
ol.startTextLink(0,md->anchor());
}
parseText(ol,theTranslator->trMore());
ol.parseText(theTranslator->trMore());
ol.endTextLink();
ol.startEmphasis();
ol.enableAll();
......@@ -418,14 +418,14 @@ void MemberList::writeDeclarations(OutputList &ol,
if (title)
{
ol.startMemberHeader();
parseText(ol,title);
ol.parseText(title);
ol.endMemberHeader();
}
if (subtitle && subtitle[0]!=0)
{
//printf("subtitle=`%s'\n",subtitle);
ol.startMemberSubtitle();
parseDoc(ol,"<generated>",1,0,0,subtitle);
ol.parseDoc("<generated>",1,0,0,subtitle,FALSE);
ol.endMemberSubtitle();
}
......@@ -442,14 +442,14 @@ void MemberList::writeDeclarations(OutputList &ol,
ol.startMemberGroupHeader(hasHeader);
if (hasHeader)
{
parseText(ol,mg->header());
ol.parseText(mg->header());
}
ol.endMemberGroupHeader();
if (!mg->documentation().isEmpty())
{
//printf("Member group has docs!\n");
ol.startMemberGroupDocs();
parseDoc(ol,"<generated>",1,0,0,mg->documentation()+"\n");
ol.parseDoc("<generated>",1,0,0,mg->documentation()+"\n",FALSE);
ol.endMemberGroupDocs();
}
ol.startMemberGroup();
......@@ -476,7 +476,7 @@ void MemberList::writeDocumentation(OutputList &ol,
{
ol.writeRuler();
ol.startGroupHeader();
parseText(ol,title);
ol.parseText(title);
ol.endGroupHeader();
}
......
......@@ -19,7 +19,6 @@
#include "namespacedef.h"
#include "outputlist.h"
#include "util.h"
#include "doc.h"
#include "language.h"
#include "classdef.h"
#include "classlist.h"
......@@ -198,12 +197,12 @@ void NamespaceDef::writeDetailedDocumentation(OutputList &ol)
//if (latexOn) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState();
ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription());
ol.parseText(theTranslator->trDetailedDescription());
ol.endGroupHeader();
ol.startTextBlock();
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") &&
!documentation().isEmpty())
......@@ -212,7 +211,7 @@ void NamespaceDef::writeDetailedDocumentation(OutputList &ol)
}
if (!documentation().isEmpty())
{
parseDoc(ol,docFile(),docLine(),name(),0,documentation()+"\n");
ol.parseDoc(docFile(),docLine(),name(),0,documentation()+"\n",FALSE);
ol.newParagraph();
}
ol.endTextBlock();
......@@ -227,11 +226,11 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
//ol.docify(pageTitle);
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{
parseText(ol,theTranslator->trPackage(displayName()));
ol.parseText(theTranslator->trPackage(displayName()));
}
else
{
parseText(ol,theTranslator->trNamespaceReference(displayName()));
ol.parseText(theTranslator->trNamespaceReference(displayName()));
}
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),displayName());
......@@ -252,12 +251,12 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
}
else if (!briefDescription().isEmpty())
{
parseDoc(ol,briefFile(),briefLine(),name(),0,briefDescription());
ol.parseDoc(briefFile(),briefLine(),name(),0,briefDescription(),FALSE);
ol.writeString(" \n");
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(0,"_details");
parseText(ol,theTranslator->trMore());
ol.parseText(theTranslator->trMore());
ol.endTextLink();
ol.popGeneratorState();
}
......@@ -315,9 +314,9 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Man);
ol.startGroupHeader();
parseText(ol,theTranslator->trAuthor(TRUE,TRUE));
ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader();
parseText(ol,theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
......
......@@ -86,8 +86,8 @@ class BaseOutputDocInterface : public BaseCodeDocInterface
};
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
* Used for the bullet items.
......@@ -297,7 +297,7 @@ class BaseOutputDocInterface : public BaseCodeDocInterface
class OutputGenerator : public BaseOutputDocInterface
{
public:
enum OutputType { Html, Latex, Man, RTF, XML, DEF };
enum OutputType { Html, Latex, Man, RTF, XML, DEF, Perl };
OutputGenerator();
virtual ~OutputGenerator();
......
......@@ -193,7 +193,7 @@ void OutputList::popGeneratorState()
void OutputList::parseDoc(const char *fileName,int startLine,
const char * clName,MemberDef * md,
const QCString &docStr)
const QCString &docStr,bool isExample)
{
int count=0;
OutputGenerator *og=outputs->first();
......@@ -204,7 +204,31 @@ void OutputList::parseDoc(const char *fileName,int startLine,
}
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();
while (og)
......
......@@ -64,7 +64,9 @@ class OutputList : public OutputDocInterface
//////////////////////////////////////////////////
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()
{
......
......@@ -23,7 +23,6 @@
#include "outputlist.h"
#include "util.h"
#include "config.h"
#include "doc.h"
#include "language.h"
#include "doxygen.h"
......@@ -58,17 +57,15 @@ void PackageDef::writeDocumentation(OutputList &ol)
ol.docify(title);
endTitle(ol,getOutputFileBase(),title);
OutputList briefOutput(&ol);
if (!briefDescription().isEmpty())
{
parseDoc(briefOutput,briefFile(),briefLine(),name(),0,briefDescription());
ol+=briefOutput;
ol.parseDoc(briefFile(),briefLine(),name(),0,briefDescription(),FALSE);
ol.writeString(" \n");
ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF);
ol.startTextLink(0,"_details");
parseText(ol,theTranslator->trMore());
ol.parseText(theTranslator->trMore());
ol.endTextLink();
ol.popGeneratorState();
}
......@@ -101,20 +98,20 @@ void PackageDef::writeDocumentation(OutputList &ol)
ol.writeAnchor(0,"_details");
ol.popGeneratorState();
ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription());
ol.parseText(theTranslator->trDetailedDescription());
ol.endGroupHeader();
// repeat brief description
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{
ol+=briefOutput;
ol.parseDoc(briefFile(),briefLine(),name(),0,briefDescription(),FALSE);
ol.newParagraph();
}
// write documentation
if (!documentation().isEmpty())
{
parseDoc(ol,docFile(),docLine(),name(),0,documentation()+"\n");
ol.parseDoc(docFile(),docLine(),name(),0,documentation()+"\n",FALSE);
}
}
......
......@@ -85,7 +85,10 @@ class PageInfo
SectionInfo *si;
for (;(si=sdi.current());++sdi)
{
Doxygen::tagFile << " <docanchor>" << si->label << "</docanchor>" << endl;
if (!si->generated)
{
Doxygen::tagFile << " <docanchor>" << si->label << "</docanchor>" << endl;
}
}
}
}
......
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
indent_post();
printf("</copy>\n");
}
void visitPre(DocText *)
{
indent_pre();
printf("<text>\n");
}
void visitPost(DocText *)
{
indent_post();
printf("</text>\n");
}
private:
// helper functions
......
......@@ -271,7 +271,7 @@ void RTFDocVisitor::visit(DocVerbatim *s)
m_t << "{" << endl;
m_t << "\\par" << endl;
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 << "}" << endl;
break;
......@@ -321,7 +321,7 @@ void RTFDocVisitor::visit(DocInclude *inc)
m_t << "{" << endl;
m_t << "\\par" << endl;
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 << "}" << endl;
break;
......@@ -353,7 +353,7 @@ void RTFDocVisitor::visit(DocIncOperator *op)
}
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())
{
......@@ -989,6 +989,14 @@ void RTFDocVisitor::visitPost(DocCopy *)
{
}
void RTFDocVisitor::visitPre(DocText *)
{
}
void RTFDocVisitor::visitPost(DocText *)
{
}
static char* getMultiByte(int c)
{
static char s[10];
......
......@@ -122,6 +122,8 @@ class RTFDocVisitor : public DocVisitor
void visitPost(DocInternalRef *);
void visitPre(DocCopy *);
void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
private:
......
......@@ -2298,6 +2298,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN( ReadFuncArgType );
}
<CopyArgCommentLine>[^\\\@\n]+ { fullArgString+=yytext; }
<CopyArgCommentLine>. { fullArgString+=*yytext; }
<CopyArgComment>\n { fullArgString+=*yytext; yyLineNr++; }
<CopyArgComment>. { fullArgString+=*yytext; }
<ReadTempArgs>"<" {
......@@ -3969,6 +3970,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<ClassDoc,Doc>{B}*{CMD}("brief"|"short") {
lastBriefContext=YY_START;
current->briefFile = yyFileName;
current->briefLine = yyLineNr;
BEGIN( ClassDocBrief );
}
<ClassDoc>{B}*"\\inherit"{B}+ { BEGIN( DocBaseClass ); }
......@@ -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]* {
bool handled=FALSE;
if ( useOverrideCommands)
......@@ -4370,6 +4379,12 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->brief+=yytext;
}
<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]* {
QCString *pValue=Doxygen::aliasDict[yytext+1];
if (pValue)
......
......@@ -31,7 +31,6 @@
#include "classdef.h"
#include "filedef.h"
#include "doxygen.h"
#include "doc.h"
#include "outputlist.h"
#include "defargs.h"
#include "language.h"
......@@ -853,7 +852,7 @@ void writeExample(OutputList &ol,ExampleSDict *ed)
while ((newIndex=marker.match(exampleLine,index,&matchLen))!=-1)
{
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);
Example *e=ed->at(entryIndex);
if (ok && e)
......@@ -879,7 +878,7 @@ void writeExample(OutputList &ol,ExampleSDict *ed)
}
index=newIndex+matchLen;
}
parseText(ol,exampleLine.right(exampleLine.length()-index));
ol.parseText(exampleLine.right(exampleLine.length()-index));
ol.writeString(".");
}
......@@ -2292,6 +2291,8 @@ bool resolveRef(/* in */ const char *scName,
QCString tsName = name;
bool memberScopeFirst = tsName.find('#')!=-1;
QCString fullName = substitute(tsName,"#","::");
fullName = substitute(fullName,".","::");
int scopePos=fullName.findRev("::");
int bracePos=fullName.findRev('('); // reverse is needed for operator()(...)
......@@ -2309,10 +2310,10 @@ bool resolveRef(/* in */ const char *scName,
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
if (scName!=fullName && getScopeDefs(scName,name,cd,nd))
if (scName!=fullName && getScopeDefs(scName,fullName,cd,nd))
{
if (cd) // scope matches that of a class
{
......@@ -2425,6 +2426,7 @@ bool generateRef(OutputDocInterface &od,const char *scName,
if (linkText.isEmpty())
{
linkText=substitute(name,"#","::");
linkText=substitute(linkText,".","::");
// strip :: prefix if present
if (linkText.at(0)==':' && linkText.at(1)==':')
{
......@@ -2550,6 +2552,7 @@ bool generateLink(OutputDocInterface &od,const char *clName,
if (linkText.isEmpty())
{
linkText=substitute(lr,"#","::");
linkText=substitute(linkText,".","::");
// strip :: prefix if present
if (linkText.at(0)==':' && linkText.at(1)==':')
{
......
......@@ -148,7 +148,7 @@ void XmlDocVisitor::visit(DocVerbatim *s)
{
case DocVerbatim::Code: // fall though
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>";
break;
case DocVerbatim::Verbatim:
......@@ -182,7 +182,7 @@ void XmlDocVisitor::visit(DocInclude *inc)
{
case DocInclude::Include:
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>";
break;
case DocInclude::DontInclude:
......@@ -211,7 +211,7 @@ void XmlDocVisitor::visit(DocIncOperator *op)
}
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())
{
......@@ -302,7 +302,7 @@ void XmlDocVisitor::visitPost(DocRoot *)
void XmlDocVisitor::visitPre(DocSimpleSect *s)
{
m_t << "<simplesect kind=\">";
m_t << "<simplesect kind=\"";
switch(s->type())
{
case DocSimpleSect::See:
......@@ -701,6 +701,14 @@ void XmlDocVisitor::visitPost(DocCopy *)
{
}
void XmlDocVisitor::visitPre(DocText *)
{
}
void XmlDocVisitor::visitPost(DocText *)
{
}
void XmlDocVisitor::filter(const char *str)
{
if (str==0) return;
......
......@@ -122,6 +122,8 @@ class XmlDocVisitor : public DocVisitor
void visitPost(DocInternalRef *);
void visitPre(DocCopy *);
void visitPost(DocCopy *);
void visitPre(DocText *);
void visitPost(DocText *);
private:
......
......@@ -27,7 +27,6 @@
#include "util.h"
#include "defargs.h"
#include "outputgen.h"
#include "doc.h"
#include "dot.h"
#include "code.h"
#include "page.h"
......@@ -1201,7 +1200,7 @@ static void writeXMLDocBlock(QTextStream &t,
QCString stext = text.stripWhiteSpace();
if (stext.isEmpty()) return;
// 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
XMLCodeGenerator *xmlCodeGen = new XMLCodeGenerator(t);
// create a parse tree visitor for XML
......@@ -1739,25 +1738,25 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
}
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->pubSlots,"public-slot");
generateXMLSection(cd,ti,t,&cd->signals,"signal");
generateXMLSection(cd,ti,t,&cd->dcopMethods,"dcop-func");
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->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->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->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->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->friends,"friend");
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