Commit ee5cb6bc authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.2.18-20021013

parent 4596b79a
DOXYGEN Version 1.2.18-20021006 DOXYGEN Version 1.2.18-20021013
Please read the installation section of the manual for instructions. Please read the installation section of the manual for instructions.
-------- --------
Dimitri van Heesch (06 October 2002) Dimitri van Heesch (13 October 2002)
DOXYGEN Version 1.2.18_20021006 DOXYGEN Version 1.2.18_20021013
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) (06 October 2002) Dimitri van Heesch (dimitri@stack.nl) (13 October 2002)
1.2.18-20021006 1.2.18-20021013
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.2.18_20021006 Version: 1.2.18_20021013
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
......
...@@ -181,6 +181,7 @@ void ClassDef::addMembersToMemberGroup() ...@@ -181,6 +181,7 @@ void ClassDef::addMembersToMemberGroup()
::addMembersToMemberGroup(&friends,memberGroupSDict,this); ::addMembersToMemberGroup(&friends,memberGroupSDict,this);
::addMembersToMemberGroup(&related,memberGroupSDict,this); ::addMembersToMemberGroup(&related,memberGroupSDict,this);
::addMembersToMemberGroup(&properties,memberGroupSDict,this); ::addMembersToMemberGroup(&properties,memberGroupSDict,this);
::addMembersToMemberGroup(&events,memberGroupSDict,this);
// add members inside sections to their groups // add members inside sections to their groups
MemberGroupSDict::Iterator mgli(*memberGroupSDict); MemberGroupSDict::Iterator mgli(*memberGroupSDict);
...@@ -234,6 +235,10 @@ void ClassDef::internalInsertMember(MemberDef *md, ...@@ -234,6 +235,10 @@ void ClassDef::internalInsertMember(MemberDef *md,
properties.append(md); properties.append(md);
md->setSectionList(this,&properties); md->setSectionList(this,&properties);
break; break;
case MemberDef::Event:
events.append(md);
md->setSectionList(this,&events);
break;
case MemberDef::Slot: // Qt specific case MemberDef::Slot: // Qt specific
switch (prot) switch (prot)
{ {
...@@ -375,6 +380,12 @@ void ClassDef::internalInsertMember(MemberDef *md, ...@@ -375,6 +380,12 @@ void ClassDef::internalInsertMember(MemberDef *md,
else else
propertyMembers.append(md); propertyMembers.append(md);
break; break;
case MemberDef::Event:
if (Config_getBool("SORT_MEMBER_DOCS"))
eventMembers.inSort(md);
else
eventMembers.append(md);
break;
case MemberDef::Signal: // fall through case MemberDef::Signal: // fall through
case MemberDef::DCOP: case MemberDef::DCOP:
if (Config_getBool("SORT_MEMBER_DOCS")) if (Config_getBool("SORT_MEMBER_DOCS"))
...@@ -522,6 +533,7 @@ void ClassDef::computeAnchors() ...@@ -522,6 +533,7 @@ void ClassDef::computeAnchors()
setAnchors(context,'u',&priTypes); setAnchors(context,'u',&priTypes);
setAnchors(context,'v',&dcopMethods); setAnchors(context,'v',&dcopMethods);
setAnchors(context,'w',&properties); setAnchors(context,'w',&properties);
setAnchors(context,'x',&events);
MemberGroupSDict::Iterator mgli(*memberGroupSDict); MemberGroupSDict::Iterator mgli(*memberGroupSDict);
MemberGroup *mg; MemberGroup *mg;
for (;(mg=mgli.current());++mgli) for (;(mg=mgli.current());++mgli)
...@@ -1078,7 +1090,6 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1078,7 +1090,6 @@ void ClassDef::writeDocumentation(OutputList &ol)
pubSlots.writeDeclarations(ol,this,0,0,0,theTranslator->trPublicSlots(),0); pubSlots.writeDeclarations(ol,this,0,0,0,theTranslator->trPublicSlots(),0);
signals.writeDeclarations(ol,this,0,0,0,theTranslator->trSignals(),0); signals.writeDeclarations(ol,this,0,0,0,theTranslator->trSignals(),0);
dcopMethods.writeDeclarations(ol,this,0,0,0,theTranslator->trDCOPMethods(),0); dcopMethods.writeDeclarations(ol,this,0,0,0,theTranslator->trDCOPMethods(),0);
properties.writeDeclarations(ol,this,0,0,0,theTranslator->trProperties(),0);
pubMethods.writeDeclarations(ol,this,0,0,0,theTranslator->trPublicMembers(),0); pubMethods.writeDeclarations(ol,this,0,0,0,theTranslator->trPublicMembers(),0);
pubStaticMethods.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticPublicMembers(),0); pubStaticMethods.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticPublicMembers(),0);
...@@ -1098,6 +1109,12 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1098,6 +1109,12 @@ void ClassDef::writeDocumentation(OutputList &ol)
proAttribs.writeDeclarations(ol,this,0,0,0,theTranslator->trProtectedAttribs(),0); proAttribs.writeDeclarations(ol,this,0,0,0,theTranslator->trProtectedAttribs(),0);
proStaticAttribs.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticProtectedAttribs(),0); proStaticAttribs.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticProtectedAttribs(),0);
// properties
properties.writeDeclarations(ol,this,0,0,0,theTranslator->trProperties(),0);
// events
events.writeDeclarations(ol,this,0,0,0,theTranslator->trEvents(),0);
if (Config_getBool("EXTRACT_PRIVATE")) if (Config_getBool("EXTRACT_PRIVATE"))
{ {
// private types // private types
...@@ -1150,6 +1167,9 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1150,6 +1167,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
propertyMembers.writeDocumentation(ol,name(),this, propertyMembers.writeDocumentation(ol,name(),this,
theTranslator->trPropertyDocumentation()); theTranslator->trPropertyDocumentation());
eventMembers.writeDocumentation(ol,name(),this,
theTranslator->trEventDocumentation());
ol.startTextBlock(); ol.startTextBlock();
// write the list of used files (not for man pages) // write the list of used files (not for man pages)
...@@ -1556,6 +1576,8 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup) ...@@ -1556,6 +1576,8 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup)
dcopMethods.writePlainDeclarations(ol,this,0,0,0); dcopMethods.writePlainDeclarations(ol,this,0,0,0);
properties.setInGroup(inGroup); properties.setInGroup(inGroup);
properties.writePlainDeclarations(ol,this,0,0,0); properties.writePlainDeclarations(ol,this,0,0,0);
events.setInGroup(inGroup);
events.writePlainDeclarations(ol,this,0,0,0);
pubStaticMethods.setInGroup(inGroup); pubStaticMethods.setInGroup(inGroup);
pubStaticMethods.writePlainDeclarations(ol,this,0,0,0); pubStaticMethods.writePlainDeclarations(ol,this,0,0,0);
pubStaticAttribs.setInGroup(inGroup); pubStaticAttribs.setInGroup(inGroup);
...@@ -2476,6 +2498,7 @@ void ClassDef::addListReferences() ...@@ -2476,6 +2498,7 @@ void ClassDef::addListReferences()
relatedMembers.addListReferences(this); relatedMembers.addListReferences(this);
variableMembers.addListReferences(this); variableMembers.addListReferences(this);
propertyMembers.addListReferences(this); propertyMembers.addListReferences(this);
eventMembers.addListReferences(this);
} }
MemberDef *ClassDef::getMemberByName(const QCString &name) MemberDef *ClassDef::getMemberByName(const QCString &name)
......
...@@ -226,6 +226,7 @@ class ClassDef : public Definition ...@@ -226,6 +226,7 @@ class ClassDef : public Definition
MemberList friends; MemberList friends;
MemberList dcopMethods; MemberList dcopMethods;
MemberList properties; MemberList properties;
MemberList events;
/* member list by types */ /* member list by types */
MemberList constructors; MemberList constructors;
...@@ -236,6 +237,7 @@ class ClassDef : public Definition ...@@ -236,6 +237,7 @@ class ClassDef : public Definition
MemberList relatedMembers; MemberList relatedMembers;
MemberList variableMembers; MemberList variableMembers;
MemberList propertyMembers; MemberList propertyMembers;
MemberList eventMembers;
/* user defined member groups */ /* user defined member groups */
MemberGroupSDict *memberGroupSDict; MemberGroupSDict *memberGroupSDict;
......
...@@ -349,10 +349,6 @@ static void startCodeLine() ...@@ -349,10 +349,6 @@ static void startCodeLine()
//printf("Real scope: `%s'\n",g_realScope.data()); //printf("Real scope: `%s'\n",g_realScope.data());
g_bodyCurlyCount = 0; g_bodyCurlyCount = 0;
if (g_currentMemberDef) anchor=g_currentMemberDef->getBodyAnchor(); if (g_currentMemberDef) anchor=g_currentMemberDef->getBodyAnchor();
//g_code->startCodeAnchor(lineAnchor);
//g_code->writeCodeLink(d->getReference(),d->getOutputFileBase(),
// anchor,lineNumber);
//g_code->endCodeAnchor();
g_code->writeLineNumber(d->getReference(),d->getOutputFileBase(), g_code->writeLineNumber(d->getReference(),d->getOutputFileBase(),
anchor,g_yyLineNr); anchor,g_yyLineNr);
} }
...@@ -429,6 +425,7 @@ static void writeMultiLineCodeLink(BaseCodeDocInterface &ol, ...@@ -429,6 +425,7 @@ static void writeMultiLineCodeLink(BaseCodeDocInterface &ol,
{ {
g_yyLineNr++; g_yyLineNr++;
*(p-1)='\0'; *(p-1)='\0';
//printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);
ol.writeCodeLink(ref,file,anchor,sp); ol.writeCodeLink(ref,file,anchor,sp);
endCodeLine(); endCodeLine();
if (g_yyLineNr<g_inputLines) if (g_yyLineNr<g_inputLines)
...@@ -438,6 +435,7 @@ static void writeMultiLineCodeLink(BaseCodeDocInterface &ol, ...@@ -438,6 +435,7 @@ static void writeMultiLineCodeLink(BaseCodeDocInterface &ol,
} }
else else
{ {
//printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);
ol.writeCodeLink(ref,file,anchor,sp); ol.writeCodeLink(ref,file,anchor,sp);
done=TRUE; done=TRUE;
} }
...@@ -582,6 +580,7 @@ static MemberDef *setCallContextForVar(const QCString &name) ...@@ -582,6 +580,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
if (md->getBodyDef()==g_sourceFileDef) if (md->getBodyDef()==g_sourceFileDef)
{ {
g_theCallContext.setClass(stripClassName(md->typeString())); g_theCallContext.setClass(stripClassName(md->typeString()));
//printf("returning member %s in source file %s\n",md->name().data(),g_sourceFileDef->name().data());
return md; return md;
} }
md=mn->next(); md=mn->next();
......
...@@ -2191,7 +2191,7 @@ void Config::create() ...@@ -2191,7 +2191,7 @@ void Config::create()
FALSE ); FALSE );
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
addInfo( "Perl","configuration options related to the Perl output"); addInfo( "PerlMod","configuration options related to the Perl module output");
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
cb = addBool( cb = addBool(
"GENERATE_PERLMOD", "GENERATE_PERLMOD",
......
...@@ -89,6 +89,7 @@ void generateDEFForMember(MemberDef *md, ...@@ -89,6 +89,7 @@ void generateDEFForMember(MemberDef *md,
case MemberDef::Define: memType="define"; break; case MemberDef::Define: memType="define"; break;
case MemberDef::EnumValue: ASSERT(0); break; case MemberDef::EnumValue: ASSERT(0); break;
case MemberDef::Property: memType="property"; break; case MemberDef::Property: memType="property"; break;
case MemberDef::Event: memType="event"; break;
case MemberDef::Variable: memType="variable"; break; case MemberDef::Variable: memType="variable"; break;
case MemberDef::Typedef: memType="typedef"; break; case MemberDef::Typedef: memType="typedef"; break;
case MemberDef::Enumeration: memType="enum"; break; case MemberDef::Enumeration: memType="enum"; break;
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
#include "config.h" #include "config.h"
#include "message.h" #include "message.h"
#include "util.h" #include "util.h"
#include "latexgen.h" //#include "latexgen.h"
#include "htmlgen.h" //#include "htmlgen.h"
#include "doxygen.h" #include "doxygen.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
......
...@@ -174,7 +174,7 @@ static void checkUndocumentedParams() ...@@ -174,7 +174,7 @@ static void checkUndocumentedParams()
{ {
QString argName = g_memberDef->isDefine() ? a->type : a->name; QString argName = g_memberDef->isDefine() ? a->type : a->name;
if (argName.right(3)=="...") argName=argName.left(argName.length()-3); if (argName.right(3)=="...") argName=argName.left(argName.length()-3);
if (!argName.isEmpty() && g_paramsFound.find(argName)==0) if (!argName.isEmpty() && g_paramsFound.find(argName)==0 && a->docs.isEmpty())
{ {
found = TRUE; found = TRUE;
break; break;
......
...@@ -227,7 +227,7 @@ TEMPCHAR [a-z_A-Z0-9,: \t\*\&] ...@@ -227,7 +227,7 @@ TEMPCHAR [a-z_A-Z0-9,: \t\*\&]
FUNCCHAR [a-z_A-Z0-9,:\<\> \t\*\&] FUNCCHAR [a-z_A-Z0-9,:\<\> \t\*\&]
SCOPESEP "::"|"#"|"." SCOPESEP "::"|"#"|"."
SCOPEPRE {ID}("<"{TEMPCHAR}*">")?{SCOPESEP} SCOPEPRE {ID}("<"{TEMPCHAR}*">")?{SCOPESEP}
SCOPEMASK {SCOPEPRE}*(~)?{ID} SCOPEMASK {SCOPEPRE}*(~)?{ID}("<"{TEMPCHAR}*">")?
FUNCARG "("{FUNCCHAR}*")" FUNCARG "("{FUNCCHAR}*")"
OPNEW {BLANK}+"new"({BLANK}*"[]")? OPNEW {BLANK}+"new"({BLANK}*"[]")?
OPDEL {BLANK}+"delete"({BLANK}*"[]")? OPDEL {BLANK}+"delete"({BLANK}*"[]")?
...@@ -594,7 +594,7 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">" ...@@ -594,7 +594,7 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
warn(g_fileName,yylineno,"Error: Unexpected new line character"); warn(g_fileName,yylineno,"Error: Unexpected new line character");
} }
<*>[\\@<>&$#%~] { /* unescaped special character */ <*>[\\@<>&$#%~] { /* unescaped special character */
warn(g_fileName,yylineno,"Warning: Unexpected character `%s', assuming command \\%s was meant.",yytext,yytext); //warn(g_fileName,yylineno,"Warning: Unexpected character `%s', assuming command \\%s was meant.",yytext,yytext);
g_token->name = yytext; g_token->name = yytext;
return TK_COMMAND; return TK_COMMAND;
} }
......
...@@ -1240,6 +1240,7 @@ static MemberDef *addVariableToClass( ...@@ -1240,6 +1240,7 @@ static MemberDef *addVariableToClass(
md->setInitializer(root->initializer); md->setInitializer(root->initializer);
md->setMaxInitLines(root->initLines); md->setMaxInitLines(root->initLines);
md->setMemberGroupId(root->mGrpId); md->setMemberGroupId(root->mGrpId);
md->setMemberSpecifiers(root->memSpec);
addMemberToGroups(root,md); addMemberToGroups(root,md);
//if (root->mGrpId!=-1) //if (root->mGrpId!=-1)
//{ //{
...@@ -1670,6 +1671,8 @@ void buildVarList(Entry *root) ...@@ -1670,6 +1671,8 @@ void buildVarList(Entry *root)
mtype=MemberDef::Friend; mtype=MemberDef::Friend;
else if (root->mtype==Property) else if (root->mtype==Property)
mtype=MemberDef::Property; mtype=MemberDef::Property;
else if (root->mtype==Event)
mtype=MemberDef::Event;
else else
mtype=MemberDef::Variable; mtype=MemberDef::Variable;
...@@ -1910,8 +1913,6 @@ static void buildFunctionList(Entry *root) ...@@ -1910,8 +1913,6 @@ static void buildFunctionList(Entry *root)
root->startLine, root->startLine,
root->bodyLine, root->bodyLine,
root->tArgLists ? (int)root->tArgLists->count() : -1, root->tArgLists ? (int)root->tArgLists->count() : -1,
//root->tArgList ? (int)root->tArgList->count() : -1,
//root->mtArgList ? (int)root->mtArgList->count() : -1,
root->mGrpId, root->mGrpId,
root->memSpec, root->memSpec,
root->proto, root->proto,
...@@ -2053,13 +2054,7 @@ static void buildFunctionList(Entry *root) ...@@ -2053,13 +2054,7 @@ static void buildFunctionList(Entry *root)
{ {
md->setBriefDescription(root->brief,root->briefFile,root->briefLine); md->setBriefDescription(root->brief,root->briefFile,root->briefLine);
} }
// merge body definitions
if (md->getStartBodyLine()==-1 && root->bodyLine!=-1)
{
md->setBodySegment(root->bodyLine,root->endBodyLine);
bool ambig;
md->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
}
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
// merge ingroup specifiers // merge ingroup specifiers
...@@ -2267,6 +2262,7 @@ static void findFriends() ...@@ -2267,6 +2262,7 @@ static void findFriends()
{ {
fmd->setBriefDescription(mmd->briefDescription(),mmd->briefFile(),mmd->briefLine()); fmd->setBriefDescription(mmd->briefDescription(),mmd->briefFile(),mmd->briefLine());
} }
//printf("body mmd %d fmd %d\n",mmd->getStartBodyLine(),fmd->getStartBodyLine());
if (mmd->getStartBodyLine()==-1 && fmd->getStartBodyLine()!=-1) if (mmd->getStartBodyLine()==-1 && fmd->getStartBodyLine()!=-1)
{ {
mmd->setBodySegment(fmd->getStartBodyLine(),fmd->getEndBodyLine()); mmd->setBodySegment(fmd->getStartBodyLine(),fmd->getEndBodyLine());
...@@ -4727,6 +4723,7 @@ static void findMember(Entry *root, ...@@ -4727,6 +4723,7 @@ static void findMember(Entry *root,
{ {
md->setBodySegment(rmd->getStartBodyLine(),rmd->getEndBodyLine()); md->setBodySegment(rmd->getStartBodyLine(),rmd->getEndBodyLine());
md->setBodyDef(rmd->getBodyDef()); md->setBodyDef(rmd->getBodyDef());
md->setBodyMember(rmd);
} }
} }
} }
...@@ -7888,7 +7885,7 @@ void generateOutput() ...@@ -7888,7 +7885,7 @@ void generateOutput()
} }
if (Config_getBool("GENERATE_PERLMOD")) if (Config_getBool("GENERATE_PERLMOD"))
{ {
msg("Generating PerlMod output...\n"); msg("Generating Perl module output...\n");
generatePerlMod(); generatePerlMod();
} }
if (Config_getBool("GENERATE_HTMLHELP") && !Config_getString("HHC_LOCATION").isEmpty()) if (Config_getBool("GENERATE_HTMLHELP") && !Config_getString("HHC_LOCATION").isEmpty())
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
enum Protection { Public, Protected, Private } ; enum Protection { Public, Protected, Private } ;
enum Specifier { Normal, Virtual, Pure } ; enum Specifier { Normal, Virtual, Pure } ;
enum MethodTypes { Method, Signal, Slot, DCOP, Property }; enum MethodTypes { Method, Signal, Slot, DCOP, Property, Event };
struct ListItemInfo struct ListItemInfo
{ {
...@@ -226,9 +226,11 @@ class Entry ...@@ -226,9 +226,11 @@ class Entry
}; };
enum MemberSpecifier enum MemberSpecifier
{ {
Inline = 0x1, Inline = 0x01,
Explicit = 0x2, Explicit = 0x02,
Mutable = 0x4 Mutable = 0x04,
Settable = 0x08,
Gettable = 0x10
}; };
Entry(); Entry();
......
...@@ -742,7 +742,7 @@ void HtmlDocVisitor::visitPre(DocParamList *pl) ...@@ -742,7 +742,7 @@ void HtmlDocVisitor::visitPre(DocParamList *pl)
for (li.toFirst();(s=li.current());++li) for (li.toFirst();(s=li.current());++li)
{ {
if (!first) m_t << ","; else first=FALSE; if (!first) m_t << ","; else first=FALSE;
m_t << s; filter(s);
} }
m_t << "</em>&nbsp;</td><td>"; m_t << "</em>&nbsp;</td><td>";
} }
......
...@@ -508,12 +508,12 @@ void HtmlGenerator::endHtmlLink() ...@@ -508,12 +508,12 @@ void HtmlGenerator::endHtmlLink()
t << "</a>"; t << "</a>";
} }
void HtmlGenerator::writeMailLink(const char *url) //void HtmlGenerator::writeMailLink(const char *url)
{ //{
t << "<a href=\"mailto:" << url << "\">"; // t << "<a href=\"mailto:" << url << "\">";
docify(url); // docify(url);
t << "</a>"; // t << "</a>";
} //}
void HtmlGenerator::startGroupHeader() void HtmlGenerator::startGroupHeader()
{ {
...@@ -553,46 +553,46 @@ void HtmlGenerator::endSection(const char *,SectionInfo::SectionType type) ...@@ -553,46 +553,46 @@ void HtmlGenerator::endSection(const char *,SectionInfo::SectionType type)
} }
} }
void HtmlGenerator::writeSectionRef(const char *ref,const char *name, //void HtmlGenerator::writeSectionRef(const char *ref,const char *name,
const char *anchor,const char *title) // const char *anchor,const char *title)
{ //{
QCString *dest; // QCString *dest;
//printf("writeSectionRef(%s,%s,%s,%s)\n",ref,name,anchor,title); // //printf("writeSectionRef(%s,%s,%s,%s)\n",ref,name,anchor,title);
QCString refName=name; // QCString refName=name;
if (refName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension) // if (refName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension)
{ // {
refName+=Doxygen::htmlFileExtension; // refName+=Doxygen::htmlFileExtension;
} // }
t << "<a "; // t << "<a ";
if (ref) // if (ref)
{ // {
t << "doxygen=\"" << ref << ":"; // t << "doxygen=\"" << ref << ":";
if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; // if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
t << "\" "; // t << "\" ";
} // }
t << "href=\""; // t << "href=\"";
if (ref) // if (ref)
{ // {
if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/"; // if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
} // }
t << refName << "#" << anchor << "\">"; // t << refName << "#" << anchor << "\">";
docify(title); // docify(title);
t << "</a>"; // t << "</a>";
} //}
//
void HtmlGenerator::writeSectionRefItem(const char *name,const char *lab, //void HtmlGenerator::writeSectionRefItem(const char *name,const char *lab,
const char *title) // const char *title)
{ //{
QCString refName=name; // QCString refName=name;
if (refName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension) // if (refName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension)
{ // {
refName+=Doxygen::htmlFileExtension; // refName+=Doxygen::htmlFileExtension;
} // }
t << "<li><a href=\"" << refName << "#" << lab << "\">"; // t << "<li><a href=\"" << refName << "#" << lab << "\">";
docify(title); // docify(title);
t << "</a>"; // t << "</a>";
} //}
//
void HtmlGenerator::docify(const char *str) void HtmlGenerator::docify(const char *str)
{ {
if (str) if (str)
...@@ -702,20 +702,20 @@ void HtmlGenerator::endClassDiagram(ClassDiagram &d, ...@@ -702,20 +702,20 @@ void HtmlGenerator::endClassDiagram(ClassDiagram &d,
// t << "</font>"; // t << "</font>";
//} //}
void HtmlGenerator::writeFormula(const char *n,const char *text) //void HtmlGenerator::writeFormula(const char *n,const char *text)
{ //{
if (text && text[0]=='\\') t << "<p><center>" << endl; // if (text && text[0]=='\\') t << "<p><center>" << endl;
t << "<img align="; // t << "<img align=";
#if !defined(_WIN32) //#if !defined(_WIN32)
t << "\"top\""; // assume Unix users use Netscape 4.x which does // t << "\"top\""; // assume Unix users use Netscape 4.x which does
// not seem to support align == "middle" :-(( // // not seem to support align == "middle" :-((
#else //#else
t << "\"middle\""; // assume Windows users use IE or HtmlHelp which only // t << "\"middle\""; // assume Windows users use IE or HtmlHelp which only
// displays formulas nicely with align == "middle" // // displays formulas nicely with align == "middle"
#endif //#endif
t << " src=\"" << n << ".png\">" << endl; // t << " src=\"" << n << ".png\">" << endl;
if (text && text[0]=='\\') t << "</center><p>" << endl; // if (text && text[0]=='\\') t << "</center><p>" << endl;
} //}
void HtmlGenerator::startMemberList() void HtmlGenerator::startMemberList()
{ {
...@@ -900,76 +900,76 @@ void HtmlGenerator::endIndexValue(const char *,bool) ...@@ -900,76 +900,76 @@ void HtmlGenerator::endIndexValue(const char *,bool)
t << "</td></tr>" << endl; t << "</td></tr>" << endl;
} }
void HtmlGenerator::startAlphabeticalIndexList() //void HtmlGenerator::startAlphabeticalIndexList()
{ //{
t << "<table align=center width=\"95%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" << endl; // t << "<table align=center width=\"95%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" << endl;
} //}
void HtmlGenerator::endAlphabeticalIndexList()
{
t << "</table>" << endl;
}
void HtmlGenerator::writeIndexHeading(const char *s)
{
t << "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><div class=\"ah\">&nbsp;&nbsp;" << s
<< "&nbsp;&nbsp;</td></tr></table>";
}
void HtmlGenerator::startImage(const char *name,const char *,bool hasCaption) //void HtmlGenerator::endAlphabeticalIndexList()
{ //{
QCString baseName=name; // t << "</table>" << endl;
int i; //}
if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
t << "<div align=\"center\">" << endl;
t << "<img src=\"" << name << "\" alt=\"" << baseName << "\">" << endl;
if (hasCaption)
{
t << "<p><strong>";
}
}
void HtmlGenerator::endImage(bool hasCaption) //void HtmlGenerator::writeIndexHeading(const char *s)
{ //{
if (hasCaption) // t << "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><div class=\"ah\">&nbsp;&nbsp;" << s
{ // << "&nbsp;&nbsp;</td></tr></table>";
t << "</strong></p>" << endl; //}
}
t << "</div>" << endl;
}
void HtmlGenerator::startDotFile(const char *name,bool hasCaption) //void HtmlGenerator::startImage(const char *name,const char *,bool hasCaption)
{ //{
QCString baseName=name; // QCString baseName=name;
int i; // int i;
if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1) // if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
{ // {
baseName=baseName.right(baseName.length()-i-1); // baseName=baseName.right(baseName.length()-i-1);
} // }
QCString outDir = Config_getString("HTML_OUTPUT"); // t << "<div align=\"center\">" << endl;
writeDotGraphFromFile(name,outDir,baseName,BITMAP); // t << "<img src=\"" << name << "\" alt=\"" << baseName << "\">" << endl;
t << "<div align=\"center\">" << endl; // if (hasCaption)
t << "<img src=\"" << baseName << "." // {
<< Config_getEnum("DOT_IMAGE_FORMAT") << "\" alt=\"" // t << "<p><strong>";
<< baseName << "\">" << endl; // }
if (hasCaption) //}
{
t << "<p><strong>";
}
}
void HtmlGenerator::endDotFile(bool hasCaption) //void HtmlGenerator::endImage(bool hasCaption)
{ //{
if (hasCaption) // if (hasCaption)
{ // {
t << "</strong></p>" << endl; // t << "</strong></p>" << endl;
} // }
t << "</div>" << endl; // t << "</div>" << endl;
} //}
//void HtmlGenerator::startDotFile(const char *name,bool hasCaption)
//{
// QCString baseName=name;
// int i;
// if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
// {
// baseName=baseName.right(baseName.length()-i-1);
// }
// QCString outDir = Config_getString("HTML_OUTPUT");
// writeDotGraphFromFile(name,outDir,baseName,BITMAP);
// t << "<div align=\"center\">" << endl;
// t << "<img src=\"" << baseName << "."
// << Config_getEnum("DOT_IMAGE_FORMAT") << "\" alt=\""
// << baseName << "\">" << endl;
// if (hasCaption)
// {
// t << "<p><strong>";
// }
//}
//
//void HtmlGenerator::endDotFile(bool hasCaption)
//{
// if (hasCaption)
// {
// t << "</strong></p>" << endl;
// }
// t << "</div>" << endl;
//}
//
void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const char *) void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const char *)
{ {
DBG_HTML(t << "<!-- startMemberDoc -->" << endl;) DBG_HTML(t << "<!-- startMemberDoc -->" << endl;)
...@@ -1235,17 +1235,17 @@ void HtmlGenerator::endParamList() ...@@ -1235,17 +1235,17 @@ void HtmlGenerator::endParamList()
t << "</dl>"; t << "</dl>";
} }
void HtmlGenerator::startSectionRefList() //void HtmlGenerator::startSectionRefList()
{ //{
t << "<multicol cols=3>" << endl; // t << "<multicol cols=3>" << endl;
t << "<ul>" << endl; // t << "<ul>" << endl;
} //}
void HtmlGenerator::endSectionRefList() //void HtmlGenerator::endSectionRefList()
{ //{
t << "</ul>" << endl; // t << "</ul>" << endl;
t << "</multicol>" << endl; // t << "</multicol>" << endl;
} //}
void HtmlGenerator::printDoc(DocNode *n) void HtmlGenerator::printDoc(DocNode *n)
......
...@@ -75,11 +75,11 @@ class HtmlGenerator : public OutputGenerator ...@@ -75,11 +75,11 @@ class HtmlGenerator : public OutputGenerator
void endIndexValue(const char *,bool); void endIndexValue(const char *,bool);
void startItemList() { t << "<ul>" << endl; } void startItemList() { t << "<ul>" << endl; }
void endItemList() { t << "</ul>" << endl; } void endItemList() { t << "</ul>" << endl; }
void startEnumList() { t << "<ol>" << endl; } //void startEnumList() { t << "<ol>" << endl; }
void endEnumList() { t << "</ol>" << endl; } //void endEnumList() { t << "</ol>" << endl; }
void startAlphabeticalIndexList(); //void startAlphabeticalIndexList();
void endAlphabeticalIndexList(); //void endAlphabeticalIndexList();
void writeIndexHeading(const char *s); //void writeIndexHeading(const char *s);
void writeIndexItem(const char *ref,const char *file,const char *name); void writeIndexItem(const char *ref,const char *file,const char *name);
void docify(const char *text); void docify(const char *text);
void codify(const char *text); void codify(const char *text);
...@@ -91,7 +91,7 @@ class HtmlGenerator : public OutputGenerator ...@@ -91,7 +91,7 @@ class HtmlGenerator : public OutputGenerator
void endTextLink(); void endTextLink();
void startHtmlLink(const char *url); void startHtmlLink(const char *url);
void endHtmlLink(); void endHtmlLink();
void writeMailLink(const char *url); //void writeMailLink(const char *url);
void startTypewriter() { t << "<code>"; } void startTypewriter() { t << "<code>"; }
void endTypewriter() { t << "</code>"; } void endTypewriter() { t << "</code>"; }
void startGroupHeader(); void startGroupHeader();
...@@ -125,10 +125,10 @@ class HtmlGenerator : public OutputGenerator ...@@ -125,10 +125,10 @@ class HtmlGenerator : public OutputGenerator
{ t << "<a name=\"" << name <<"\"></a>"; } { t << "<a name=\"" << name <<"\"></a>"; }
void startCodeFragment() { t << "<div class=\"fragment\"><pre>"; } void startCodeFragment() { t << "<div class=\"fragment\"><pre>"; }
void endCodeFragment() { t << "</pre></div>"; } void endCodeFragment() { t << "</pre></div>"; }
void startPreFragment() { t << "<pre>"; } //void startPreFragment() { t << "<pre>"; }
void endPreFragment() { t << "</pre>"; } //void endPreFragment() { t << "</pre>"; }
void startVerbatimFragment() { t << "<div class=\"fragment\"><pre>"; } //void startVerbatimFragment() { t << "<div class=\"fragment\"><pre>"; }
void endVerbatimFragment() { t << "</pre></div>"; } //void endVerbatimFragment() { t << "</pre></div>"; }
void writeLineNumber(const char *,const char *,const char *,int); void writeLineNumber(const char *,const char *,const char *,int);
void startCodeLine() { col=0; } void startCodeLine() { col=0; }
void endCodeLine() { codify("\n"); } void endCodeLine() { codify("\n"); }
...@@ -166,44 +166,44 @@ class HtmlGenerator : public OutputGenerator ...@@ -166,44 +166,44 @@ class HtmlGenerator : public OutputGenerator
void endCenter() { t << "</center>" << endl; } void endCenter() { t << "</center>" << endl; }
void startSmall() { t << "<small>" << endl; } void startSmall() { t << "<small>" << endl; }
void endSmall() { t << "</small>" << endl; } void endSmall() { t << "</small>" << endl; }
void startSubscript() { t << "<sub>"; } //void startSubscript() { t << "<sub>"; }
void endSubscript() { t << "</sub>"; } //void endSubscript() { t << "</sub>"; }
void startSuperscript() { t << "<sup>"; } //void startSuperscript() { t << "<sup>"; }
void endSuperscript() { t << "</sup>"; } //void endSuperscript() { t << "</sup>"; }
void startTable(bool,int) //void startTable(bool,int)
{ t << "<table border=1 cellspacing=3 cellpadding=3>"; } // { t << "<table border=1 cellspacing=3 cellpadding=3>"; }
void endTable(bool hasCaption) //void endTable(bool hasCaption)
{ if (!hasCaption) t << "</tr>"; // { if (!hasCaption) t << "</tr>";
t << "</table>" << endl; // t << "</table>" << endl;
} // }
void startCaption() { t << "</tr><caption align=\"bottom\">"; } //void startCaption() { t << "</tr><caption align=\"bottom\">"; }
void endCaption() { t << "</caption>" << endl; } //void endCaption() { t << "</caption>" << endl; }
void nextTableRow() { t << "<tr><td>"; } //void nextTableRow() { t << "<tr><td>"; }
void endTableRow() { t << "</tr>" << endl; } //void endTableRow() { t << "</tr>" << endl; }
void nextTableColumn() { t << "<td>"; } //void nextTableColumn() { t << "<td>"; }
void endTableColumn() { t << "</td>"; } //void endTableColumn() { t << "</td>"; }
void writeCopyright() { t << "&copy;"; } //void writeCopyright() { t << "&copy;"; }
void writeQuote() { t << "&quot;"; } //void writeQuote() { t << "&quot;"; }
void writeUmlaut(char c) { t << "&" << c << "uml;"; } //void writeUmlaut(char c) { t << "&" << c << "uml;"; }
void writeAcute(char c) { t << "&" << c << "acute;"; } //void writeAcute(char c) { t << "&" << c << "acute;"; }
void writeGrave(char c) { t << "&" << c << "grave;"; } //void writeGrave(char c) { t << "&" << c << "grave;"; }
void writeCirc(char c) { t << "&" << c << "circ;"; } //void writeCirc(char c) { t << "&" << c << "circ;"; }
void writeTilde(char c) { t << "&" << c << "tilde;"; } //void writeTilde(char c) { t << "&" << c << "tilde;"; }
void writeRing(char c) { t << "&" << c << "ring;"; } //void writeRing(char c) { t << "&" << c << "ring;"; }
void writeSharpS() { t << "&szlig;"; } //void writeSharpS() { t << "&szlig;"; }
void writeCCedil(char c) { t << "&" << c << "cedil;"; } //void writeCCedil(char c) { t << "&" << c << "cedil;"; }
void startDescList(SectionTypes) { t << "<dl compact><dt><b>" << endl; } void startDescList(SectionTypes) { t << "<dl compact><dt><b>" << endl; }
void endDescList() { t << "</dl>"; } void endDescList() { t << "</dl>"; }
void startSimpleSect(SectionTypes,const char *,const char *,const char *); void startSimpleSect(SectionTypes,const char *,const char *,const char *);
void endSimpleSect(); void endSimpleSect();
void startParamList(ParamListTypes,const char *); void startParamList(ParamListTypes,const char *);
void endParamList(); void endParamList();
void endDescTitle() { t << "</b>"; } //void endDescTitle() { t << "</b>"; }
void writeDescItem() { t << "<dd>" << endl; } void writeDescItem() { t << "<dd>" << endl; }
void startSection(const char *,const char *,SectionInfo::SectionType); void startSection(const char *,const char *,SectionInfo::SectionType);
void endSection(const char *,SectionInfo::SectionType); void endSection(const char *,SectionInfo::SectionType);
void writeSectionRef(const char *,const char *,const char *,const char *); //void writeSectionRef(const char *,const char *,const char *,const char *);
void writeSectionRefItem(const char *,const char *,const char *); //void writeSectionRefItem(const char *,const char *,const char *);
//void writeSectionRefAnchor(const char *,const char *,const char *); //void writeSectionRefAnchor(const char *,const char *,const char *);
void addIndexItem(const char *,const char *); void addIndexItem(const char *,const char *);
void startIndent(); void startIndent();
...@@ -217,12 +217,12 @@ class HtmlGenerator : public OutputGenerator ...@@ -217,12 +217,12 @@ class HtmlGenerator : public OutputGenerator
void endPageRef(const char *,const char *) {} void endPageRef(const char *,const char *) {}
void startQuickIndexItem(const char *,const char *); void startQuickIndexItem(const char *,const char *);
void endQuickIndexItem(); void endQuickIndexItem();
void writeFormula(const char *,const char *); //void writeFormula(const char *,const char *);
void writeNonBreakableSpace(int); void writeNonBreakableSpace(int);
void startImage(const char *,const char *,bool); //void startImage(const char *,const char *,bool);
void endImage(bool); //void endImage(bool);
void startDotFile(const char *,bool); //void startDotFile(const char *,bool);
void endDotFile(bool); //void endDotFile(bool);
void startDescTable() void startDescTable()
{ t << "<table border=0 cellspacing=2 cellpadding=0>" << endl; } { t << "<table border=0 cellspacing=2 cellpadding=0>" << endl; }
...@@ -262,13 +262,13 @@ class HtmlGenerator : public OutputGenerator ...@@ -262,13 +262,13 @@ class HtmlGenerator : public OutputGenerator
void startFontClass(const char *s) { t << "<span class=\"" << s << "\">"; } void startFontClass(const char *s) { t << "<span class=\"" << s << "\">"; }
void endFontClass() { t << "</span>"; } void endFontClass() { t << "</span>"; }
void startHtmlOnly() {} //void startHtmlOnly() {}
void endHtmlOnly() {} //void endHtmlOnly() {}
void startLatexOnly() {} //void startLatexOnly() {}
void endLatexOnly() {} //void endLatexOnly() {}
void startSectionRefList(); //void startSectionRefList();
void endSectionRefList(); //void endSectionRefList();
void writeCodeAnchor(const char *anchor) void writeCodeAnchor(const char *anchor)
{ t << "<a name=\"" << anchor << "\"></a>"; } { t << "<a name=\"" << anchor << "\"></a>"; }
......
...@@ -1285,7 +1285,8 @@ void writeAnnotatedClassList(OutputList &ol) ...@@ -1285,7 +1285,8 @@ void writeAnnotatedClassList(OutputList &ol)
// write an alphabetical index of all class with a header for each letter // write an alphabetical index of all class with a header for each letter
void writeAlphabeticalClassList(OutputList &ol) void writeAlphabeticalClassList(OutputList &ol)
{ {
ol.startAlphabeticalIndexList(); //ol.startAlphabeticalIndexList();
ol.writeString("<table align=center width=\"95%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n");
// first count the number of headers // first count the number of headers
ClassSDict::Iterator cli(Doxygen::classSDict); ClassSDict::Iterator cli(Doxygen::classSDict);
...@@ -1363,12 +1364,14 @@ void writeAlphabeticalClassList(OutputList &ol) ...@@ -1363,12 +1364,14 @@ void writeAlphabeticalClassList(OutputList &ol)
// generate table // generate table
for (i=0;i<rows;i++) // foreach table row for (i=0;i<rows;i++) // foreach table row
{ {
ol.nextTableRow(); //ol.nextTableRow();
ol.writeString("<tr>");
// the last column may contain less items then the others // the last column may contain less items then the others
int colsInRow = (i<rows-1) ? columns : itemsInLastRow; int colsInRow = (i<rows-1) ? columns : itemsInLastRow;
//printf("row [%d]\n",i); //printf("row [%d]\n",i);
for (j=0;j<colsInRow;j++) // foreach table column for (j=0;j<colsInRow;j++) // foreach table column
{ {
ol.writeString("<td>");
ClassDef *cd = colIterators[j]->current(); ClassDef *cd = colIterators[j]->current();
//printf("columns [%d] cd=%p\n",j,cd); //printf("columns [%d] cd=%p\n",j,cd);
if (cd==(ClassDef *)8) // the class pointer is really a header if (cd==(ClassDef *)8) // the class pointer is really a header
...@@ -1380,7 +1383,16 @@ void writeAlphabeticalClassList(OutputList &ol) ...@@ -1380,7 +1383,16 @@ void writeAlphabeticalClassList(OutputList &ol)
int index = getPrefixIndex(cd->className()); int index = getPrefixIndex(cd->className());
startLetter=toupper(cd->className().at(index)); startLetter=toupper(cd->className().at(index));
char s[2]; s[0]=startLetter; s[1]=0; char s[2]; s[0]=startLetter; s[1]=0;
ol.writeIndexHeading(s); //ol.writeIndexHeading(s);
ol.writeString("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
"<tr>"
"<td><div class=\"ah\">&nbsp;&nbsp;");
ol.writeString(s);
ol.writeString( "&nbsp;&nbsp;"
"</td>"
"</tr>"
"</table>\n");
} }
} }
else if (cd) // a real class, insert a link else if (cd) // a real class, insert a link
...@@ -1410,12 +1422,15 @@ void writeAlphabeticalClassList(OutputList &ol) ...@@ -1410,12 +1422,15 @@ void writeAlphabeticalClassList(OutputList &ol)
//printf("item ClassDef=%p %s\n",cd,cd ? cd->name().data() : "<none>"); //printf("item ClassDef=%p %s\n",cd,cd ? cd->name().data() : "<none>");
++(*colIterators[j]); ++(*colIterators[j]);
} }
ol.endTableColumn(); //ol.endTableColumn();
if (j<colsInRow-1) ol.nextTableColumn(); ol.writeString("</td>");
//if (j<colsInRow-1) ol.nextTableColumn();
} }
ol.endTableRow(); //ol.endTableRow();
ol.writeString("</tr>");
} }
ol.endAlphabeticalIndexList(); //ol.endAlphabeticalIndexList();
ol.writeString("</table>");
// release the temporary memory // release the temporary memory
for (i=0;i<columns;i++) for (i=0;i<columns;i++)
......
...@@ -68,7 +68,7 @@ QString LatexDocVisitor::escapeMakeIndexChars(const char *s) ...@@ -68,7 +68,7 @@ QString LatexDocVisitor::escapeMakeIndexChars(const char *s)
LatexDocVisitor::LatexDocVisitor(QTextStream &t,BaseCodeDocInterface &ci) LatexDocVisitor::LatexDocVisitor(QTextStream &t,BaseCodeDocInterface &ci)
: m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE) : m_t(t), m_ci(ci), m_insidePre(FALSE), m_insideItem(FALSE), m_hide(FALSE)
{ {
} }
...@@ -160,7 +160,9 @@ void LatexDocVisitor::visit(DocURL *u) ...@@ -160,7 +160,9 @@ void LatexDocVisitor::visit(DocURL *u)
{ {
m_t << "\\href{" << u->url() << "}"; m_t << "\\href{" << u->url() << "}";
} }
m_t << "{\\tt " << u->url() << "}"; m_t << "{\\tt ";
filter(u->url());
m_t << "}";
} }
void LatexDocVisitor::visit(DocLineBreak *) void LatexDocVisitor::visit(DocLineBreak *)
...@@ -398,6 +400,10 @@ void LatexDocVisitor::visitPre(DocSimpleSect *s) ...@@ -398,6 +400,10 @@ void LatexDocVisitor::visitPre(DocSimpleSect *s)
{ {
m_t << ":]"; m_t << ":]";
} }
else
{
m_insideItem=TRUE;
}
} }
void LatexDocVisitor::visitPost(DocSimpleSect *) void LatexDocVisitor::visitPost(DocSimpleSect *)
...@@ -411,6 +417,7 @@ void LatexDocVisitor::visitPre(DocTitle *) ...@@ -411,6 +417,7 @@ void LatexDocVisitor::visitPre(DocTitle *)
void LatexDocVisitor::visitPost(DocTitle *) void LatexDocVisitor::visitPost(DocTitle *)
{ {
m_insideItem=FALSE;
m_t << "]"; m_t << "]";
} }
...@@ -517,10 +524,12 @@ void LatexDocVisitor::visitPost(DocHtmlDescList *) ...@@ -517,10 +524,12 @@ void LatexDocVisitor::visitPost(DocHtmlDescList *)
void LatexDocVisitor::visitPre(DocHtmlDescTitle *) void LatexDocVisitor::visitPre(DocHtmlDescTitle *)
{ {
m_t << "\\item["; m_t << "\\item[";
m_insideItem=TRUE;
} }
void LatexDocVisitor::visitPost(DocHtmlDescTitle *) void LatexDocVisitor::visitPost(DocHtmlDescTitle *)
{ {
m_insideItem=FALSE;
m_t << "]"; m_t << "]";
} }
...@@ -829,7 +838,9 @@ void LatexDocVisitor::visitPre(DocParamList *pl) ...@@ -829,7 +838,9 @@ void LatexDocVisitor::visitPre(DocParamList *pl)
for (li.toFirst();(s=li.current());++li) for (li.toFirst();(s=li.current());++li)
{ {
if (!first) m_t << ","; else first=FALSE; if (!first) m_t << ","; else first=FALSE;
m_t << s; m_insideItem=TRUE;
filter(s);
m_insideItem=FALSE;
} }
m_t << "}]"; m_t << "}]";
} }
...@@ -850,7 +861,9 @@ void LatexDocVisitor::visitPre(DocXRefItem *x) ...@@ -850,7 +861,9 @@ void LatexDocVisitor::visitPre(DocXRefItem *x)
{ {
m_t << "{\\bf "; m_t << "{\\bf ";
} }
m_insideItem=TRUE;
filter(x->title()); filter(x->title());
m_insideItem=FALSE;
m_t << "}]"; m_t << "}]";
} }
...@@ -888,7 +901,7 @@ void LatexDocVisitor::visitPost(DocText *) ...@@ -888,7 +901,7 @@ 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,m_insideItem);
} }
void LatexDocVisitor::startLink(const QString &ref,const QString &file,const QString &anchor) void LatexDocVisitor::startLink(const QString &ref,const QString &file,const QString &anchor)
......
...@@ -144,6 +144,7 @@ class LatexDocVisitor : public DocVisitor ...@@ -144,6 +144,7 @@ class LatexDocVisitor : public DocVisitor
QTextStream &m_t; QTextStream &m_t;
BaseCodeDocInterface &m_ci; BaseCodeDocInterface &m_ci;
bool m_insidePre; bool m_insidePre;
bool m_insideItem;
bool m_hide; bool m_hide;
}; };
......
...@@ -899,18 +899,18 @@ void LatexGenerator::endHtmlLink() ...@@ -899,18 +899,18 @@ void LatexGenerator::endHtmlLink()
t << "}"; t << "}";
} }
void LatexGenerator::writeMailLink(const char *url) //void LatexGenerator::writeMailLink(const char *url)
{ //{
if (Config_getBool("PDF_HYPERLINKS")) // if (Config_getBool("PDF_HYPERLINKS"))
{ // {
t << "\\href{mailto:"; // t << "\\href{mailto:";
t << url; // t << url;
t << "}"; // t << "}";
} // }
t << "{\\tt "; // t << "{\\tt ";
docify(url); // docify(url);
t << "}"; // t << "}";
} //}
void LatexGenerator::writeStartAnnoItem(const char *,const char *, void LatexGenerator::writeStartAnnoItem(const char *,const char *,
const char *path,const char *name) const char *path,const char *name)
...@@ -1238,49 +1238,49 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType) ...@@ -1238,49 +1238,49 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType)
t << "}\\label{" << lab << "}" << endl; t << "}\\label{" << lab << "}" << endl;
} }
void LatexGenerator::writeSectionRef(const char *ref,const char *, //void LatexGenerator::writeSectionRef(const char *ref,const char *,
const char *lab,const char *text) // const char *lab,const char *text)
{ //{
if (ref) // external reference // if (ref) // external reference
{ // {
docify(text); // docify(text);
} // }
else // local reference // else // local reference
{ // {
if (text && Config_getBool("PDF_HYPERLINKS")) // if (text && Config_getBool("PDF_HYPERLINKS"))
{ // {
t << "\\hyperlink{"; // t << "\\hyperlink{";
if (lab) t << lab; // if (lab) t << lab;
t << "}{"; // t << "}{";
docify(text); // docify(text);
t << "}"; // t << "}";
//t << " {\\rm (p.\\,\\pageref{" << lab << "})}"; // //t << " {\\rm (p.\\,\\pageref{" << lab << "})}";
} // }
else // else
{ // {
if (strcmp(lab,text)!=0) // lab!=text // if (strcmp(lab,text)!=0) // lab!=text
{ // {
// todo: don't hardcode p. here! // // todo: don't hardcode p. here!
t << "{\\bf "; // t << "{\\bf ";
docify(text); // docify(text);
t << "} {\\rm (p.\\,\\pageref{" << lab << "})}"; // t << "} {\\rm (p.\\,\\pageref{" << lab << "})}";
} // }
else // else
{ // {
t << "\\ref{" << lab << "}"; // t << "\\ref{" << lab << "}";
} // }
} // }
} // }
} //}
//
void LatexGenerator::writeSectionRefItem(const char *,const char *lab, //void LatexGenerator::writeSectionRefItem(const char *,const char *lab,
const char *title) // const char *title)
{ //{
t << "\\item \\contentsline{section}{"; // t << "\\item \\contentsline{section}{";
docify(title); // docify(title);
t << "}{\\ref{" << lab << "}}{}" << endl; // t << "}{\\ref{" << lab << "}}{}" << endl;
} //}
//
// TODO: remove this function // TODO: remove this function
//void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab, //void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab,
// const char *title) // const char *title)
...@@ -1420,10 +1420,10 @@ void LatexGenerator::endClassDiagram(ClassDiagram &d, ...@@ -1420,10 +1420,10 @@ void LatexGenerator::endClassDiagram(ClassDiagram &d,
d.writeFigure(t,dir,fileName); d.writeFigure(t,dir,fileName);
} }
void LatexGenerator::writeFormula(const char *,const char *text) //void LatexGenerator::writeFormula(const char *,const char *text)
{ //{
t << text; // t << text;
} //}
void LatexGenerator::startMemberItem(int annType) void LatexGenerator::startMemberItem(int annType)
{ {
...@@ -1479,86 +1479,86 @@ void LatexGenerator::endMemberList() ...@@ -1479,86 +1479,86 @@ void LatexGenerator::endMemberList()
t << "\\end{CompactItemize}" << endl; t << "\\end{CompactItemize}" << endl;
} }
void LatexGenerator::startImage(const char *name,const char *size,bool hasCaption) //void LatexGenerator::startImage(const char *name,const char *size,bool hasCaption)
{ //{
if (hasCaption) // if (hasCaption)
{ // {
t << "\\begin{figure}[H]" << endl; // t << "\\begin{figure}[H]" << endl;
t << "\\begin{center}" << endl; // t << "\\begin{center}" << endl;
} // }
else // else
{ // {
t << "\\mbox{"; // t << "\\mbox{";
} // }
QCString gfxName = name; // QCString gfxName = name;
if (gfxName.right(4)==".eps") gfxName.left(gfxName.length()-4); // if (gfxName.right(4)==".eps") gfxName.left(gfxName.length()-4);
// "\\epsfig{file=" << name; // // "\\epsfig{file=" << name;
t << "\\includegraphics"; // t << "\\includegraphics";
if (size) t << "[" << size << "]"; // if (size) t << "[" << size << "]";
t << "{" << gfxName << "}"; // t << "{" << gfxName << "}";
if (hasCaption) // if (hasCaption)
{ // {
t << "\\caption{"; // t << "\\caption{";
} // }
else // else
{ // {
t << "}" << endl; // t << "}" << endl;
} // }
} //}
//
void LatexGenerator::endImage(bool hasCaption) //void LatexGenerator::endImage(bool hasCaption)
{ //{
if (hasCaption) // if (hasCaption)
{ // {
t << "}" << endl; // t << "}" << endl;
t << "\\end{center}" << endl; // t << "\\end{center}" << endl;
t << "\\end{figure}" << endl; // t << "\\end{figure}" << endl;
} // }
} //}
//
void LatexGenerator::startDotFile(const char *name,bool hasCaption) //void LatexGenerator::startDotFile(const char *name,bool hasCaption)
{ //{
QCString baseName=name; // QCString baseName=name;
int i; // int i;
if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1) // if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
{ // {
baseName=baseName.right(baseName.length()-i-1); // baseName=baseName.right(baseName.length()-i-1);
} // }
QCString outDir = Config_getString("LATEX_OUTPUT"); // QCString outDir = Config_getString("LATEX_OUTPUT");
writeDotGraphFromFile(name,outDir,baseName,EPS); // writeDotGraphFromFile(name,outDir,baseName,EPS);
if (hasCaption) // if (hasCaption)
{ // {
t << "\\begin{figure}[H]" << endl; // t << "\\begin{figure}[H]" << endl;
t << "\\begin{center}" << endl; // t << "\\begin{center}" << endl;
} // }
else // else
t << "\\mbox{"; // t << "\\mbox{";
t << "\\includegraphics"; // t << "\\includegraphics";
if( Config_getBool("USE_PDFLATEX") ) // if( Config_getBool("USE_PDFLATEX") )
{ // {
t << "{" << baseName << ".pdf}"; // t << "{" << baseName << ".pdf}";
} // }
else // else
{ // {
t << "{" << baseName << ".eps}"; // t << "{" << baseName << ".eps}";
} // }
//
if (hasCaption) // if (hasCaption)
t << "\\caption{"; // t << "\\caption{";
else // else
t << "}" << endl; // t << "}" << endl;
} //}
//
void LatexGenerator::endDotFile(bool hasCaption) //void LatexGenerator::endDotFile(bool hasCaption)
{ //{
if (hasCaption) // if (hasCaption)
{ // {
t << "}" << endl; // t << "}" << endl;
t << "\\end{center}" << endl; // t << "\\end{center}" << endl;
t << "\\end{figure}" << endl; // t << "\\end{figure}" << endl;
} // }
} //}
//
void LatexGenerator::startMemberGroupHeader(bool hasHeader) void LatexGenerator::startMemberGroupHeader(bool hasHeader)
{ {
...@@ -1671,19 +1671,19 @@ void LatexGenerator::endParamList() ...@@ -1671,19 +1671,19 @@ void LatexGenerator::endParamList()
t << "\\end{Desc}" << endl; t << "\\end{Desc}" << endl;
} }
void LatexGenerator::startSectionRefList() //void LatexGenerator::startSectionRefList()
{ //{
t << "\\footnotesize" << endl; // t << "\\footnotesize" << endl;
t << "\\begin{multicols}{2}" << endl; // t << "\\begin{multicols}{2}" << endl;
t << "\\begin{CompactList}" << endl; // t << "\\begin{CompactList}" << endl;
} //}
void LatexGenerator::endSectionRefList() //void LatexGenerator::endSectionRefList()
{ //{
t << "\\end{CompactList}" << endl; // t << "\\end{CompactList}" << endl;
t << "\\end{multicols}" << endl; // t << "\\end{multicols}" << endl;
t << "\\normalsize" << endl; // t << "\\normalsize" << endl;
} //}
void LatexGenerator::printDoc(DocNode *n) void LatexGenerator::printDoc(DocNode *n)
{ {
......
...@@ -71,11 +71,11 @@ class LatexGenerator : public OutputGenerator ...@@ -71,11 +71,11 @@ class LatexGenerator : public OutputGenerator
void endIndexValue(const char *,bool); void endIndexValue(const char *,bool);
void startItemList() { t << "\\begin{CompactItemize}" << endl; } void startItemList() { t << "\\begin{CompactItemize}" << endl; }
void endItemList() { t << "\\end{CompactItemize}" << endl; } void endItemList() { t << "\\end{CompactItemize}" << endl; }
void startEnumList() { t << "\\begin{enumerate}" << endl; } //void startEnumList() { t << "\\begin{enumerate}" << endl; }
void endEnumList() { t << "\\end{enumerate}" << endl; } //void endEnumList() { t << "\\end{enumerate}" << endl; }
void startAlphabeticalIndexList() {} //void startAlphabeticalIndexList() {}
void endAlphabeticalIndexList() {} //void endAlphabeticalIndexList() {}
void writeIndexHeading(const char *) {} //void writeIndexHeading(const char *) {}
void writeIndexItem(const char *ref,const char *file,const char *name); void writeIndexItem(const char *ref,const char *file,const char *name);
void docify(const char *text); void docify(const char *text);
void codify(const char *text); void codify(const char *text);
...@@ -87,7 +87,7 @@ class LatexGenerator : public OutputGenerator ...@@ -87,7 +87,7 @@ class LatexGenerator : public OutputGenerator
void endTextLink(); void endTextLink();
void startHtmlLink(const char *url); void startHtmlLink(const char *url);
void endHtmlLink(); void endHtmlLink();
void writeMailLink(const char *url); //void writeMailLink(const char *url);
void startTypewriter() { t << "{\\tt "; } void startTypewriter() { t << "{\\tt "; }
void endTypewriter() { t << "}"; } void endTypewriter() { t << "}"; }
void startGroupHeader(); void startGroupHeader();
...@@ -118,14 +118,14 @@ class LatexGenerator : public OutputGenerator ...@@ -118,14 +118,14 @@ class LatexGenerator : public OutputGenerator
void writeAnchor(const char *fileName,const char *name); void writeAnchor(const char *fileName,const char *name);
void startCodeFragment() { t << endl << endl << "\\footnotesize\\begin{verbatim}"; } void startCodeFragment() { t << endl << endl << "\\footnotesize\\begin{verbatim}"; }
void endCodeFragment() { t << "\\end{verbatim}\\normalsize " << endl; } void endCodeFragment() { t << "\\end{verbatim}\\normalsize " << endl; }
void startPreFragment() { t << "\\small\\begin{alltt}"; //void startPreFragment() { t << "\\small\\begin{alltt}";
insidePre=TRUE; // insidePre=TRUE;
} // }
void endPreFragment() { t << "\\end{alltt}\\normalsize " << endl; //void endPreFragment() { t << "\\end{alltt}\\normalsize " << endl;
insidePre=FALSE; // insidePre=FALSE;
} // }
void startVerbatimFragment() { t << endl << endl << "\\footnotesize\\begin{verbatim}"; } //void startVerbatimFragment() { t << endl << endl << "\\footnotesize\\begin{verbatim}"; }
void endVerbatimFragment() { t << "\\end{verbatim}\\normalsize " << endl; } //void endVerbatimFragment() { t << "\\end{verbatim}\\normalsize " << endl; }
void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; } void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; }
void startCodeLine() { col=0; } void startCodeLine() { col=0; }
void endCodeLine() { codify("\n"); } void endCodeLine() { codify("\n"); }
...@@ -160,52 +160,52 @@ class LatexGenerator : public OutputGenerator ...@@ -160,52 +160,52 @@ class LatexGenerator : public OutputGenerator
void endCenter() { t << "\\end{center}" << endl; } void endCenter() { t << "\\end{center}" << endl; }
void startSmall() { t << "\\footnotesize "; } void startSmall() { t << "\\footnotesize "; }
void endSmall() { t << "\\normalsize "; } void endSmall() { t << "\\normalsize "; }
void startSubscript() { t << "$_{\\mbox{"; } //void startSubscript() { t << "$_{\\mbox{"; }
void endSubscript() { t << "}}$"; } //void endSubscript() { t << "}}$"; }
void startSuperscript() { t << "$^{\\mbox{"; } //void startSuperscript() { t << "$^{\\mbox{"; }
void endSuperscript() { t << "}}$"; } //void endSuperscript() { t << "}}$"; }
void startTable(bool hasCaption,int c) //void startTable(bool hasCaption,int c)
{ // {
if (hasCaption) t << "\\begin{table}[h]"; // if (hasCaption) t << "\\begin{table}[h]";
t << "\\begin{TabularC}{" << c << "}\n\\hline\n"; // t << "\\begin{TabularC}{" << c << "}\n\\hline\n";
} // }
void endTable(bool hasCaption) //void endTable(bool hasCaption)
{ // {
if (hasCaption) // if (hasCaption)
{ // {
t << "\\end{table}\n"; // t << "\\end{table}\n";
} // }
else // else
{ // {
t << "\\\\\\hline\n\\end{TabularC}\n"; // t << "\\\\\\hline\n\\end{TabularC}\n";
} // }
} // }
void startCaption() { t << "\\\\\\hline\n\\end{TabularC}\n" //void startCaption() { t << "\\\\\\hline\n\\end{TabularC}\n"
"\\centering\n\\caption{"; // "\\centering\n\\caption{";
} // }
void endCaption() { t << "}\n"; } //void endCaption() { t << "}\n"; }
void nextTableRow() {} //void nextTableRow() {}
void endTableRow() { t << "\\\\\\hline\n"; } //void endTableRow() { t << "\\\\\\hline\n"; }
void nextTableColumn() { t << "&"; } //void nextTableColumn() { t << "&"; }
void endTableColumn() {} //void endTableColumn() {}
void writeCopyright() { t << "\\copyright"; } //void writeCopyright() { t << "\\copyright"; }
void writeQuote() { t << "''"; } //void writeQuote() { t << "''"; }
void writeUmlaut(char c) { if (c=='i') t << "\\\"{\\i}"; else //void writeUmlaut(char c) { if (c=='i') t << "\\\"{\\i}"; else
t << "\\\"{" << c << "}"; // t << "\\\"{" << c << "}";
} // }
void writeAcute(char c) { if (c=='i') t << "\\'{\\i}"; else //void writeAcute(char c) { if (c=='i') t << "\\'{\\i}"; else
t << "\\'{" << c << "}"; // t << "\\'{" << c << "}";
} // }
void writeGrave(char c) { if (c=='i') t << "\\`{\\i}"; else //void writeGrave(char c) { if (c=='i') t << "\\`{\\i}"; else
t << "\\`{" << c << "}"; // t << "\\`{" << c << "}";
} // }
void writeCirc(char c) { if (c=='i') t << "\\^{\\i}"; else //void writeCirc(char c) { if (c=='i') t << "\\^{\\i}"; else
t << "\\^{" << c << "}"; // t << "\\^{" << c << "}";
} // }
void writeTilde(char c) { t << "\\~{" << c << "}"; } //void writeTilde(char c) { t << "\\~{" << c << "}"; }
void writeRing(char c) { t << "\\" << c << c; } //void writeRing(char c) { t << "\\" << c << c; }
void writeSharpS() { t << "\"s"; } //void writeSharpS() { t << "\"s"; }
void writeCCedil(char c) { t << "\\c{" << c << "}"; } //void writeCCedil(char c) { t << "\\c{" << c << "}"; }
void startMemberDescription() { t << "\\begin{CompactList}\\small\\item\\em "; } void startMemberDescription() { t << "\\begin{CompactList}\\small\\item\\em "; }
void endMemberDescription() { t << "\\item\\end{CompactList}"; } void endMemberDescription() { t << "\\item\\end{CompactList}"; }
void startDescList(SectionTypes) { t << "\\begin{Desc}\n\\item["; } void startDescList(SectionTypes) { t << "\\begin{Desc}\n\\item["; }
...@@ -214,12 +214,12 @@ class LatexGenerator : public OutputGenerator ...@@ -214,12 +214,12 @@ class LatexGenerator : public OutputGenerator
void endSimpleSect(); void endSimpleSect();
void startParamList(ParamListTypes,const char *title); void startParamList(ParamListTypes,const char *title);
void endParamList(); void endParamList();
void endDescTitle() { t << "]"; } //void endDescTitle() { t << "]"; }
void writeDescItem() { t << "\\par" << endl; } void writeDescItem() { t << "\\par" << endl; }
void startSection(const char *,const char *,SectionInfo::SectionType); void startSection(const char *,const char *,SectionInfo::SectionType);
void endSection(const char *,SectionInfo::SectionType); void endSection(const char *,SectionInfo::SectionType);
void writeSectionRef(const char *,const char *,const char *,const char *); //void writeSectionRef(const char *,const char *,const char *,const char *);
void writeSectionRefItem(const char *,const char *,const char *); //void writeSectionRefItem(const char *,const char *,const char *);
//void writeSectionRefAnchor(const char *,const char *,const char *); //void writeSectionRefAnchor(const char *,const char *,const char *);
void addIndexItem(const char *,const char *); void addIndexItem(const char *,const char *);
void startIndent() {} void startIndent() {}
...@@ -234,12 +234,12 @@ class LatexGenerator : public OutputGenerator ...@@ -234,12 +234,12 @@ class LatexGenerator : public OutputGenerator
void endPageRef(const char *,const char *); void endPageRef(const char *,const char *);
void startQuickIndexItem(const char *,const char *) {} void startQuickIndexItem(const char *,const char *) {}
void endQuickIndexItem() {} void endQuickIndexItem() {}
void writeFormula(const char *,const char *); //void writeFormula(const char *,const char *);
void writeNonBreakableSpace(int); void writeNonBreakableSpace(int);
void startImage(const char *,const char *,bool); //void startImage(const char *,const char *,bool);
void endImage(bool); //void endImage(bool);
void startDotFile(const char *,bool); //void startDotFile(const char *,bool);
void endDotFile(bool); //void endDotFile(bool);
void startDescTable() void startDescTable()
{ t << "\\begin{description}" << endl; } { t << "\\begin{description}" << endl; }
...@@ -278,13 +278,13 @@ class LatexGenerator : public OutputGenerator ...@@ -278,13 +278,13 @@ class LatexGenerator : public OutputGenerator
void startFontClass(const char *) {} void startFontClass(const char *) {}
void endFontClass() {} void endFontClass() {}
void startHtmlOnly() {} //void startHtmlOnly() {}
void endHtmlOnly() {} //void endHtmlOnly() {}
void startLatexOnly() {} //void startLatexOnly() {}
void endLatexOnly() {} //void endLatexOnly() {}
void startSectionRefList(); //void startSectionRefList();
void endSectionRefList(); //void endSectionRefList();
void writeCodeAnchor(const char *) {} void writeCodeAnchor(const char *) {}
......
...@@ -213,10 +213,10 @@ void ManGenerator::endHtmlLink() ...@@ -213,10 +213,10 @@ void ManGenerator::endHtmlLink()
{ {
} }
void ManGenerator::writeMailLink(const char *url) //void ManGenerator::writeMailLink(const char *url)
{ //{
docify(url); // docify(url);
} //}
void ManGenerator::startGroupHeader() void ManGenerator::startGroupHeader()
{ {
...@@ -451,11 +451,11 @@ void ManGenerator::startDescItem() ...@@ -451,11 +451,11 @@ void ManGenerator::startDescItem()
firstCol=FALSE; firstCol=FALSE;
} }
void ManGenerator::endDescTitle() //void ManGenerator::endDescTitle()
{ //{
endBold(); // endBold();
paragraph=TRUE; // paragraph=TRUE;
} //}
void ManGenerator::writeDescItem() void ManGenerator::writeDescItem()
{ {
......
...@@ -69,11 +69,11 @@ class ManGenerator : public OutputGenerator ...@@ -69,11 +69,11 @@ class ManGenerator : public OutputGenerator
void endIndexValue(const char *,bool) {} void endIndexValue(const char *,bool) {}
void startItemList() {} void startItemList() {}
void endItemList() { newParagraph(); } void endItemList() { newParagraph(); }
void startEnumList() {} //void startEnumList() {}
void endEnumList() { newParagraph(); } //void endEnumList() { newParagraph(); }
void startAlphabeticalIndexList() {} //void startAlphabeticalIndexList() {}
void endAlphabeticalIndexList() {} //void endAlphabeticalIndexList() {}
void writeIndexHeading(const char *) {} //void writeIndexHeading(const char *) {}
void writeIndexItem(const char *ref,const char *file,const char *name); void writeIndexItem(const char *ref,const char *file,const char *name);
void docify(const char *text); void docify(const char *text);
void codify(const char *text); void codify(const char *text);
...@@ -85,7 +85,7 @@ class ManGenerator : public OutputGenerator ...@@ -85,7 +85,7 @@ class ManGenerator : public OutputGenerator
void endTextLink() {} void endTextLink() {}
void startHtmlLink(const char *url); void startHtmlLink(const char *url);
void endHtmlLink(); void endHtmlLink();
void writeMailLink(const char *url); //void writeMailLink(const char *url);
void startTypewriter() { t << "\\fC"; firstCol=FALSE; } void startTypewriter() { t << "\\fC"; firstCol=FALSE; }
void endTypewriter() { t << "\\fP"; firstCol=FALSE; } void endTypewriter() { t << "\\fP"; firstCol=FALSE; }
void startGroupHeader(); void startGroupHeader();
...@@ -114,10 +114,10 @@ class ManGenerator : public OutputGenerator ...@@ -114,10 +114,10 @@ class ManGenerator : public OutputGenerator
void writeAnchor(const char *,const char *) {} void writeAnchor(const char *,const char *) {}
void startCodeFragment(); void startCodeFragment();
void endCodeFragment(); void endCodeFragment();
void startPreFragment() { startCodeFragment(); } //void startPreFragment() { startCodeFragment(); }
void endPreFragment() { endCodeFragment(); } //void endPreFragment() { endCodeFragment(); }
void startVerbatimFragment() { startCodeFragment(); } //void startVerbatimFragment() { startCodeFragment(); }
void endVerbatimFragment() { endCodeFragment(); } //void endVerbatimFragment() { endCodeFragment(); }
void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; } void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; }
void startCodeLine() {} void startCodeLine() {}
void endCodeLine() { codify("\n"); col=0; } void endCodeLine() { codify("\n"); col=0; }
...@@ -152,33 +152,33 @@ class ManGenerator : public OutputGenerator ...@@ -152,33 +152,33 @@ class ManGenerator : public OutputGenerator
void endCenter() {} void endCenter() {}
void startSmall() {} void startSmall() {}
void endSmall() {} void endSmall() {}
void startSubscript() { t << "\\*<"; firstCol=FALSE; } //void startSubscript() { t << "\\*<"; firstCol=FALSE; }
void endSubscript() { t << "\\*>"; firstCol=FALSE; } //void endSubscript() { t << "\\*>"; firstCol=FALSE; }
void startSuperscript() { t << "\\*{"; firstCol=FALSE; } //void startSuperscript() { t << "\\*{"; firstCol=FALSE; }
void endSuperscript() { t << "\\*}"; firstCol=FALSE; } //void endSuperscript() { t << "\\*}"; firstCol=FALSE; }
void startTable(bool,int) {} //void startTable(bool,int) {}
void endTable(bool) {} //void endTable(bool) {}
void startCaption() {} //void startCaption() {}
void endCaption() {} //void endCaption() {}
void nextTableRow() {} //void nextTableRow() {}
void endTableRow() {} //void endTableRow() {}
void nextTableColumn() {} //void nextTableColumn() {}
void endTableColumn() {} //void endTableColumn() {}
void writeCopyright() { t << "(c)"; firstCol=FALSE; } //void writeCopyright() { t << "(c)"; firstCol=FALSE; }
void writeQuote() { t << "`"; firstCol=FALSE; } //void writeQuote() { t << "`"; firstCol=FALSE; }
void writeUmlaut(char c) { t << c << "\\*'"; firstCol=FALSE; } //void writeUmlaut(char c) { t << c << "\\*'"; firstCol=FALSE; }
void writeAcute(char c) { t << c << "\\*`"; firstCol=FALSE; } //void writeAcute(char c) { t << c << "\\*`"; firstCol=FALSE; }
void writeGrave(char c) { t << c << "\\*:"; firstCol=FALSE; } //void writeGrave(char c) { t << c << "\\*:"; firstCol=FALSE; }
void writeCirc(char c) { t << c << "\\*^"; firstCol=FALSE; } //void writeCirc(char c) { t << c << "\\*^"; firstCol=FALSE; }
void writeTilde(char c) { t << c << "\\*~"; firstCol=FALSE; } //void writeTilde(char c) { t << c << "\\*~"; firstCol=FALSE; }
void writeRing(char c) { t << c << "\\*0"; /* just a wild guess, //void writeRing(char c) { t << c << "\\*0"; /* just a wild guess,
need to check! */ // need to check! */
firstCol=FALSE; } // firstCol=FALSE; }
void writeSharpS() { t << "s\\*:"; /* just a wild guess, //void writeSharpS() { t << "s\\*:"; /* just a wild guess,
need to check! */ // need to check! */
firstCol=FALSE; } // firstCol=FALSE; }
void writeCCedil(char c) { t << c; /* TODO: fix this */ //void writeCCedil(char c) { t << c; /* TODO: fix this */
firstCol=FALSE; } // firstCol=FALSE; }
void startMemberDescription() { t << "\n.RI \"\\fI"; firstCol=FALSE; } void startMemberDescription() { t << "\n.RI \"\\fI"; firstCol=FALSE; }
void endMemberDescription() { t << "\\fP\""; firstCol=FALSE; } void endMemberDescription() { t << "\\fP\""; firstCol=FALSE; }
void startDescList(SectionTypes); void startDescList(SectionTypes);
...@@ -187,12 +187,12 @@ class ManGenerator : public OutputGenerator ...@@ -187,12 +187,12 @@ class ManGenerator : public OutputGenerator
void endSimpleSect(); void endSimpleSect();
void startParamList(ParamListTypes,const char *title); void startParamList(ParamListTypes,const char *title);
void endParamList(); void endParamList();
void endDescTitle(); //void endDescTitle();
void writeDescItem(); void writeDescItem();
void startSection(const char *,const char *,SectionInfo::SectionType); void startSection(const char *,const char *,SectionInfo::SectionType);
void endSection(const char *,SectionInfo::SectionType); void endSection(const char *,SectionInfo::SectionType);
void writeSectionRef(const char *,const char *,const char *,const char *) {} //void writeSectionRef(const char *,const char *,const char *,const char *) {}
void writeSectionRefItem(const char *,const char *,const char *) {} //void writeSectionRefItem(const char *,const char *,const char *) {}
//void writeSectionRefAnchor(const char *,const char *,const char *) {} //void writeSectionRefAnchor(const char *,const char *,const char *) {}
void addIndexItem(const char *,const char *) {} void addIndexItem(const char *,const char *) {}
void startIndent() {} void startIndent() {}
...@@ -207,12 +207,12 @@ class ManGenerator : public OutputGenerator ...@@ -207,12 +207,12 @@ class ManGenerator : public OutputGenerator
void endPageRef(const char *,const char *) {} void endPageRef(const char *,const char *) {}
void startQuickIndexItem(const char *,const char *) {} void startQuickIndexItem(const char *,const char *) {}
void endQuickIndexItem() {} void endQuickIndexItem() {}
void writeFormula(const char *,const char *) {} //void writeFormula(const char *,const char *) {}
void writeNonBreakableSpace(int n) { int i; for (i=0;i<n;i++) t << " "; } void writeNonBreakableSpace(int n) { int i; for (i=0;i<n;i++) t << " "; }
void startImage(const char *,const char *,bool) {} //void startImage(const char *,const char *,bool) {}
void endImage(bool) {} //void endImage(bool) {}
void startDotFile(const char *,bool) {} //void startDotFile(const char *,bool) {}
void endDotFile(bool) {} //void endDotFile(bool) {}
void startDescTable() {} void startDescTable() {}
void endDescTable() {} void endDescTable() {}
...@@ -245,13 +245,13 @@ class ManGenerator : public OutputGenerator ...@@ -245,13 +245,13 @@ class ManGenerator : public OutputGenerator
void startFontClass(const char *) {} void startFontClass(const char *) {}
void endFontClass() {} void endFontClass() {}
void startHtmlOnly() {} //void startHtmlOnly() {}
void endHtmlOnly() {} //void endHtmlOnly() {}
void startLatexOnly() {} //void startLatexOnly() {}
void endLatexOnly() {} //void endLatexOnly() {}
void startSectionRefList() {} //void startSectionRefList() {}
void endSectionRefList() {} //void endSectionRefList() {}
void writeCodeAnchor(const char *) {} void writeCodeAnchor(const char *) {}
......
...@@ -301,7 +301,7 @@ MemberDef::MemberDef(const char *df,int dl, ...@@ -301,7 +301,7 @@ MemberDef::MemberDef(const char *df,int dl,
exception=e; exception=e;
proto=FALSE; proto=FALSE;
annScope=FALSE; annScope=FALSE;
memSpec=FALSE; memSpec=0;
annMemb=0; annMemb=0;
annUsed=FALSE; annUsed=FALSE;
annShown=FALSE; annShown=FALSE;
...@@ -651,6 +651,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -651,6 +651,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
case Define: Doxygen::tagFile << "define"; break; case Define: Doxygen::tagFile << "define"; break;
case EnumValue: Doxygen::tagFile << "enumvalue"; break; case EnumValue: Doxygen::tagFile << "enumvalue"; break;
case Property: Doxygen::tagFile << "property"; break; case Property: Doxygen::tagFile << "property"; break;
case Event: Doxygen::tagFile << "event"; break;
case Variable: Doxygen::tagFile << "variable"; break; case Variable: Doxygen::tagFile << "variable"; break;
case Typedef: Doxygen::tagFile << "typedef"; break; case Typedef: Doxygen::tagFile << "typedef"; break;
case Enumeration: Doxygen::tagFile << "enumeration"; break; case Enumeration: Doxygen::tagFile << "enumeration"; break;
...@@ -776,7 +777,8 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -776,7 +777,8 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (getAnonymousEnumType()) // type is an anonymous enum if (getAnonymousEnumType()) // type is an anonymous enum
{ {
linkifyText(TextGeneratorOLImpl(ol),cname,name(),ltype.left(i),TRUE); linkifyText(TextGeneratorOLImpl(ol),cname,name(),ltype.left(i),TRUE);
ol+=*getAnonymousEnumType()->enumDecl(); getAnonymousEnumType()->writeEnumDeclaration(ol,cd,nd,fd,gd);
//ol+=*getAnonymousEnumType()->enumDecl();
linkifyText(TextGeneratorOLImpl(ol),cname,name(),ltype.right(ltype.length()-i-l),TRUE); linkifyText(TextGeneratorOLImpl(ol),cname,name(),ltype.right(ltype.length()-i-l),TRUE);
} }
else else
...@@ -1053,7 +1055,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1053,7 +1055,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
htmlHelp->addIndexItem(cname,name(),cfname,anchor()); htmlHelp->addIndexItem(cname,name(),cfname,anchor());
} }
linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef.left(i)); linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef.left(i));
ol+=*vmd->enumDecl(); //ol+=*vmd->enumDecl();
vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef());
linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef.right(ldef.length()-i-l)); linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef.right(ldef.length()-i-l));
found=TRUE; found=TRUE;
...@@ -1169,7 +1172,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1169,7 +1172,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
isFriend() || isRelated() || isExplicit() || isFriend() || isRelated() || isExplicit() ||
isMutable() || (isInline() && Config_getBool("INLINE_INFO")) || isMutable() || (isInline() && Config_getBool("INLINE_INFO")) ||
isSignal() || isSlot() || isSignal() || isSlot() ||
isStatic() || (classDef && classDef!=container) isStatic() || (classDef && classDef!=container) ||
isSettable() || isGettable()
) )
{ {
// write the member specifier list // write the member specifier list
...@@ -1186,6 +1190,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1186,6 +1190,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (isExplicit()) sl.append("explicit"); if (isExplicit()) sl.append("explicit");
if (isMutable()) sl.append("mutable"); if (isMutable()) sl.append("mutable");
if (isStatic()) sl.append("static"); if (isStatic()) sl.append("static");
if (isGettable()) sl.append("get");
if (isSettable()) sl.append("set");
if (protection()==Protected) sl.append("protected"); if (protection()==Protected) sl.append("protected");
else if (protection()==Private) sl.append("private"); else if (protection()==Private) sl.append("private");
if (lvirt==Virtual) sl.append("virtual"); if (lvirt==Virtual) sl.append("virtual");
...@@ -1585,11 +1591,11 @@ bool MemberDef::isLinkable() const ...@@ -1585,11 +1591,11 @@ bool MemberDef::isLinkable() const
} }
} }
void MemberDef::setEnumDecl(OutputList &ed) //void MemberDef::setEnumDecl(OutputList &ed)
{ //{
enumDeclList=new OutputList(&ed); // enumDeclList=new OutputList(&ed);
*enumDeclList+=ed; // *enumDeclList+=ed;
} //}
bool MemberDef::isDocumentedFriendClass() const bool MemberDef::isDocumentedFriendClass() const
{ {
...@@ -1706,6 +1712,7 @@ MemberDef *MemberDef::createTemplateInstanceMember( ...@@ -1706,6 +1712,7 @@ MemberDef *MemberDef::createTemplateInstanceMember(
imd->def = substituteTemplateArgumentsInString(def,formalArgs,actualArgs); imd->def = substituteTemplateArgumentsInString(def,formalArgs,actualArgs);
imd->setBodyDef(getBodyDef()); imd->setBodyDef(getBodyDef());
imd->setBodySegment(getStartBodyLine(),getEndBodyLine()); imd->setBodySegment(getStartBodyLine(),getEndBodyLine());
imd->setBodyMember(this);
// TODO: init other member variables (if needed). // TODO: init other member variables (if needed).
// TODO: reimplemented info // TODO: reimplemented info
...@@ -1796,3 +1803,122 @@ bool MemberDef::isDestructor() const ...@@ -1796,3 +1803,122 @@ bool MemberDef::isDestructor() const
return name().find('~')!=-1 && name().find("operator")==-1; return name().find('~')!=-1 && name().find("operator")==-1;
} }
void MemberDef::writeEnumDeclaration(OutputList &typeDecl,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd)
{
int enumMemCount=0;
QList<MemberDef> *fmdl=enumFieldList();
uint numVisibleEnumValues=0;
if (fmdl)
{
MemberDef *fmd=fmdl->first();
while (fmd)
{
if (fmd->isBriefSectionVisible()) numVisibleEnumValues++;
fmd=fmdl->next();
}
}
if (numVisibleEnumValues==0 && !isBriefSectionVisible()) return;
QCString n = name();
int i=n.findRev("::");
if (i!=-1) n=n.right(n.length()-i-2); // strip scope (TODO: is this needed?)
if (n[0]!='@') // not an anonymous enum
{
if (isLinkableInProject() || hasDocumentedEnumValues())
{
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <member kind=\"enumeration\">" << endl;
Doxygen::tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
Doxygen::tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl;
Doxygen::tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>" << endl;
Doxygen::tagFile << " </member>" << endl;
}
writeLink(typeDecl,cd,nd,fd,gd);
}
else
{
typeDecl.startBold();
typeDecl.docify(n);
typeDecl.endBold();
}
typeDecl.writeChar(' ');
}
if (numVisibleEnumValues>0)
{
uint enumValuesPerLine = (uint)Config_getInt("ENUM_VALUES_PER_LINE");
typeDecl.docify("{ ");
if (fmdl)
{
MemberDef *fmd=fmdl->first();
bool fmdVisible = fmd->isBriefSectionVisible();
while (fmd)
{
if (fmdVisible)
{
/* in html we start a new line after a number of items */
if (numVisibleEnumValues>enumValuesPerLine
&& (enumMemCount%enumValuesPerLine)==0
)
{
typeDecl.pushGeneratorState();
typeDecl.disableAllBut(OutputGenerator::Html);
typeDecl.lineBreak();
typeDecl.writeString("&nbsp;&nbsp;");
typeDecl.popGeneratorState();
}
if (fmd->hasDocumentation()) // enum value has docs
{
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{
Doxygen::tagFile << " <member kind=\"enumvalue\">" << endl;
Doxygen::tagFile << " <name>" << convertToXML(fmd->name()) << "</name>" << endl;
Doxygen::tagFile << " <anchor>" << convertToXML(fmd->anchor()) << "</anchor>" << endl;
Doxygen::tagFile << " <arglist>" << convertToXML(fmd->argsString()) << "</arglist>" << endl;
Doxygen::tagFile << " </member>" << endl;
}
fmd->writeLink(typeDecl,cd,nd,fd,gd);
}
else // no docs for this enum value
{
typeDecl.startBold();
typeDecl.docify(fmd->name());
typeDecl.endBold();
}
if (fmd->hasOneLineInitializer()) // enum value has initializer
{
typeDecl.writeString(" = ");
typeDecl.parseText(fmd->initializer());
}
}
bool prevVisible = fmdVisible;
fmd=fmdl->next();
if (fmd && (fmdVisible=fmd->isBriefSectionVisible()))
{
typeDecl.writeString(", ");
}
if (prevVisible)
{
typeDecl.disable(OutputGenerator::Man);
typeDecl.writeString("\n"); // to prevent too long lines in LaTeX
typeDecl.enable(OutputGenerator::Man);
enumMemCount++;
}
}
if (numVisibleEnumValues>enumValuesPerLine)
{
typeDecl.pushGeneratorState();
typeDecl.disableAllBut(OutputGenerator::Html);
typeDecl.lineBreak();
typeDecl.popGeneratorState();
}
}
typeDecl.docify(" }");
}
}
...@@ -60,7 +60,8 @@ class MemberDef : public Definition ...@@ -60,7 +60,8 @@ class MemberDef : public Definition
Slot, Slot,
Friend, Friend,
DCOP, DCOP,
Property Property,
Event
}; };
MemberDef(const char *defFileName,int defLine, MemberDef(const char *defFileName,int defLine,
...@@ -114,11 +115,14 @@ class MemberDef : public Definition ...@@ -114,11 +115,14 @@ class MemberDef : public Definition
bool isFriend() const { return mtype==Friend; } bool isFriend() const { return mtype==Friend; }
bool isDCOP() const { return mtype==DCOP; } bool isDCOP() const { return mtype==DCOP; }
bool isProperty() const { return mtype==Property; } bool isProperty() const { return mtype==Property; }
bool isEvent() const { return mtype==Event; }
bool isRelated() const { return related; } bool isRelated() const { return related; }
bool isStatic() const { return stat; } bool isStatic() const { return stat; }
bool isInline() const { return (memSpec&Entry::Inline)!=0; } bool isInline() const { return (memSpec&Entry::Inline)!=0; }
bool isExplicit() const { return (memSpec&Entry::Explicit)!=0; } bool isExplicit() const { return (memSpec&Entry::Explicit)!=0; }
bool isMutable() const { return (memSpec&Entry::Mutable)!=0; } bool isMutable() const { return (memSpec&Entry::Mutable)!=0; }
bool isGettable() const { return (memSpec&Entry::Gettable)!=0; }
bool isSettable() const { return (memSpec&Entry::Settable)!=0; }
bool isExternal() const { return explExt; } bool isExternal() const { return explExt; }
bool isConstructor() const; bool isConstructor() const;
bool isDestructor() const; bool isDestructor() const;
...@@ -173,10 +177,10 @@ class MemberDef : public Definition ...@@ -173,10 +177,10 @@ class MemberDef : public Definition
void insertEnumField(MemberDef *md); void insertEnumField(MemberDef *md);
void setEnumScope(MemberDef *md); void setEnumScope(MemberDef *md);
MemberDef *getEnumScope() const { return enumScope; } MemberDef *getEnumScope() const { return enumScope; }
void setEnumDecl(OutputList &ed);
//void setEnumUsed() { eUsed=TRUE; } //void setEnumUsed() { eUsed=TRUE; }
//bool enumUsed() const { return eUsed; } //bool enumUsed() const { return eUsed; }
OutputList *enumDecl() const { return enumDeclList; } //void setEnumDecl(OutputList &ed);
//OutputList *enumDecl() const { return enumDeclList; }
MemberList *enumFieldList() const { return enumFields; } MemberList *enumFieldList() const { return enumFields; }
void setDocumentedEnumValues(bool value) { docEnumValues=value; } void setDocumentedEnumValues(bool value) { docEnumValues=value; }
bool hasDocumentedEnumValues() const { return docEnumValues; } bool hasDocumentedEnumValues() const { return docEnumValues; }
...@@ -252,6 +256,10 @@ class MemberDef : public Definition ...@@ -252,6 +256,10 @@ class MemberDef : public Definition
MemberDef *memberDefinition() const { return memDef; } MemberDef *memberDefinition() const { return memDef; }
MemberDef *memberDeclaration() const { return memDec; } MemberDef *memberDeclaration() const { return memDec; }
void writeEnumDeclaration(OutputList &typeDecl,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd);
bool visited; bool visited;
private: private:
......
...@@ -66,6 +66,7 @@ void MemberList::countDecMembers() ...@@ -66,6 +66,7 @@ void MemberList::countDecMembers()
switch(md->memberType()) switch(md->memberType())
{ {
case MemberDef::Variable: // fall through case MemberDef::Variable: // fall through
case MemberDef::Event: // fall through
case MemberDef::Property: m_varCnt++,m_numDecMembers++; case MemberDef::Property: m_varCnt++,m_numDecMembers++;
break; break;
case MemberDef::Function: // fall through case MemberDef::Function: // fall through
...@@ -189,7 +190,8 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -189,7 +190,8 @@ void MemberList::writePlainDeclarations(OutputList &ol,
case MemberDef::Signal: // fall through case MemberDef::Signal: // fall through
case MemberDef::Slot: // fall through case MemberDef::Slot: // fall through
case MemberDef::DCOP: // fall through case MemberDef::DCOP: // fall through
case MemberDef::Property: case MemberDef::Property: // fall through
case MemberDef::Event:
{ {
if (first) ol.startMemberList(),first=FALSE; if (first) ol.startMemberList(),first=FALSE;
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup); md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
...@@ -198,6 +200,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -198,6 +200,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
case MemberDef::Enumeration: case MemberDef::Enumeration:
{ {
if (first) ol.startMemberList(),first=FALSE; if (first) ol.startMemberList(),first=FALSE;
#if 0
OutputList typeDecl(&ol); OutputList typeDecl(&ol);
QCString name(md->name()); QCString name(md->name());
int i=name.findRev("::"); int i=name.findRev("::");
...@@ -313,9 +316,13 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -313,9 +316,13 @@ void MemberList::writePlainDeclarations(OutputList &ol,
typeDecl.docify(" }"); typeDecl.docify(" }");
md->setEnumDecl(typeDecl); md->setEnumDecl(typeDecl);
} }
#endif
int enumVars=0; int enumVars=0;
MemberListIterator vmli(*this); MemberListIterator vmli(*this);
MemberDef *vmd; MemberDef *vmd;
QCString name(md->name());
int i=name.findRev("::");
if (i!=-1) name=name.right(name.length()-i-2); // strip scope (TODO: is this needed?)
if (name[0]=='@') // anonymous enum => append variables if (name[0]=='@') // anonymous enum => append variables
{ {
for ( ; (vmd=vmli.current()) ; ++vmli) for ( ; (vmd=vmli.current()) ; ++vmli)
...@@ -335,7 +342,8 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -335,7 +342,8 @@ void MemberList::writePlainDeclarations(OutputList &ol,
ol.startMemberItem(0); ol.startMemberItem(0);
ol.writeString("enum "); ol.writeString("enum ");
ol.insertMemberAlign(); ol.insertMemberAlign();
ol+=typeDecl; // append the enum values. //ol+=typeDecl; // append the enum values.
md->writeEnumDeclaration(ol,cd,nd,fd,gd);
ol.endMemberItem(FALSE); ol.endMemberItem(FALSE);
if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{ {
......
...@@ -66,12 +66,13 @@ class BaseCodeDocInterface ...@@ -66,12 +66,13 @@ class BaseCodeDocInterface
virtual void writeCodeAnchor(const char *name) = 0; virtual void writeCodeAnchor(const char *name) = 0;
}; };
/*! \brief Base Interface used for generating documentation. /*! \brief Base Interface used for generating output outside of the
* comment blocks.
* *
* This abstract class is used by the documentation block * This abstract class is used by output generation functions
* parser to generate the output for a specific format, * to generate the output for a specific format,
* or a list of formats (see OutputList). This interface * or a list of formats (see OutputList). This interface
* contains functions that generate output. * contains functions that generate fragments of the output.
*/ */
class BaseOutputDocInterface : public BaseCodeDocInterface class BaseOutputDocInterface : public BaseCodeDocInterface
{ {
...@@ -232,62 +233,10 @@ class BaseOutputDocInterface : public BaseCodeDocInterface ...@@ -232,62 +233,10 @@ class BaseOutputDocInterface : public BaseCodeDocInterface
virtual void endTextLink() = 0; virtual void endTextLink() = 0;
virtual void startPageRef() = 0; virtual void startPageRef() = 0;
virtual void endPageRef(const char *,const char *) = 0; virtual void endPageRef(const char *,const char *) = 0;
/********************* Functions to remove *******************************/
virtual void writeMailLink(const char *url) = 0;
virtual void startPreFragment() = 0;
virtual void endPreFragment() = 0;
virtual void startVerbatimFragment() = 0;
virtual void endVerbatimFragment() = 0;
virtual void startSubsection() = 0; virtual void startSubsection() = 0;
virtual void endSubsection() = 0; virtual void endSubsection() = 0;
virtual void startSubsubsection() = 0; virtual void startSubsubsection() = 0;
virtual void endSubsubsection() = 0; virtual void endSubsubsection() = 0;
virtual void startSubscript() = 0;
virtual void endSubscript() = 0;
virtual void startSuperscript() = 0;
virtual void endSuperscript() = 0;
virtual void startTable(bool hasCaption,int cols) = 0;
virtual void endTable(bool hasCaption) = 0;
virtual void startCaption() = 0;
virtual void endCaption() = 0;
virtual void nextTableRow() = 0;
virtual void endTableRow() = 0;
virtual void nextTableColumn() = 0;
virtual void endTableColumn() = 0;
virtual void writeQuote() = 0;
virtual void writeCopyright() = 0;
virtual void writeUmlaut(char) = 0;
virtual void writeAcute(char) = 0;
virtual void writeGrave(char) = 0;
virtual void writeCirc(char) = 0;
virtual void writeTilde(char) = 0;
virtual void writeRing(char) = 0;
virtual void writeSharpS() = 0;
virtual void writeCCedil(char) = 0;
virtual void endDescTitle() = 0;
virtual void writeSectionRef(const char *,const char *,
const char *,const char *) = 0;
virtual void writeSectionRefItem(const char *,const char *,const char *) = 0;
virtual void startEnumList() = 0;
virtual void endEnumList() = 0;
virtual void startImage(const char *,const char *,bool) = 0;
virtual void endImage(bool) = 0;
virtual void startDotFile(const char *,bool) = 0;
virtual void endDotFile(bool) = 0;
virtual void writeFormula(const char *,const char *) = 0;
virtual void startHtmlOnly() = 0;
virtual void endHtmlOnly() = 0;
virtual void startLatexOnly() = 0;
virtual void endLatexOnly() = 0;
virtual void startSectionRefList() = 0;
virtual void endSectionRefList() = 0;
/************************************************************************/
}; };
/*! \brief Abstract output generator. /*! \brief Abstract output generator.
...@@ -306,7 +255,7 @@ class OutputGenerator : public BaseOutputDocInterface ...@@ -306,7 +255,7 @@ class OutputGenerator : public BaseOutputDocInterface
// generic generator methods // generic generator methods
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
virtual OutputGenerator *copy() = 0; virtual OutputGenerator *copy() = 0;
virtual void append(const OutputGenerator *) = 0; //virtual void append(const OutputGenerator *) = 0;
virtual void enable() = 0; virtual void enable() = 0;
virtual void disable() = 0; virtual void disable() = 0;
virtual void enableIf(OutputType o) = 0; virtual void enableIf(OutputType o) = 0;
...@@ -314,8 +263,8 @@ class OutputGenerator : public BaseOutputDocInterface ...@@ -314,8 +263,8 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void disableIfNot(OutputType o) = 0; virtual void disableIfNot(OutputType o) = 0;
virtual bool isEnabled(OutputType o) = 0; virtual bool isEnabled(OutputType o) = 0;
virtual OutputGenerator *get(OutputType o) = 0; virtual OutputGenerator *get(OutputType o) = 0;
void clear() { b.close(); a.resize(0); b.setBuffer(a); //void clear() { b.close(); a.resize(0); b.setBuffer(a);
b.open(IO_WriteOnly); t.setDevice(&b); } // b.open(IO_WriteOnly); t.setDevice(&b); }
void startPlainFile(const char *name); void startPlainFile(const char *name);
void endPlainFile(); void endPlainFile();
QCString getContents() const; QCString getContents() const;
...@@ -345,9 +294,6 @@ class OutputGenerator : public BaseOutputDocInterface ...@@ -345,9 +294,6 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endIndexKey() = 0; virtual void endIndexKey() = 0;
virtual void startIndexValue(bool) = 0; virtual void startIndexValue(bool) = 0;
virtual void endIndexValue(const char *,bool) = 0; virtual void endIndexValue(const char *,bool) = 0;
virtual void startAlphabeticalIndexList() = 0;
virtual void endAlphabeticalIndexList() = 0;
virtual void writeIndexHeading(const char *s) = 0;
virtual void writeIndexItem(const char *ref,const char *file, virtual void writeIndexItem(const char *ref,const char *file,
const char *text) = 0; const char *text) = 0;
virtual void startGroupHeader() = 0; virtual void startGroupHeader() = 0;
...@@ -466,7 +412,7 @@ class OutputDocInterface : public BaseOutputDocInterface ...@@ -466,7 +412,7 @@ class OutputDocInterface : public BaseOutputDocInterface
/*! Appends the output generated by generator \a g to this /*! Appends the output generated by generator \a g to this
* generator. * generator.
*/ */
virtual void append(const OutputDocInterface *g) = 0; //virtual void append(const OutputDocInterface *g) = 0;
/*! Pushes the state of the current generator (or list of /*! Pushes the state of the current generator (or list of
* generators) on a stack. * generators) on a stack.
......
...@@ -156,20 +156,20 @@ bool OutputList::isEnabled(OutputGenerator::OutputType o) ...@@ -156,20 +156,20 @@ bool OutputList::isEnabled(OutputGenerator::OutputType o)
return result; return result;
} }
OutputList &OutputList::operator+=(const OutputList &outputList) //OutputList &OutputList::operator+=(const OutputList &outputList)
{ //{
OutputList *ol=(OutputList *)&outputList; // OutputList *ol=(OutputList *)&outputList;
OutputGenerator *ogsrc=ol->outputs->first(); // OutputGenerator *ogsrc=ol->outputs->first();
OutputGenerator *ogdst=outputs->first(); // OutputGenerator *ogdst=outputs->first();
//printf("OutputList::operator+= src=%d dst=%d\n",outputs->count(),ol->outputs->count()); // //printf("OutputList::operator+= src=%d dst=%d\n",outputs->count(),ol->outputs->count());
while (ogdst && ogsrc) // while (ogdst && ogsrc)
{ // {
ogdst->append(ogsrc); // ogdst->append(ogsrc);
ogsrc=ol->outputs->next(); // ogsrc=ol->outputs->next();
ogdst=outputs->next(); // ogdst=outputs->next();
} // }
return *this; // return *this;
} //}
void OutputList::pushGeneratorState() void OutputList::pushGeneratorState()
{ {
......
This diff is collapsed.
This diff is collapsed.
...@@ -2049,7 +2049,7 @@ void preprocessFile(const char *fileName,BufStr &output) ...@@ -2049,7 +2049,7 @@ void preprocessFile(const char *fileName,BufStr &output)
} }
else else
{ {
QCString cmd = inputFilter+" "+fileName; QCString cmd = inputFilter+" \""+fileName+"\"";
preYYin = popen(cmd,"r"); preYYin = popen(cmd,"r");
if (!preYYin) if (!preYYin)
{ {
......
...@@ -910,7 +910,7 @@ void RTFDocVisitor::visitPre(DocParamList *pl) ...@@ -910,7 +910,7 @@ void RTFDocVisitor::visitPre(DocParamList *pl)
for (li.toFirst();(s=li.current());++li) for (li.toFirst();(s=li.current());++li)
{ {
if (!first) m_t << ","; else first=FALSE; if (!first) m_t << ","; else first=FALSE;
m_t << s; filter(s);
} }
m_t << "} "; m_t << "} ";
} }
......
This diff is collapsed.
...@@ -72,11 +72,11 @@ class RTFGenerator : public OutputGenerator ...@@ -72,11 +72,11 @@ class RTFGenerator : public OutputGenerator
void endIndexValue(const char *,bool); void endIndexValue(const char *,bool);
void startItemList(); void startItemList();
void endItemList(); void endItemList();
void startEnumList(); //void startEnumList();
void endEnumList(); //void endEnumList();
void startAlphabeticalIndexList() {} //void startAlphabeticalIndexList() {}
void endAlphabeticalIndexList() {} //void endAlphabeticalIndexList() {}
void writeIndexHeading(const char *) {} //void writeIndexHeading(const char *) {}
void writeIndexItem(const char *ref,const char *file,const char *name); void writeIndexItem(const char *ref,const char *file,const char *name);
void docify(const char *text); void docify(const char *text);
void codify(const char *text); void codify(const char *text);
...@@ -88,7 +88,7 @@ class RTFGenerator : public OutputGenerator ...@@ -88,7 +88,7 @@ class RTFGenerator : public OutputGenerator
void endTextLink(); void endTextLink();
void startHtmlLink(const char *url); void startHtmlLink(const char *url);
void endHtmlLink(); void endHtmlLink();
void writeMailLink(const char *url); //void writeMailLink(const char *url);
void startTypewriter() { t << "{\\f2 "; } void startTypewriter() { t << "{\\f2 "; }
void endTypewriter() { t << "}"; } void endTypewriter() { t << "}"; }
void startGroupHeader(); void startGroupHeader();
...@@ -114,10 +114,10 @@ class RTFGenerator : public OutputGenerator ...@@ -114,10 +114,10 @@ class RTFGenerator : public OutputGenerator
void writeAnchor(const char *fileName,const char *name); void writeAnchor(const char *fileName,const char *name);
void startCodeFragment(); void startCodeFragment();
void endCodeFragment(); void endCodeFragment();
void startPreFragment() { startCodeFragment(); } //void startPreFragment() { startCodeFragment(); }
void endPreFragment() { endCodeFragment(); } //void endPreFragment() { endCodeFragment(); }
void startVerbatimFragment() { startCodeFragment(); } //void startVerbatimFragment() { startCodeFragment(); }
void endVerbatimFragment() { endCodeFragment(); } //void endVerbatimFragment() { endCodeFragment(); }
void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; } void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; }
void startCodeLine() { col=0; } void startCodeLine() { col=0; }
void endCodeLine() { lineBreak(); } void endCodeLine() { lineBreak(); }
...@@ -152,43 +152,43 @@ class RTFGenerator : public OutputGenerator ...@@ -152,43 +152,43 @@ class RTFGenerator : public OutputGenerator
void endCenter() { t << "}"; } void endCenter() { t << "}"; }
void startSmall() { t << "{\\sub "; } void startSmall() { t << "{\\sub "; }
void endSmall() { t << "}"; } void endSmall() { t << "}"; }
void startSubscript() { t << "{\\sub " << endl;} //void startSubscript() { t << "{\\sub " << endl;}
void endSubscript() { t << "}"; } //void endSubscript() { t << "}"; }
void startSuperscript() { t << "{\\super " << endl;} //void startSuperscript() { t << "{\\super " << endl;}
void endSuperscript() { t << "}"; } //void endSuperscript() { t << "}"; }
void startTable(bool,int); //void startTable(bool,int);
void endTable(bool); //void endTable(bool);
void startCaption(); //void startCaption();
void endCaption(); //void endCaption();
void nextTableRow(); //void nextTableRow();
void endTableRow(); //void endTableRow();
void nextTableColumn(); //void nextTableColumn();
void endTableColumn(); //void endTableColumn();
void writeCopyright() { t << "\251"; } //void writeCopyright() { t << "\251"; }
void writeQuote() { t << "\""; } //void writeQuote() { t << "\""; }
void writeUmlaut(char c); //void writeUmlaut(char c);
void writeAcute(char c); //void writeAcute(char c);
void writeGrave(char c); //void writeGrave(char c);
void writeCirc(char c); //void writeCirc(char c);
void writeTilde(char c); //void writeTilde(char c);
void writeRing(char c); //void writeRing(char c);
void writeSharpS() { t << "\337"; } //void writeSharpS() { t << "\337"; }
void writeCCedil(char c); //void writeCCedil(char c);
void startMemberDescription(); void startMemberDescription();
void endMemberDescription(); void endMemberDescription();
void startDescList(SectionTypes); void startDescList(SectionTypes);
void endDescList(); //void endDescList();
void startSimpleSect(SectionTypes,const char *,const char *,const char *); void startSimpleSect(SectionTypes,const char *,const char *,const char *);
void endSimpleSect(); void endSimpleSect();
void startParamList(ParamListTypes,const char *); void startParamList(ParamListTypes,const char *);
void endParamList(); void endParamList();
void endDescTitle(); //void endDescTitle();
void writeDescItem(); void writeDescItem();
void startSection(const char *,const char *,SectionInfo::SectionType); void startSection(const char *,const char *,SectionInfo::SectionType);
void endSection(const char *,SectionInfo::SectionType); void endSection(const char *,SectionInfo::SectionType);
void writeSectionRef(const char *,const char *,const char *,const char *); //void writeSectionRef(const char *,const char *,const char *,const char *);
void writeSectionRefItem(const char *,const char *,const char *); //void writeSectionRefItem(const char *,const char *,const char *);
//void writeSectionRefAnchor(const char *,const char *,const char *); //void writeSectionRefAnchor(const char *,const char *,const char *);
void addIndexItem(const char *,const char *); void addIndexItem(const char *,const char *);
void startIndent(); void startIndent();
...@@ -203,12 +203,12 @@ class RTFGenerator : public OutputGenerator ...@@ -203,12 +203,12 @@ class RTFGenerator : public OutputGenerator
void endPageRef(const char *,const char *); void endPageRef(const char *,const char *);
void startQuickIndexItem(const char *,const char *) {} void startQuickIndexItem(const char *,const char *) {}
void endQuickIndexItem() {} void endQuickIndexItem() {}
void writeFormula(const char *,const char *); //void writeFormula(const char *,const char *);
void writeNonBreakableSpace(int); void writeNonBreakableSpace(int);
void startImage(const char *,const char *,bool); //void startImage(const char *,const char *,bool);
void endImage(bool); //void endImage(bool);
void startDotFile(const char *,bool); //void startDotFile(const char *,bool);
void endDotFile(bool); //void endDotFile(bool);
void startDescTable(); void startDescTable();
void endDescTable(); void endDescTable();
...@@ -248,13 +248,13 @@ class RTFGenerator : public OutputGenerator ...@@ -248,13 +248,13 @@ class RTFGenerator : public OutputGenerator
void startFontClass(const char *) {} void startFontClass(const char *) {}
void endFontClass() {} void endFontClass() {}
void startHtmlOnly() {} //void startHtmlOnly() {}
void endHtmlOnly() {} //void endHtmlOnly() {}
void startLatexOnly() {} //void startLatexOnly() {}
void endLatexOnly() {} //void endLatexOnly() {}
void startSectionRefList() {} //void startSectionRefList() {}
void endSectionRefList() {} //void endSectionRefList() {}
void writeCodeAnchor(const char *) {} void writeCodeAnchor(const char *) {}
......
...@@ -122,6 +122,7 @@ static QCString formulaText; ...@@ -122,6 +122,7 @@ static QCString formulaText;
static bool useOverrideCommands = FALSE; static bool useOverrideCommands = FALSE;
static bool insideIDL = FALSE; static bool insideIDL = FALSE;
static bool insideJava = FALSE; static bool insideJava = FALSE;
static bool insideCS = FALSE;
static bool insidePHP = FALSE; static bool insidePHP = FALSE;
static bool insidePHPCode = FALSE; static bool insidePHPCode = FALSE;
static bool insideCppQuote = FALSE; static bool insideCppQuote = FALSE;
...@@ -391,7 +392,8 @@ static void setContext() ...@@ -391,7 +392,8 @@ static void setContext()
QCString fileName = yyFileName; QCString fileName = yyFileName;
insideIDL = fileName.right(4)==".idl" || fileName.right(4)==".odl"; insideIDL = fileName.right(4)==".idl" || fileName.right(4)==".odl";
insideJava = fileName.right(5)==".java"; insideJava = fileName.right(5)==".java";
insidePHP = fileName.right(4)==".php" || fileName.right(4)==".inc"; insideCS = fileName.right(3)==".cs";
insidePHP = fileName.right(4)==".php" || fileName.right(4)==".inc";
if ( insidePHP ) if ( insidePHP )
{ {
useOverrideCommands = TRUE; useOverrideCommands = TRUE;
...@@ -510,6 +512,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]* ...@@ -510,6 +512,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
LABELID [a-z_A-Z][a-z_A-Z0-9\-]* LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?) SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?)
SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
ATTR ({B}+[^>\n]*)? ATTR ({B}+[^>\n]*)?
A [aA] A [aA]
BR [bB][rR] BR [bB][rR]
...@@ -653,6 +656,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -653,6 +656,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
%x PackageName %x PackageName
%x GetCallType %x GetCallType
%x JavaImport %x JavaImport
%x CSAccessorDecl
%% %%
...@@ -1277,25 +1281,21 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1277,25 +1281,21 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
insideTryBlock=FALSE; insideTryBlock=FALSE;
BEGIN(TryFunctionBlock); BEGIN(TryFunctionBlock);
} }
// else if ( insidePHP && strcmp(yytext,"function")==0 )
// {
// BEGIN(
// }
else else
{ {
if (YY_START==FindMembers) if (YY_START==FindMembers)
{ {
addType( current ) ; addType( current ) ;
} }
if (insideJava && strcmp(yytext,"public")==0) if ((insideJava || insideCS) && strcmp(yytext,"public")==0)
{ {
current->protection = Public; current->protection = Public;
} }
else if (insideJava && strcmp(yytext,"protected")==0) else if ((insideJava || insideCS) && strcmp(yytext,"protected")==0)
{ {
current->protection = Protected; current->protection = Protected;
} }
else if (insideJava && strcmp(yytext,"private")==0) else if ((insideJava || insideCS) && strcmp(yytext,"private")==0)
{ {
current->protection = Private; current->protection = Private;
} }
...@@ -1318,7 +1318,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1318,7 +1318,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
} }
} }
<FindMembers>"." { <FindMembers>"." {
if (insideJava) if (insideJava || insideCS)
{ {
current->name+="."; current->name+=".";
} }
...@@ -2727,6 +2727,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -2727,6 +2727,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
lineCount(); lineCount();
BEGIN( ClassVar ); BEGIN( ClassVar );
} }
<CompoundName>{CSSCOPENAME} { // C# style scope
current->name = substitute(yytext,".","::");
lineCount();
BEGIN( ClassVar );
}
<ClassVar>{SCOPENAME}{BN}*/"(" { <ClassVar>{SCOPENAME}{BN}*/"(" {
if (insideIDL && strncmp(yytext,"switch",6)==0 && !isId(yytext[6])) if (insideIDL && strncmp(yytext,"switch",6)==0 && !isId(yytext[6]))
{ {
...@@ -2792,7 +2797,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -2792,7 +2797,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
} }
<ClassVar>":" { <ClassVar>":" {
current->type.resize(0); current->type.resize(0);
if (current->section == Entry::INTERFACE_SEC || current->section == Entry::STRUCT_SEC || insidePHP) if (current->section == Entry::INTERFACE_SEC ||
current->section == Entry::STRUCT_SEC ||
insidePHP || insideCS
)
baseProt=Public; baseProt=Public;
else else
baseProt=Private; baseProt=Private;
...@@ -2889,7 +2897,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -2889,7 +2897,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->extends->append( current->extends->append(
new BaseInfo(baseName,baseProt,baseVirt) new BaseInfo(baseName,baseProt,baseVirt)
); );
if (current->section == Entry::INTERFACE_SEC || insideJava || insidePHP) if (current->section == Entry::INTERFACE_SEC || insideJava || insidePHP || insideCS)
baseProt=Public; baseProt=Public;
else else
baseProt=Private; baseProt=Private;
...@@ -3040,23 +3048,59 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -3040,23 +3048,59 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
lineCount(); lineCount();
} }
<FindMembers>"{" { <FindMembers>"{" {
if (insideJava && current->stat && current->name.isEmpty() && current->type.isEmpty()) if (insideCS && !current->name.isEmpty() && !current->type.isEmpty())
{ {
// static Java initializer if (current->type.left(6)=="event " || current->type.find("event")!=-1) // event
needsSemi = FALSE; {
current->mtype = mtype = Event;
}
else // property
{
current->mtype = mtype = Property;
}
current->bodyLine = yyLineNr;
curlyCount=0;
BEGIN(CSAccessorDecl);
} }
else else
{ {
needsSemi = TRUE; if ((insideJava || insideCS) &&
current->stat &&
current->name.isEmpty() &&
current->type.isEmpty()
)
{
// static Java initializer
needsSemi = FALSE;
}
else
{
needsSemi = TRUE;
}
current->type.resize(0);
current->name.resize(0);
current->args.resize(0);
current->argList->clear();
curlyCount=0;
BEGIN( SkipCurlyBlock );
} }
current->type.resize(0);
current->name.resize(0);
current->args.resize(0);
current->argList->clear();
curlyCount=0;
BEGIN( SkipCurlyBlock );
} }
<CSAccessorDecl>"{" { curlyCount++; }
<CSAccessorDecl>"}" {
if (curlyCount)
{
curlyCount--;
}
else
{
unput(';');
BEGIN(FindMembers);
}
}
<CSAccessorDecl>"set" { if (curlyCount==0) current->memSpec |= Entry::Settable; }
<CSAccessorDecl>"get" { if (curlyCount==0) current->memSpec |= Entry::Gettable; }
<CSAccessorDecl>. {}
<CSAccessorDecl>\n { yyLineNr++; }
<JavaDoc>{CMD}("brief"|"short"){B}+ { <JavaDoc>{CMD}("brief"|"short"){B}+ {
lastBriefContext=tmpDocType; lastBriefContext=tmpDocType;
BEGIN( ClassDocBrief ); BEGIN( ClassDocBrief );
......
...@@ -927,9 +927,14 @@ void TagFileParser::buildMemberList(Entry *ce,QList<TagMemberInfo> &members) ...@@ -927,9 +927,14 @@ void TagFileParser::buildMemberList(Entry *ce,QList<TagMemberInfo> &members)
} }
else if (tmi->kind=="property") else if (tmi->kind=="property")
{ {
me->section = Entry::FUNCTION_SEC; me->section = Entry::VARIABLE_SEC;
me->mtype = Property; me->mtype = Property;
} }
else if (tmi->kind=="event")
{
me->section = Entry::VARIABLE_SEC;
me->mtype = Event;
}
else if (tmi->kind=="variable") else if (tmi->kind=="variable")
{ {
me->section = Entry::VARIABLE_SEC; me->section = Entry::VARIABLE_SEC;
......
...@@ -383,6 +383,12 @@ class Translator ...@@ -383,6 +383,12 @@ class Translator
virtual QCString trDeprecatedList() = 0; virtual QCString trDeprecatedList() = 0;
//////////////////////////////////////////////////////////////////////////
// new since 1.2.18
//////////////////////////////////////////////////////////////////////////
virtual QCString trEvents() = 0;
virtual QCString trEventDocumentation() = 0;
}; };
#endif #endif
...@@ -40,7 +40,19 @@ class TranslatorAdapterBase : public Translator ...@@ -40,7 +40,19 @@ class TranslatorAdapterBase : public Translator
}; };
class TranslatorAdapter_1_2_17 : public TranslatorAdapterBase class TranslatorAdapter_1_2_18 : public TranslatorAdapterBase
{
public:
virtual QCString updateNeededMessage()
{ return createUpdateNeededMessage(idLanguage(),"release 1.2.18"); }
virtual QCString trEvents()
{ return english.trEvents(); }
virtual QCString trEventDocumentation()
{ return english.trEventDocumentation(); }
};
class TranslatorAdapter_1_2_17 : public TranslatorAdapter_1_2_18
{ {
public: public:
virtual QCString updateNeededMessage() virtual QCString updateNeededMessage()
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#ifndef TRANSLATOR_BR_H #ifndef TRANSLATOR_BR_H
#define TRANSLATOR_BR_H #define TRANSLATOR_BR_H
class TranslatorBrazilian: public Translator class TranslatorBrazilian: public TranslatorAdapter_1_2_18
{ {
public: public:
......
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
// probably slightly faster. // probably slightly faster.
class TranslatorCzech : public Translator class TranslatorCzech : public TranslatorAdapter_1_2_18
{ {
private: private:
/*! The decode() inline assumes the source written in the /*! The decode() inline assumes the source written in the
......
...@@ -1415,6 +1415,24 @@ class TranslatorEnglish : public Translator ...@@ -1415,6 +1415,24 @@ class TranslatorEnglish : public Translator
{ {
return "Deprecated List"; return "Deprecated List";
} }
//////////////////////////////////////////////////////////////////////////
// new since 1.2.18
//////////////////////////////////////////////////////////////////////////
/*! Used as a header for declaration section of the events found in
* a C# program
*/
virtual QCString trEvents()
{
return "Events";
}
/*! Header used for the documentation section of a class' events. */
virtual QCString trEventDocumentation()
{
return "Event Documentation";
}
}; };
#endif #endif
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#ifndef TRANSLATOR_HR_H #ifndef TRANSLATOR_HR_H
#define TRANSLATOR_HR_H #define TRANSLATOR_HR_H
class TranslatorCroatian : public Translator class TranslatorCroatian : public TranslatorAdapter_1_2_18
{ {
private: private:
/*! to avoid macro redefinition from translator_cz.h */ /*! to avoid macro redefinition from translator_cz.h */
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
#ifndef TRANSLATOR_IT_H #ifndef TRANSLATOR_IT_H
#define TRANSLATOR_IT_H #define TRANSLATOR_IT_H
class TranslatorItalian : public Translator class TranslatorItalian : public TranslatorAdapter_1_2_18
{ {
public: public:
......
...@@ -61,7 +61,7 @@ class TranslatorJapaneseEn : public TranslatorEnglish ...@@ -61,7 +61,7 @@ class TranslatorJapaneseEn : public TranslatorEnglish
} }
}; };
class TranslatorJapanese : public Translator class TranslatorJapanese : public TranslatorAdapter_1_2_18
{ {
private: private:
/*! The decode() can change euc into sjis */ /*! The decode() can change euc into sjis */
......
...@@ -1013,6 +1013,23 @@ class TranslatorDutch : public Translator ...@@ -1013,6 +1013,23 @@ class TranslatorDutch : public Translator
{ {
return "Deprecated Lijst"; return "Deprecated Lijst";
} }
//////////////////////////////////////////////////////////////////////////
// new since 1.2.18
//////////////////////////////////////////////////////////////////////////
/*! Used as a header for a section of events found in a C# program
*/
virtual QCString trEvents()
{
return "Events";
}
/*! Header used for the documentation section of a class' events. */
virtual QCString trEventDocumentation()
{
return "Event Documentatie";
}
}; };
#endif #endif
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#ifndef TRANSLATOR_PT_H #ifndef TRANSLATOR_PT_H
#define TRANSLATOR_PT_H #define TRANSLATOR_PT_H
class TranslatorPortuguese : public Translator class TranslatorPortuguese : public TranslatorAdapter_1_2_18
{ {
public: public:
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#ifndef TRANSLATOR_RU_H #ifndef TRANSLATOR_RU_H
#define TRANSLATOR_RU_H #define TRANSLATOR_RU_H
class TranslatorRussian : public Translator class TranslatorRussian : public TranslatorAdapter_1_2_18
{ {
private: private:
/*! The Decode() inline assumes the source written in the /*! The Decode() inline assumes the source written in the
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#ifndef TRANSLATOR_SK_H #ifndef TRANSLATOR_SK_H
#define TRANSLATOR_SK_H #define TRANSLATOR_SK_H
class TranslatorSlovak : public Translator class TranslatorSlovak : public TranslatorAdapter_1_2_18
{ {
private: private:
/*! The Decode() inline assumes the source written in the /*! The Decode() inline assumes the source written in the
......
...@@ -509,9 +509,10 @@ ClassDef *getResolvedClass( ...@@ -509,9 +509,10 @@ ClassDef *getResolvedClass(
//printf("===================\n"); //printf("===================\n");
do do
{ {
//printf("trying getResolvedClass(%s,%s)\n",scope ? scope->name().data() : "<none>", n);
Definition *typedefScope = 0; Definition *typedefScope = 0;
QCString subst = resolveTypeDef(scope,name,&typedefScope); QCString subst = resolveTypeDef(scope,name,&typedefScope);
//printf("trying getResolvedClass(%s,%s) => subst=%s\n",
// scope ? scope->name().data() : "<none>", name.data(),subst.data());
if (!subst.isEmpty()) if (!subst.isEmpty())
{ {
...@@ -520,7 +521,8 @@ ClassDef *getResolvedClass( ...@@ -520,7 +521,8 @@ ClassDef *getResolvedClass(
// strip * and & from n // strip * and & from n
int ip=subst.length()-1; int ip=subst.length()-1;
while (ip>=0 && (subst.at(ip)=='*' || subst.at(ip)=='&' || subst.at(ip)==' ')) ip--; while (ip>=0 && (subst.at(ip)=='*' || subst.at(ip)=='&' ||
subst.at(ip)==' ')) ip--;
subst=subst.left(ip+1); subst=subst.left(ip+1);
if (pIsTypeDef) *pIsTypeDef=TRUE; if (pIsTypeDef) *pIsTypeDef=TRUE;
...@@ -581,9 +583,12 @@ ClassDef *getResolvedClass( ...@@ -581,9 +583,12 @@ ClassDef *getResolvedClass(
if (pTemplSpec) *pTemplSpec = typeName.right(typeName.length()-i); if (pTemplSpec) *pTemplSpec = typeName.right(typeName.length()-i);
cd = Doxygen::classSDict.find(typeName.left(i)); cd = Doxygen::classSDict.find(typeName.left(i));
} }
if (cd) goto found; //if (cd) goto found;
} }
} }
// whether we found something or not, we stop searching to prevent
// finding false positives.
goto found;
} }
else // not a typedef else // not a typedef
{ {
...@@ -775,7 +780,8 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam ...@@ -775,7 +780,8 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam
} }
//printf("Trying class %s\n",fullName.data()); //printf("Trying class %s\n",fullName.data());
if ((cd=getClass(fullName))) bool isTypeDef=FALSE;
if ((cd=getResolvedClass(Doxygen::globalScope,fullName,&isTypeDef)))
{ {
// add link to the result // add link to the result
if (external ? cd->isLinkable() : cd->isLinkableInProject()) if (external ? cd->isLinkable() : cd->isLinkableInProject())
...@@ -785,6 +791,10 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam ...@@ -785,6 +791,10 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam
found=TRUE; found=TRUE;
} }
} }
else if (isTypeDef)
{
goto endloop;
}
if (scopeOffset==0) if (scopeOffset==0)
{ {
...@@ -796,6 +806,7 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam ...@@ -796,6 +806,7 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam
} }
} while (!found && scopeOffset>=0); } while (!found && scopeOffset>=0);
endloop:
//if (!found) printf("Trying to link %s in %s\n",word.data(),scName); //if (!found) printf("Trying to link %s in %s\n",word.data(),scName);
if (!found && if (!found &&
getDefs(scName,word,0,md,cd,fd,nd,gd) && getDefs(scName,word,0,md,cd,fd,nd,gd) &&
...@@ -830,6 +841,7 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam ...@@ -830,6 +841,7 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam
out.writeString(word); out.writeString(word);
} }
// set next start point in the string // set next start point in the string
//printf("index=%d/%d\n",index,txtStr.length());
skipIndex=index=newIndex+matchLen; skipIndex=index=newIndex+matchLen;
floatingIndex+=matchLen; floatingIndex+=matchLen;
} }
...@@ -1055,7 +1067,7 @@ QCString fileToString(const char *name,bool filter) ...@@ -1055,7 +1067,7 @@ QCString fileToString(const char *name,bool filter)
} }
else // filter the input else // filter the input
{ {
QCString cmd=Config_getString("INPUT_FILTER")+" "+name; QCString cmd=Config_getString("INPUT_FILTER")+" \""+name+"\"";
FILE *f=popen(cmd,"r"); FILE *f=popen(cmd,"r");
if (!f) if (!f)
{ {
...@@ -2291,7 +2303,7 @@ bool resolveRef(/* in */ const char *scName, ...@@ -2291,7 +2303,7 @@ 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,".","::"); fullName = removeRedundantWhiteSpace(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()(...)
...@@ -3745,7 +3757,7 @@ static void latin2ToLatex(QTextStream &t,unsigned char c) ...@@ -3745,7 +3757,7 @@ static void latin2ToLatex(QTextStream &t,unsigned char c)
} }
void filterLatexString(QTextStream &t,const char *str, void filterLatexString(QTextStream &t,const char *str,
bool insideTabbing,bool insidePre) bool insideTabbing,bool insidePre,bool insideItem)
{ {
static bool isCzech = theTranslator->idLanguage()=="czech"; static bool isCzech = theTranslator->idLanguage()=="czech";
static bool isJapanese = theTranslator->idLanguage()=="japanese"; static bool isJapanese = theTranslator->idLanguage()=="japanese";
...@@ -3813,14 +3825,18 @@ void filterLatexString(QTextStream &t,const char *str, ...@@ -3813,14 +3825,18 @@ void filterLatexString(QTextStream &t,const char *str,
case '~': t << "$\\sim$"; break; case '~': t << "$\\sim$"; break;
case '[': if (Config_getBool("PDF_HYPERLINKS")) case '[': if (Config_getBool("PDF_HYPERLINKS"))
t << "\\mbox{[}"; t << "\\mbox{[}";
else else if (insideItem)
t << "\[";
else
t << "["; t << "[";
break; break;
case ']': if (pc=='[') t << "$\\,$"; case ']': if (pc=='[') t << "$\\,$";
if (Config_getBool("PDF_HYPERLINKS")) if (Config_getBool("PDF_HYPERLINKS"))
t << "\\mbox{]}"; t << "\\mbox{]}";
else else if (insideItem)
t << "]"; t << "\[";
else
t << "]";
break; break;
case '-': if (*p=='>') case '-': if (*p=='>')
{ t << " $\\rightarrow$ "; p++; } { t << " $\\rightarrow$ "; p++; }
......
...@@ -200,7 +200,8 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle, ...@@ -200,7 +200,8 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
QCString escapeCharsInString(const char *name,bool allowDots); QCString escapeCharsInString(const char *name,bool allowDots);
void addGroupListToTitle(OutputList &ol,Definition *d); void addGroupListToTitle(OutputList &ol,Definition *d);
void filterLatexString(QTextStream &t,const char *str, void filterLatexString(QTextStream &t,const char *str,
bool insideTabbing=FALSE,bool insidePre=FALSE); bool insideTabbing=FALSE,bool insidePre=FALSE,
bool insideItem=FALSE);
QCString rtfFormatBmkStr(const char *name); QCString rtfFormatBmkStr(const char *name);
#endif #endif
......
...@@ -1251,6 +1251,20 @@ static void writeMemberReference(QTextStream &t,Definition *def,MemberDef *rmd,c ...@@ -1251,6 +1251,20 @@ static void writeMemberReference(QTextStream &t,Definition *def,MemberDef *rmd,c
{ {
name.prepend(scope+"::"); name.prepend(scope+"::");
} }
t << " <" << tagName << " id=\"";
t << rmd->getOutputFileBase() << "_1" << rmd->anchor() << "\"";
if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
{
t << " compoundref=\"" << rmd->getBodyDef()->getOutputFileBase() << "\"";
t << " startline=\"" << rmd->getStartBodyLine() << "\"";
if (rmd->getEndBodyLine()!=-1)
{
t << " endline=\"" << rmd->getEndBodyLine() << "\"";
}
}
t << ">" << convertToXML(name) << "</" << tagName << ">" << endl;
#if 0
Definition *d = rmd->getOuterScope(); Definition *d = rmd->getOuterScope();
if (d==Doxygen::globalScope) d=rmd->getBodyDef(); if (d==Doxygen::globalScope) d=rmd->getBodyDef();
if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef()) if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
...@@ -1273,6 +1287,7 @@ static void writeMemberReference(QTextStream &t,Definition *def,MemberDef *rmd,c ...@@ -1273,6 +1287,7 @@ static void writeMemberReference(QTextStream &t,Definition *def,MemberDef *rmd,c
<< "\">" << convertToXML(name) << "\">" << convertToXML(name)
<< "</" << tagName << ">" << endl; << "</" << tagName << ">" << endl;
} }
#endif
} }
static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,Definition *def) static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,Definition *def)
...@@ -1301,6 +1316,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De ...@@ -1301,6 +1316,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
case MemberDef::Define: memType="define"; break; case MemberDef::Define: memType="define"; break;
case MemberDef::EnumValue: ASSERT(0); break; case MemberDef::EnumValue: ASSERT(0); break;
case MemberDef::Property: memType="property"; break; case MemberDef::Property: memType="property"; break;
case MemberDef::Event: memType="event"; break;
case MemberDef::Variable: memType="variable"; break; case MemberDef::Variable: memType="variable"; break;
case MemberDef::Typedef: memType="typedef"; break; case MemberDef::Typedef: memType="typedef"; break;
case MemberDef::Enumeration: memType="enum"; break; case MemberDef::Enumeration: memType="enum"; break;
...@@ -1744,6 +1760,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti) ...@@ -1744,6 +1760,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
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->events,"event");
generateXMLSection(cd,ti,t,&cd->pubStaticMethods,"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");
......
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