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.
--------
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.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
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++.
Name: doxygen
Version: 1.2.18_20021006
Version: 1.2.18_20021013
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
......@@ -181,6 +181,7 @@ void ClassDef::addMembersToMemberGroup()
::addMembersToMemberGroup(&friends,memberGroupSDict,this);
::addMembersToMemberGroup(&related,memberGroupSDict,this);
::addMembersToMemberGroup(&properties,memberGroupSDict,this);
::addMembersToMemberGroup(&events,memberGroupSDict,this);
// add members inside sections to their groups
MemberGroupSDict::Iterator mgli(*memberGroupSDict);
......@@ -234,6 +235,10 @@ void ClassDef::internalInsertMember(MemberDef *md,
properties.append(md);
md->setSectionList(this,&properties);
break;
case MemberDef::Event:
events.append(md);
md->setSectionList(this,&events);
break;
case MemberDef::Slot: // Qt specific
switch (prot)
{
......@@ -375,6 +380,12 @@ void ClassDef::internalInsertMember(MemberDef *md,
else
propertyMembers.append(md);
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::DCOP:
if (Config_getBool("SORT_MEMBER_DOCS"))
......@@ -522,6 +533,7 @@ void ClassDef::computeAnchors()
setAnchors(context,'u',&priTypes);
setAnchors(context,'v',&dcopMethods);
setAnchors(context,'w',&properties);
setAnchors(context,'x',&events);
MemberGroupSDict::Iterator mgli(*memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
......@@ -1078,7 +1090,6 @@ void ClassDef::writeDocumentation(OutputList &ol)
pubSlots.writeDeclarations(ol,this,0,0,0,theTranslator->trPublicSlots(),0);
signals.writeDeclarations(ol,this,0,0,0,theTranslator->trSignals(),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);
pubStaticMethods.writeDeclarations(ol,this,0,0,0,theTranslator->trStaticPublicMembers(),0);
......@@ -1098,6 +1109,12 @@ void ClassDef::writeDocumentation(OutputList &ol)
proAttribs.writeDeclarations(ol,this,0,0,0,theTranslator->trProtectedAttribs(),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"))
{
// private types
......@@ -1150,6 +1167,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
propertyMembers.writeDocumentation(ol,name(),this,
theTranslator->trPropertyDocumentation());
eventMembers.writeDocumentation(ol,name(),this,
theTranslator->trEventDocumentation());
ol.startTextBlock();
// write the list of used files (not for man pages)
......@@ -1556,6 +1576,8 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup)
dcopMethods.writePlainDeclarations(ol,this,0,0,0);
properties.setInGroup(inGroup);
properties.writePlainDeclarations(ol,this,0,0,0);
events.setInGroup(inGroup);
events.writePlainDeclarations(ol,this,0,0,0);
pubStaticMethods.setInGroup(inGroup);
pubStaticMethods.writePlainDeclarations(ol,this,0,0,0);
pubStaticAttribs.setInGroup(inGroup);
......@@ -2476,6 +2498,7 @@ void ClassDef::addListReferences()
relatedMembers.addListReferences(this);
variableMembers.addListReferences(this);
propertyMembers.addListReferences(this);
eventMembers.addListReferences(this);
}
MemberDef *ClassDef::getMemberByName(const QCString &name)
......
......@@ -226,6 +226,7 @@ class ClassDef : public Definition
MemberList friends;
MemberList dcopMethods;
MemberList properties;
MemberList events;
/* member list by types */
MemberList constructors;
......@@ -236,6 +237,7 @@ class ClassDef : public Definition
MemberList relatedMembers;
MemberList variableMembers;
MemberList propertyMembers;
MemberList eventMembers;
/* user defined member groups */
MemberGroupSDict *memberGroupSDict;
......
......@@ -349,10 +349,6 @@ static void startCodeLine()
//printf("Real scope: `%s'\n",g_realScope.data());
g_bodyCurlyCount = 0;
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(),
anchor,g_yyLineNr);
}
......@@ -429,6 +425,7 @@ static void writeMultiLineCodeLink(BaseCodeDocInterface &ol,
{
g_yyLineNr++;
*(p-1)='\0';
//printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);
ol.writeCodeLink(ref,file,anchor,sp);
endCodeLine();
if (g_yyLineNr<g_inputLines)
......@@ -438,6 +435,7 @@ static void writeMultiLineCodeLink(BaseCodeDocInterface &ol,
}
else
{
//printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);
ol.writeCodeLink(ref,file,anchor,sp);
done=TRUE;
}
......@@ -582,6 +580,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
if (md->getBodyDef()==g_sourceFileDef)
{
g_theCallContext.setClass(stripClassName(md->typeString()));
//printf("returning member %s in source file %s\n",md->name().data(),g_sourceFileDef->name().data());
return md;
}
md=mn->next();
......
......@@ -2191,7 +2191,7 @@ void Config::create()
FALSE );
//-----------------------------------------------------------------------------------------------
addInfo( "Perl","configuration options related to the Perl output");
addInfo( "PerlMod","configuration options related to the Perl module output");
//-----------------------------------------------------------------------------------------------
cb = addBool(
"GENERATE_PERLMOD",
......
......@@ -89,6 +89,7 @@ void generateDEFForMember(MemberDef *md,
case MemberDef::Define: memType="define"; break;
case MemberDef::EnumValue: ASSERT(0); break;
case MemberDef::Property: memType="property"; break;
case MemberDef::Event: memType="event"; break;
case MemberDef::Variable: memType="variable"; break;
case MemberDef::Typedef: memType="typedef"; break;
case MemberDef::Enumeration: memType="enum"; break;
......
......@@ -30,8 +30,8 @@
#include "config.h"
#include "message.h"
#include "util.h"
#include "latexgen.h"
#include "htmlgen.h"
//#include "latexgen.h"
//#include "htmlgen.h"
#include "doxygen.h"
//-----------------------------------------------------------------------------
......
......@@ -174,7 +174,7 @@ static void checkUndocumentedParams()
{
QString argName = g_memberDef->isDefine() ? a->type : a->name;
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;
break;
......
......@@ -227,7 +227,7 @@ TEMPCHAR [a-z_A-Z0-9,: \t\*\&]
FUNCCHAR [a-z_A-Z0-9,:\<\> \t\*\&]
SCOPESEP "::"|"#"|"."
SCOPEPRE {ID}("<"{TEMPCHAR}*">")?{SCOPESEP}
SCOPEMASK {SCOPEPRE}*(~)?{ID}
SCOPEMASK {SCOPEPRE}*(~)?{ID}("<"{TEMPCHAR}*">")?
FUNCARG "("{FUNCCHAR}*")"
OPNEW {BLANK}+"new"({BLANK}*"[]")?
OPDEL {BLANK}+"delete"({BLANK}*"[]")?
......@@ -594,7 +594,7 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
warn(g_fileName,yylineno,"Error: Unexpected new line character");
}
<*>[\\@<>&$#%~] { /* unescaped special character */
warn(g_fileName,yylineno,"Warning: Unexpected character `%s', assuming command \\%s was meant.",yytext,yytext);
//warn(g_fileName,yylineno,"Warning: Unexpected character `%s', assuming command \\%s was meant.",yytext,yytext);
g_token->name = yytext;
return TK_COMMAND;
}
......
......@@ -1240,6 +1240,7 @@ static MemberDef *addVariableToClass(
md->setInitializer(root->initializer);
md->setMaxInitLines(root->initLines);
md->setMemberGroupId(root->mGrpId);
md->setMemberSpecifiers(root->memSpec);
addMemberToGroups(root,md);
//if (root->mGrpId!=-1)
//{
......@@ -1670,6 +1671,8 @@ void buildVarList(Entry *root)
mtype=MemberDef::Friend;
else if (root->mtype==Property)
mtype=MemberDef::Property;
else if (root->mtype==Event)
mtype=MemberDef::Event;
else
mtype=MemberDef::Variable;
......@@ -1910,8 +1913,6 @@ static void buildFunctionList(Entry *root)
root->startLine,
root->bodyLine,
root->tArgLists ? (int)root->tArgLists->count() : -1,
//root->tArgList ? (int)root->tArgList->count() : -1,
//root->mtArgList ? (int)root->mtArgList->count() : -1,
root->mGrpId,
root->memSpec,
root->proto,
......@@ -2053,13 +2054,7 @@ static void buildFunctionList(Entry *root)
{
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);
// merge ingroup specifiers
......@@ -2267,6 +2262,7 @@ static void findFriends()
{
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)
{
mmd->setBodySegment(fmd->getStartBodyLine(),fmd->getEndBodyLine());
......@@ -4727,6 +4723,7 @@ static void findMember(Entry *root,
{
md->setBodySegment(rmd->getStartBodyLine(),rmd->getEndBodyLine());
md->setBodyDef(rmd->getBodyDef());
md->setBodyMember(rmd);
}
}
}
......@@ -7888,7 +7885,7 @@ void generateOutput()
}
if (Config_getBool("GENERATE_PERLMOD"))
{
msg("Generating PerlMod output...\n");
msg("Generating Perl module output...\n");
generatePerlMod();
}
if (Config_getBool("GENERATE_HTMLHELP") && !Config_getString("HHC_LOCATION").isEmpty())
......
......@@ -23,7 +23,7 @@
enum Protection { Public, Protected, Private } ;
enum Specifier { Normal, Virtual, Pure } ;
enum MethodTypes { Method, Signal, Slot, DCOP, Property };
enum MethodTypes { Method, Signal, Slot, DCOP, Property, Event };
struct ListItemInfo
{
......@@ -226,9 +226,11 @@ class Entry
};
enum MemberSpecifier
{
Inline = 0x1,
Explicit = 0x2,
Mutable = 0x4
Inline = 0x01,
Explicit = 0x02,
Mutable = 0x04,
Settable = 0x08,
Gettable = 0x10
};
Entry();
......
......@@ -742,7 +742,7 @@ void HtmlDocVisitor::visitPre(DocParamList *pl)
for (li.toFirst();(s=li.current());++li)
{
if (!first) m_t << ","; else first=FALSE;
m_t << s;
filter(s);
}
m_t << "</em>&nbsp;</td><td>";
}
......
......@@ -508,12 +508,12 @@ void HtmlGenerator::endHtmlLink()
t << "</a>";
}
void HtmlGenerator::writeMailLink(const char *url)
{
t << "<a href=\"mailto:" << url << "\">";
docify(url);
t << "</a>";
}
//void HtmlGenerator::writeMailLink(const char *url)
//{
// t << "<a href=\"mailto:" << url << "\">";
// docify(url);
// t << "</a>";
//}
void HtmlGenerator::startGroupHeader()
{
......@@ -553,46 +553,46 @@ void HtmlGenerator::endSection(const char *,SectionInfo::SectionType type)
}
}
void HtmlGenerator::writeSectionRef(const char *ref,const char *name,
const char *anchor,const char *title)
{
QCString *dest;
//printf("writeSectionRef(%s,%s,%s,%s)\n",ref,name,anchor,title);
QCString refName=name;
if (refName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension)
{
refName+=Doxygen::htmlFileExtension;
}
t << "<a ";
if (ref)
{
t << "doxygen=\"" << ref << ":";
if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
t << "\" ";
}
t << "href=\"";
if (ref)
{
if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
}
t << refName << "#" << anchor << "\">";
docify(title);
t << "</a>";
}
void HtmlGenerator::writeSectionRefItem(const char *name,const char *lab,
const char *title)
{
QCString refName=name;
if (refName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension)
{
refName+=Doxygen::htmlFileExtension;
}
t << "<li><a href=\"" << refName << "#" << lab << "\">";
docify(title);
t << "</a>";
}
//void HtmlGenerator::writeSectionRef(const char *ref,const char *name,
// const char *anchor,const char *title)
//{
// QCString *dest;
// //printf("writeSectionRef(%s,%s,%s,%s)\n",ref,name,anchor,title);
// QCString refName=name;
// if (refName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension)
// {
// refName+=Doxygen::htmlFileExtension;
// }
// t << "<a ";
// if (ref)
// {
// t << "doxygen=\"" << ref << ":";
// if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
// t << "\" ";
// }
// t << "href=\"";
// if (ref)
// {
// if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
// }
// t << refName << "#" << anchor << "\">";
// docify(title);
// t << "</a>";
//}
//
//void HtmlGenerator::writeSectionRefItem(const char *name,const char *lab,
// const char *title)
//{
// QCString refName=name;
// if (refName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension)
// {
// refName+=Doxygen::htmlFileExtension;
// }
// t << "<li><a href=\"" << refName << "#" << lab << "\">";
// docify(title);
// t << "</a>";
//}
//
void HtmlGenerator::docify(const char *str)
{
if (str)
......@@ -702,20 +702,20 @@ void HtmlGenerator::endClassDiagram(ClassDiagram &d,
// t << "</font>";
//}
void HtmlGenerator::writeFormula(const char *n,const char *text)
{
if (text && text[0]=='\\') t << "<p><center>" << endl;
t << "<img align=";
#if !defined(_WIN32)
t << "\"top\""; // assume Unix users use Netscape 4.x which does
// not seem to support align == "middle" :-((
#else
t << "\"middle\""; // assume Windows users use IE or HtmlHelp which only
// displays formulas nicely with align == "middle"
#endif
t << " src=\"" << n << ".png\">" << endl;
if (text && text[0]=='\\') t << "</center><p>" << endl;
}
//void HtmlGenerator::writeFormula(const char *n,const char *text)
//{
// if (text && text[0]=='\\') t << "<p><center>" << endl;
// t << "<img align=";
//#if !defined(_WIN32)
// t << "\"top\""; // assume Unix users use Netscape 4.x which does
// // not seem to support align == "middle" :-((
//#else
// t << "\"middle\""; // assume Windows users use IE or HtmlHelp which only
// // displays formulas nicely with align == "middle"
//#endif
// t << " src=\"" << n << ".png\">" << endl;
// if (text && text[0]=='\\') t << "</center><p>" << endl;
//}
void HtmlGenerator::startMemberList()
{
......@@ -900,76 +900,76 @@ void HtmlGenerator::endIndexValue(const char *,bool)
t << "</td></tr>" << endl;
}
void HtmlGenerator::startAlphabeticalIndexList()
{
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::startAlphabeticalIndexList()
//{
// t << "<table align=center width=\"95%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" << endl;
//}
void HtmlGenerator::startImage(const char *name,const char *,bool hasCaption)
{
QCString baseName=name;
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::endAlphabeticalIndexList()
//{
// t << "</table>" << endl;
//}
void HtmlGenerator::endImage(bool hasCaption)
{
if (hasCaption)
{
t << "</strong></p>" << endl;
}
t << "</div>" << 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::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::startImage(const char *name,const char *,bool hasCaption)
//{
// QCString baseName=name;
// 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::endDotFile(bool hasCaption)
{
if (hasCaption)
{
t << "</strong></p>" << endl;
}
t << "</div>" << endl;
}
//void HtmlGenerator::endImage(bool hasCaption)
//{
// if (hasCaption)
// {
// t << "</strong></p>" << 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 *)
{
DBG_HTML(t << "<!-- startMemberDoc -->" << endl;)
......@@ -1235,17 +1235,17 @@ void HtmlGenerator::endParamList()
t << "</dl>";
}
void HtmlGenerator::startSectionRefList()
{
t << "<multicol cols=3>" << endl;
t << "<ul>" << endl;
}
//void HtmlGenerator::startSectionRefList()
//{
// t << "<multicol cols=3>" << endl;
// t << "<ul>" << endl;
//}
void HtmlGenerator::endSectionRefList()
{
t << "</ul>" << endl;
t << "</multicol>" << endl;
}
//void HtmlGenerator::endSectionRefList()
//{
// t << "</ul>" << endl;
// t << "</multicol>" << endl;
//}
void HtmlGenerator::printDoc(DocNode *n)
......
......@@ -75,11 +75,11 @@ class HtmlGenerator : public OutputGenerator
void endIndexValue(const char *,bool);
void startItemList() { t << "<ul>" << endl; }
void endItemList() { t << "</ul>" << endl; }
void startEnumList() { t << "<ol>" << endl; }
void endEnumList() { t << "</ol>" << endl; }
void startAlphabeticalIndexList();
void endAlphabeticalIndexList();
void writeIndexHeading(const char *s);
//void startEnumList() { t << "<ol>" << endl; }
//void endEnumList() { t << "</ol>" << endl; }
//void startAlphabeticalIndexList();
//void endAlphabeticalIndexList();
//void writeIndexHeading(const char *s);
void writeIndexItem(const char *ref,const char *file,const char *name);
void docify(const char *text);
void codify(const char *text);
......@@ -91,7 +91,7 @@ class HtmlGenerator : public OutputGenerator
void endTextLink();
void startHtmlLink(const char *url);
void endHtmlLink();
void writeMailLink(const char *url);
//void writeMailLink(const char *url);
void startTypewriter() { t << "<code>"; }
void endTypewriter() { t << "</code>"; }
void startGroupHeader();
......@@ -125,10 +125,10 @@ class HtmlGenerator : public OutputGenerator
{ t << "<a name=\"" << name <<"\"></a>"; }
void startCodeFragment() { t << "<div class=\"fragment\"><pre>"; }
void endCodeFragment() { t << "</pre></div>"; }
void startPreFragment() { t << "<pre>"; }
void endPreFragment() { t << "</pre>"; }
void startVerbatimFragment() { t << "<div class=\"fragment\"><pre>"; }
void endVerbatimFragment() { t << "</pre></div>"; }
//void startPreFragment() { t << "<pre>"; }
//void endPreFragment() { t << "</pre>"; }
//void startVerbatimFragment() { t << "<div class=\"fragment\"><pre>"; }
//void endVerbatimFragment() { t << "</pre></div>"; }
void writeLineNumber(const char *,const char *,const char *,int);
void startCodeLine() { col=0; }
void endCodeLine() { codify("\n"); }
......@@ -166,44 +166,44 @@ class HtmlGenerator : public OutputGenerator
void endCenter() { t << "</center>" << endl; }
void startSmall() { t << "<small>" << endl; }
void endSmall() { t << "</small>" << endl; }
void startSubscript() { t << "<sub>"; }
void endSubscript() { t << "</sub>"; }
void startSuperscript() { t << "<sup>"; }
void endSuperscript() { t << "</sup>"; }
void startTable(bool,int)
{ t << "<table border=1 cellspacing=3 cellpadding=3>"; }
void endTable(bool hasCaption)
{ if (!hasCaption) t << "</tr>";
t << "</table>" << endl;
}
void startCaption() { t << "</tr><caption align=\"bottom\">"; }
void endCaption() { t << "</caption>" << endl; }
void nextTableRow() { t << "<tr><td>"; }
void endTableRow() { t << "</tr>" << endl; }
void nextTableColumn() { t << "<td>"; }
void endTableColumn() { t << "</td>"; }
void writeCopyright() { t << "&copy;"; }
void writeQuote() { t << "&quot;"; }
void writeUmlaut(char c) { t << "&" << c << "uml;"; }
void writeAcute(char c) { t << "&" << c << "acute;"; }
void writeGrave(char c) { t << "&" << c << "grave;"; }
void writeCirc(char c) { t << "&" << c << "circ;"; }
void writeTilde(char c) { t << "&" << c << "tilde;"; }
void writeRing(char c) { t << "&" << c << "ring;"; }
void writeSharpS() { t << "&szlig;"; }
void writeCCedil(char c) { t << "&" << c << "cedil;"; }
//void startSubscript() { t << "<sub>"; }
//void endSubscript() { t << "</sub>"; }
//void startSuperscript() { t << "<sup>"; }
//void endSuperscript() { t << "</sup>"; }
//void startTable(bool,int)
// { t << "<table border=1 cellspacing=3 cellpadding=3>"; }
//void endTable(bool hasCaption)
// { if (!hasCaption) t << "</tr>";
// t << "</table>" << endl;
// }
//void startCaption() { t << "</tr><caption align=\"bottom\">"; }
//void endCaption() { t << "</caption>" << endl; }
//void nextTableRow() { t << "<tr><td>"; }
//void endTableRow() { t << "</tr>" << endl; }
//void nextTableColumn() { t << "<td>"; }
//void endTableColumn() { t << "</td>"; }
//void writeCopyright() { t << "&copy;"; }
//void writeQuote() { t << "&quot;"; }
//void writeUmlaut(char c) { t << "&" << c << "uml;"; }
//void writeAcute(char c) { t << "&" << c << "acute;"; }
//void writeGrave(char c) { t << "&" << c << "grave;"; }
//void writeCirc(char c) { t << "&" << c << "circ;"; }
//void writeTilde(char c) { t << "&" << c << "tilde;"; }
//void writeRing(char c) { t << "&" << c << "ring;"; }
//void writeSharpS() { t << "&szlig;"; }
//void writeCCedil(char c) { t << "&" << c << "cedil;"; }
void startDescList(SectionTypes) { t << "<dl compact><dt><b>" << endl; }
void endDescList() { t << "</dl>"; }
void startSimpleSect(SectionTypes,const char *,const char *,const char *);
void endSimpleSect();
void startParamList(ParamListTypes,const char *);
void endParamList();
void endDescTitle() { t << "</b>"; }
//void endDescTitle() { t << "</b>"; }
void writeDescItem() { t << "<dd>" << endl; }
void startSection(const char *,const char *,SectionInfo::SectionType);
void endSection(const char *,SectionInfo::SectionType);
void writeSectionRef(const char *,const char *,const char *,const char *);
void writeSectionRefItem(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 writeSectionRefAnchor(const char *,const char *,const char *);
void addIndexItem(const char *,const char *);
void startIndent();
......@@ -217,12 +217,12 @@ class HtmlGenerator : public OutputGenerator
void endPageRef(const char *,const char *) {}
void startQuickIndexItem(const char *,const char *);
void endQuickIndexItem();
void writeFormula(const char *,const char *);
//void writeFormula(const char *,const char *);
void writeNonBreakableSpace(int);
void startImage(const char *,const char *,bool);
void endImage(bool);
void startDotFile(const char *,bool);
void endDotFile(bool);
//void startImage(const char *,const char *,bool);
//void endImage(bool);
//void startDotFile(const char *,bool);
//void endDotFile(bool);
void startDescTable()
{ t << "<table border=0 cellspacing=2 cellpadding=0>" << endl; }
......@@ -262,13 +262,13 @@ class HtmlGenerator : public OutputGenerator
void startFontClass(const char *s) { t << "<span class=\"" << s << "\">"; }
void endFontClass() { t << "</span>"; }
void startHtmlOnly() {}
void endHtmlOnly() {}
void startLatexOnly() {}
void endLatexOnly() {}
//void startHtmlOnly() {}
//void endHtmlOnly() {}
//void startLatexOnly() {}
//void endLatexOnly() {}
void startSectionRefList();
void endSectionRefList();
//void startSectionRefList();
//void endSectionRefList();
void writeCodeAnchor(const char *anchor)
{ t << "<a name=\"" << anchor << "\"></a>"; }
......
......@@ -1285,7 +1285,8 @@ void writeAnnotatedClassList(OutputList &ol)
// write an alphabetical index of all class with a header for each letter
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
ClassSDict::Iterator cli(Doxygen::classSDict);
......@@ -1363,12 +1364,14 @@ void writeAlphabeticalClassList(OutputList &ol)
// generate table
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
int colsInRow = (i<rows-1) ? columns : itemsInLastRow;
//printf("row [%d]\n",i);
for (j=0;j<colsInRow;j++) // foreach table column
{
ol.writeString("<td>");
ClassDef *cd = colIterators[j]->current();
//printf("columns [%d] cd=%p\n",j,cd);
if (cd==(ClassDef *)8) // the class pointer is really a header
......@@ -1380,7 +1383,16 @@ void writeAlphabeticalClassList(OutputList &ol)
int index = getPrefixIndex(cd->className());
startLetter=toupper(cd->className().at(index));
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
......@@ -1410,12 +1422,15 @@ void writeAlphabeticalClassList(OutputList &ol)
//printf("item ClassDef=%p %s\n",cd,cd ? cd->name().data() : "<none>");
++(*colIterators[j]);
}
ol.endTableColumn();
if (j<colsInRow-1) ol.nextTableColumn();
//ol.endTableColumn();
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
for (i=0;i<columns;i++)
......
......@@ -68,7 +68,7 @@ QString LatexDocVisitor::escapeMakeIndexChars(const char *s)
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)
{
m_t << "\\href{" << u->url() << "}";
}
m_t << "{\\tt " << u->url() << "}";
m_t << "{\\tt ";
filter(u->url());
m_t << "}";
}
void LatexDocVisitor::visit(DocLineBreak *)
......@@ -398,6 +400,10 @@ void LatexDocVisitor::visitPre(DocSimpleSect *s)
{
m_t << ":]";
}
else
{
m_insideItem=TRUE;
}
}
void LatexDocVisitor::visitPost(DocSimpleSect *)
......@@ -411,6 +417,7 @@ void LatexDocVisitor::visitPre(DocTitle *)
void LatexDocVisitor::visitPost(DocTitle *)
{
m_insideItem=FALSE;
m_t << "]";
}
......@@ -517,10 +524,12 @@ void LatexDocVisitor::visitPost(DocHtmlDescList *)
void LatexDocVisitor::visitPre(DocHtmlDescTitle *)
{
m_t << "\\item[";
m_insideItem=TRUE;
}
void LatexDocVisitor::visitPost(DocHtmlDescTitle *)
{
m_insideItem=FALSE;
m_t << "]";
}
......@@ -829,7 +838,9 @@ void LatexDocVisitor::visitPre(DocParamList *pl)
for (li.toFirst();(s=li.current());++li)
{
if (!first) m_t << ","; else first=FALSE;
m_t << s;
m_insideItem=TRUE;
filter(s);
m_insideItem=FALSE;
}
m_t << "}]";
}
......@@ -850,7 +861,9 @@ void LatexDocVisitor::visitPre(DocXRefItem *x)
{
m_t << "{\\bf ";
}
m_insideItem=TRUE;
filter(x->title());
m_insideItem=FALSE;
m_t << "}]";
}
......@@ -888,7 +901,7 @@ void LatexDocVisitor::visitPost(DocText *)
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)
......
......@@ -144,6 +144,7 @@ class LatexDocVisitor : public DocVisitor
QTextStream &m_t;
BaseCodeDocInterface &m_ci;
bool m_insidePre;
bool m_insideItem;
bool m_hide;
};
......
......@@ -899,18 +899,18 @@ void LatexGenerator::endHtmlLink()
t << "}";
}
void LatexGenerator::writeMailLink(const char *url)
{
if (Config_getBool("PDF_HYPERLINKS"))
{
t << "\\href{mailto:";
t << url;
t << "}";
}
t << "{\\tt ";
docify(url);
t << "}";
}
//void LatexGenerator::writeMailLink(const char *url)
//{
// if (Config_getBool("PDF_HYPERLINKS"))
// {
// t << "\\href{mailto:";
// t << url;
// t << "}";
// }
// t << "{\\tt ";
// docify(url);
// t << "}";
//}
void LatexGenerator::writeStartAnnoItem(const char *,const char *,
const char *path,const char *name)
......@@ -1238,49 +1238,49 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType)
t << "}\\label{" << lab << "}" << endl;
}
void LatexGenerator::writeSectionRef(const char *ref,const char *,
const char *lab,const char *text)
{
if (ref) // external reference
{
docify(text);
}
else // local reference
{
if (text && Config_getBool("PDF_HYPERLINKS"))
{
t << "\\hyperlink{";
if (lab) t << lab;
t << "}{";
docify(text);
t << "}";
//t << " {\\rm (p.\\,\\pageref{" << lab << "})}";
}
else
{
if (strcmp(lab,text)!=0) // lab!=text
{
// todo: don't hardcode p. here!
t << "{\\bf ";
docify(text);
t << "} {\\rm (p.\\,\\pageref{" << lab << "})}";
}
else
{
t << "\\ref{" << lab << "}";
}
}
}
}
void LatexGenerator::writeSectionRefItem(const char *,const char *lab,
const char *title)
{
t << "\\item \\contentsline{section}{";
docify(title);
t << "}{\\ref{" << lab << "}}{}" << endl;
}
//void LatexGenerator::writeSectionRef(const char *ref,const char *,
// const char *lab,const char *text)
//{
// if (ref) // external reference
// {
// docify(text);
// }
// else // local reference
// {
// if (text && Config_getBool("PDF_HYPERLINKS"))
// {
// t << "\\hyperlink{";
// if (lab) t << lab;
// t << "}{";
// docify(text);
// t << "}";
// //t << " {\\rm (p.\\,\\pageref{" << lab << "})}";
// }
// else
// {
// if (strcmp(lab,text)!=0) // lab!=text
// {
// // todo: don't hardcode p. here!
// t << "{\\bf ";
// docify(text);
// t << "} {\\rm (p.\\,\\pageref{" << lab << "})}";
// }
// else
// {
// t << "\\ref{" << lab << "}";
// }
// }
// }
//}
//
//void LatexGenerator::writeSectionRefItem(const char *,const char *lab,
// const char *title)
//{
// t << "\\item \\contentsline{section}{";
// docify(title);
// t << "}{\\ref{" << lab << "}}{}" << endl;
//}
//
// TODO: remove this function
//void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab,
// const char *title)
......@@ -1420,10 +1420,10 @@ void LatexGenerator::endClassDiagram(ClassDiagram &d,
d.writeFigure(t,dir,fileName);
}
void LatexGenerator::writeFormula(const char *,const char *text)
{
t << text;
}
//void LatexGenerator::writeFormula(const char *,const char *text)
//{
// t << text;
//}
void LatexGenerator::startMemberItem(int annType)
{
......@@ -1479,86 +1479,86 @@ void LatexGenerator::endMemberList()
t << "\\end{CompactItemize}" << endl;
}
void LatexGenerator::startImage(const char *name,const char *size,bool hasCaption)
{
if (hasCaption)
{
t << "\\begin{figure}[H]" << endl;
t << "\\begin{center}" << endl;
}
else
{
t << "\\mbox{";
}
QCString gfxName = name;
if (gfxName.right(4)==".eps") gfxName.left(gfxName.length()-4);
// "\\epsfig{file=" << name;
t << "\\includegraphics";
if (size) t << "[" << size << "]";
t << "{" << gfxName << "}";
if (hasCaption)
{
t << "\\caption{";
}
else
{
t << "}" << endl;
}
}
void LatexGenerator::endImage(bool hasCaption)
{
if (hasCaption)
{
t << "}" << endl;
t << "\\end{center}" << endl;
t << "\\end{figure}" << endl;
}
}
void LatexGenerator::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("LATEX_OUTPUT");
writeDotGraphFromFile(name,outDir,baseName,EPS);
if (hasCaption)
{
t << "\\begin{figure}[H]" << endl;
t << "\\begin{center}" << endl;
}
else
t << "\\mbox{";
t << "\\includegraphics";
if( Config_getBool("USE_PDFLATEX") )
{
t << "{" << baseName << ".pdf}";
}
else
{
t << "{" << baseName << ".eps}";
}
if (hasCaption)
t << "\\caption{";
else
t << "}" << endl;
}
void LatexGenerator::endDotFile(bool hasCaption)
{
if (hasCaption)
{
t << "}" << endl;
t << "\\end{center}" << endl;
t << "\\end{figure}" << endl;
}
}
//void LatexGenerator::startImage(const char *name,const char *size,bool hasCaption)
//{
// if (hasCaption)
// {
// t << "\\begin{figure}[H]" << endl;
// t << "\\begin{center}" << endl;
// }
// else
// {
// t << "\\mbox{";
// }
// QCString gfxName = name;
// if (gfxName.right(4)==".eps") gfxName.left(gfxName.length()-4);
// // "\\epsfig{file=" << name;
// t << "\\includegraphics";
// if (size) t << "[" << size << "]";
// t << "{" << gfxName << "}";
// if (hasCaption)
// {
// t << "\\caption{";
// }
// else
// {
// t << "}" << endl;
// }
//}
//
//void LatexGenerator::endImage(bool hasCaption)
//{
// if (hasCaption)
// {
// t << "}" << endl;
// t << "\\end{center}" << endl;
// t << "\\end{figure}" << endl;
// }
//}
//
//void LatexGenerator::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("LATEX_OUTPUT");
// writeDotGraphFromFile(name,outDir,baseName,EPS);
// if (hasCaption)
// {
// t << "\\begin{figure}[H]" << endl;
// t << "\\begin{center}" << endl;
// }
// else
// t << "\\mbox{";
// t << "\\includegraphics";
// if( Config_getBool("USE_PDFLATEX") )
// {
// t << "{" << baseName << ".pdf}";
// }
// else
// {
// t << "{" << baseName << ".eps}";
// }
//
// if (hasCaption)
// t << "\\caption{";
// else
// t << "}" << endl;
//}
//
//void LatexGenerator::endDotFile(bool hasCaption)
//{
// if (hasCaption)
// {
// t << "}" << endl;
// t << "\\end{center}" << endl;
// t << "\\end{figure}" << endl;
// }
//}
//
void LatexGenerator::startMemberGroupHeader(bool hasHeader)
{
......@@ -1671,19 +1671,19 @@ void LatexGenerator::endParamList()
t << "\\end{Desc}" << endl;
}
void LatexGenerator::startSectionRefList()
{
t << "\\footnotesize" << endl;
t << "\\begin{multicols}{2}" << endl;
t << "\\begin{CompactList}" << endl;
}
//void LatexGenerator::startSectionRefList()
//{
// t << "\\footnotesize" << endl;
// t << "\\begin{multicols}{2}" << endl;
// t << "\\begin{CompactList}" << endl;
//}
void LatexGenerator::endSectionRefList()
{
t << "\\end{CompactList}" << endl;
t << "\\end{multicols}" << endl;
t << "\\normalsize" << endl;
}
//void LatexGenerator::endSectionRefList()
//{
// t << "\\end{CompactList}" << endl;
// t << "\\end{multicols}" << endl;
// t << "\\normalsize" << endl;
//}
void LatexGenerator::printDoc(DocNode *n)
{
......
......@@ -71,11 +71,11 @@ class LatexGenerator : public OutputGenerator
void endIndexValue(const char *,bool);
void startItemList() { t << "\\begin{CompactItemize}" << endl; }
void endItemList() { t << "\\end{CompactItemize}" << endl; }
void startEnumList() { t << "\\begin{enumerate}" << endl; }
void endEnumList() { t << "\\end{enumerate}" << endl; }
void startAlphabeticalIndexList() {}
void endAlphabeticalIndexList() {}
void writeIndexHeading(const char *) {}
//void startEnumList() { t << "\\begin{enumerate}" << endl; }
//void endEnumList() { t << "\\end{enumerate}" << endl; }
//void startAlphabeticalIndexList() {}
//void endAlphabeticalIndexList() {}
//void writeIndexHeading(const char *) {}
void writeIndexItem(const char *ref,const char *file,const char *name);
void docify(const char *text);
void codify(const char *text);
......@@ -87,7 +87,7 @@ class LatexGenerator : public OutputGenerator
void endTextLink();
void startHtmlLink(const char *url);
void endHtmlLink();
void writeMailLink(const char *url);
//void writeMailLink(const char *url);
void startTypewriter() { t << "{\\tt "; }
void endTypewriter() { t << "}"; }
void startGroupHeader();
......@@ -118,14 +118,14 @@ class LatexGenerator : public OutputGenerator
void writeAnchor(const char *fileName,const char *name);
void startCodeFragment() { t << endl << endl << "\\footnotesize\\begin{verbatim}"; }
void endCodeFragment() { t << "\\end{verbatim}\\normalsize " << endl; }
void startPreFragment() { t << "\\small\\begin{alltt}";
insidePre=TRUE;
}
void endPreFragment() { t << "\\end{alltt}\\normalsize " << endl;
insidePre=FALSE;
}
void startVerbatimFragment() { t << endl << endl << "\\footnotesize\\begin{verbatim}"; }
void endVerbatimFragment() { t << "\\end{verbatim}\\normalsize " << endl; }
//void startPreFragment() { t << "\\small\\begin{alltt}";
// insidePre=TRUE;
// }
//void endPreFragment() { t << "\\end{alltt}\\normalsize " << endl;
// insidePre=FALSE;
// }
//void startVerbatimFragment() { t << endl << endl << "\\footnotesize\\begin{verbatim}"; }
//void endVerbatimFragment() { t << "\\end{verbatim}\\normalsize " << endl; }
void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; }
void startCodeLine() { col=0; }
void endCodeLine() { codify("\n"); }
......@@ -160,52 +160,52 @@ class LatexGenerator : public OutputGenerator
void endCenter() { t << "\\end{center}" << endl; }
void startSmall() { t << "\\footnotesize "; }
void endSmall() { t << "\\normalsize "; }
void startSubscript() { t << "$_{\\mbox{"; }
void endSubscript() { t << "}}$"; }
void startSuperscript() { t << "$^{\\mbox{"; }
void endSuperscript() { t << "}}$"; }
void startTable(bool hasCaption,int c)
{
if (hasCaption) t << "\\begin{table}[h]";
t << "\\begin{TabularC}{" << c << "}\n\\hline\n";
}
void endTable(bool hasCaption)
{
if (hasCaption)
{
t << "\\end{table}\n";
}
else
{
t << "\\\\\\hline\n\\end{TabularC}\n";
}
}
void startCaption() { t << "\\\\\\hline\n\\end{TabularC}\n"
"\\centering\n\\caption{";
}
void endCaption() { t << "}\n"; }
void nextTableRow() {}
void endTableRow() { t << "\\\\\\hline\n"; }
void nextTableColumn() { t << "&"; }
void endTableColumn() {}
void writeCopyright() { t << "\\copyright"; }
void writeQuote() { t << "''"; }
void writeUmlaut(char c) { if (c=='i') t << "\\\"{\\i}"; else
t << "\\\"{" << c << "}";
}
void writeAcute(char c) { if (c=='i') t << "\\'{\\i}"; else
t << "\\'{" << c << "}";
}
void writeGrave(char c) { if (c=='i') t << "\\`{\\i}"; else
t << "\\`{" << c << "}";
}
void writeCirc(char c) { if (c=='i') t << "\\^{\\i}"; else
t << "\\^{" << c << "}";
}
void writeTilde(char c) { t << "\\~{" << c << "}"; }
void writeRing(char c) { t << "\\" << c << c; }
void writeSharpS() { t << "\"s"; }
void writeCCedil(char c) { t << "\\c{" << c << "}"; }
//void startSubscript() { t << "$_{\\mbox{"; }
//void endSubscript() { t << "}}$"; }
//void startSuperscript() { t << "$^{\\mbox{"; }
//void endSuperscript() { t << "}}$"; }
//void startTable(bool hasCaption,int c)
// {
// if (hasCaption) t << "\\begin{table}[h]";
// t << "\\begin{TabularC}{" << c << "}\n\\hline\n";
// }
//void endTable(bool hasCaption)
// {
// if (hasCaption)
// {
// t << "\\end{table}\n";
// }
// else
// {
// t << "\\\\\\hline\n\\end{TabularC}\n";
// }
// }
//void startCaption() { t << "\\\\\\hline\n\\end{TabularC}\n"
// "\\centering\n\\caption{";
// }
//void endCaption() { t << "}\n"; }
//void nextTableRow() {}
//void endTableRow() { t << "\\\\\\hline\n"; }
//void nextTableColumn() { t << "&"; }
//void endTableColumn() {}
//void writeCopyright() { t << "\\copyright"; }
//void writeQuote() { t << "''"; }
//void writeUmlaut(char c) { if (c=='i') t << "\\\"{\\i}"; else
// t << "\\\"{" << c << "}";
// }
//void writeAcute(char c) { if (c=='i') t << "\\'{\\i}"; else
// t << "\\'{" << c << "}";
// }
//void writeGrave(char c) { if (c=='i') t << "\\`{\\i}"; else
// t << "\\`{" << c << "}";
// }
//void writeCirc(char c) { if (c=='i') t << "\\^{\\i}"; else
// t << "\\^{" << c << "}";
// }
//void writeTilde(char c) { t << "\\~{" << c << "}"; }
//void writeRing(char c) { t << "\\" << c << c; }
//void writeSharpS() { t << "\"s"; }
//void writeCCedil(char c) { t << "\\c{" << c << "}"; }
void startMemberDescription() { t << "\\begin{CompactList}\\small\\item\\em "; }
void endMemberDescription() { t << "\\item\\end{CompactList}"; }
void startDescList(SectionTypes) { t << "\\begin{Desc}\n\\item["; }
......@@ -214,12 +214,12 @@ class LatexGenerator : public OutputGenerator
void endSimpleSect();
void startParamList(ParamListTypes,const char *title);
void endParamList();
void endDescTitle() { t << "]"; }
//void endDescTitle() { t << "]"; }
void writeDescItem() { t << "\\par" << endl; }
void startSection(const char *,const char *,SectionInfo::SectionType);
void endSection(const char *,SectionInfo::SectionType);
void writeSectionRef(const char *,const char *,const char *,const char *);
void writeSectionRefItem(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 writeSectionRefAnchor(const char *,const char *,const char *);
void addIndexItem(const char *,const char *);
void startIndent() {}
......@@ -234,12 +234,12 @@ class LatexGenerator : public OutputGenerator
void endPageRef(const char *,const char *);
void startQuickIndexItem(const char *,const char *) {}
void endQuickIndexItem() {}
void writeFormula(const char *,const char *);
//void writeFormula(const char *,const char *);
void writeNonBreakableSpace(int);
void startImage(const char *,const char *,bool);
void endImage(bool);
void startDotFile(const char *,bool);
void endDotFile(bool);
//void startImage(const char *,const char *,bool);
//void endImage(bool);
//void startDotFile(const char *,bool);
//void endDotFile(bool);
void startDescTable()
{ t << "\\begin{description}" << endl; }
......@@ -278,13 +278,13 @@ class LatexGenerator : public OutputGenerator
void startFontClass(const char *) {}
void endFontClass() {}
void startHtmlOnly() {}
void endHtmlOnly() {}
void startLatexOnly() {}
void endLatexOnly() {}
//void startHtmlOnly() {}
//void endHtmlOnly() {}
//void startLatexOnly() {}
//void endLatexOnly() {}
void startSectionRefList();
void endSectionRefList();
//void startSectionRefList();
//void endSectionRefList();
void writeCodeAnchor(const char *) {}
......
......@@ -213,10 +213,10 @@ void ManGenerator::endHtmlLink()
{
}
void ManGenerator::writeMailLink(const char *url)
{
docify(url);
}
//void ManGenerator::writeMailLink(const char *url)
//{
// docify(url);
//}
void ManGenerator::startGroupHeader()
{
......@@ -451,11 +451,11 @@ void ManGenerator::startDescItem()
firstCol=FALSE;
}
void ManGenerator::endDescTitle()
{
endBold();
paragraph=TRUE;
}
//void ManGenerator::endDescTitle()
//{
// endBold();
// paragraph=TRUE;
//}
void ManGenerator::writeDescItem()
{
......
......@@ -69,11 +69,11 @@ class ManGenerator : public OutputGenerator
void endIndexValue(const char *,bool) {}
void startItemList() {}
void endItemList() { newParagraph(); }
void startEnumList() {}
void endEnumList() { newParagraph(); }
void startAlphabeticalIndexList() {}
void endAlphabeticalIndexList() {}
void writeIndexHeading(const char *) {}
//void startEnumList() {}
//void endEnumList() { newParagraph(); }
//void startAlphabeticalIndexList() {}
//void endAlphabeticalIndexList() {}
//void writeIndexHeading(const char *) {}
void writeIndexItem(const char *ref,const char *file,const char *name);
void docify(const char *text);
void codify(const char *text);
......@@ -85,7 +85,7 @@ class ManGenerator : public OutputGenerator
void endTextLink() {}
void startHtmlLink(const char *url);
void endHtmlLink();
void writeMailLink(const char *url);
//void writeMailLink(const char *url);
void startTypewriter() { t << "\\fC"; firstCol=FALSE; }
void endTypewriter() { t << "\\fP"; firstCol=FALSE; }
void startGroupHeader();
......@@ -114,10 +114,10 @@ class ManGenerator : public OutputGenerator
void writeAnchor(const char *,const char *) {}
void startCodeFragment();
void endCodeFragment();
void startPreFragment() { startCodeFragment(); }
void endPreFragment() { endCodeFragment(); }
void startVerbatimFragment() { startCodeFragment(); }
void endVerbatimFragment() { endCodeFragment(); }
//void startPreFragment() { startCodeFragment(); }
//void endPreFragment() { endCodeFragment(); }
//void startVerbatimFragment() { startCodeFragment(); }
//void endVerbatimFragment() { endCodeFragment(); }
void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; }
void startCodeLine() {}
void endCodeLine() { codify("\n"); col=0; }
......@@ -152,33 +152,33 @@ class ManGenerator : public OutputGenerator
void endCenter() {}
void startSmall() {}
void endSmall() {}
void startSubscript() { t << "\\*<"; firstCol=FALSE; }
void endSubscript() { t << "\\*>"; firstCol=FALSE; }
void startSuperscript() { t << "\\*{"; firstCol=FALSE; }
void endSuperscript() { t << "\\*}"; firstCol=FALSE; }
void startTable(bool,int) {}
void endTable(bool) {}
void startCaption() {}
void endCaption() {}
void nextTableRow() {}
void endTableRow() {}
void nextTableColumn() {}
void endTableColumn() {}
void writeCopyright() { t << "(c)"; firstCol=FALSE; }
void writeQuote() { t << "`"; firstCol=FALSE; }
void writeUmlaut(char c) { t << c << "\\*'"; firstCol=FALSE; }
void writeAcute(char c) { t << c << "\\*`"; firstCol=FALSE; }
void writeGrave(char c) { t << c << "\\*:"; firstCol=FALSE; }
void writeCirc(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,
need to check! */
firstCol=FALSE; }
void writeSharpS() { t << "s\\*:"; /* just a wild guess,
need to check! */
firstCol=FALSE; }
void writeCCedil(char c) { t << c; /* TODO: fix this */
firstCol=FALSE; }
//void startSubscript() { t << "\\*<"; firstCol=FALSE; }
//void endSubscript() { t << "\\*>"; firstCol=FALSE; }
//void startSuperscript() { t << "\\*{"; firstCol=FALSE; }
//void endSuperscript() { t << "\\*}"; firstCol=FALSE; }
//void startTable(bool,int) {}
//void endTable(bool) {}
//void startCaption() {}
//void endCaption() {}
//void nextTableRow() {}
//void endTableRow() {}
//void nextTableColumn() {}
//void endTableColumn() {}
//void writeCopyright() { t << "(c)"; firstCol=FALSE; }
//void writeQuote() { t << "`"; firstCol=FALSE; }
//void writeUmlaut(char c) { t << c << "\\*'"; firstCol=FALSE; }
//void writeAcute(char c) { t << c << "\\*`"; firstCol=FALSE; }
//void writeGrave(char c) { t << c << "\\*:"; firstCol=FALSE; }
//void writeCirc(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,
// need to check! */
// firstCol=FALSE; }
//void writeSharpS() { t << "s\\*:"; /* just a wild guess,
// need to check! */
// firstCol=FALSE; }
//void writeCCedil(char c) { t << c; /* TODO: fix this */
// firstCol=FALSE; }
void startMemberDescription() { t << "\n.RI \"\\fI"; firstCol=FALSE; }
void endMemberDescription() { t << "\\fP\""; firstCol=FALSE; }
void startDescList(SectionTypes);
......@@ -187,12 +187,12 @@ class ManGenerator : public OutputGenerator
void endSimpleSect();
void startParamList(ParamListTypes,const char *title);
void endParamList();
void endDescTitle();
//void endDescTitle();
void writeDescItem();
void startSection(const char *,const char *,SectionInfo::SectionType);
void endSection(const char *,SectionInfo::SectionType);
void writeSectionRef(const char *,const char *,const char *,const char *) {}
void writeSectionRefItem(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 writeSectionRefAnchor(const char *,const char *,const char *) {}
void addIndexItem(const char *,const char *) {}
void startIndent() {}
......@@ -207,12 +207,12 @@ class ManGenerator : public OutputGenerator
void endPageRef(const char *,const char *) {}
void startQuickIndexItem(const char *,const char *) {}
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 startImage(const char *,const char *,bool) {}
void endImage(bool) {}
void startDotFile(const char *,bool) {}
void endDotFile(bool) {}
//void startImage(const char *,const char *,bool) {}
//void endImage(bool) {}
//void startDotFile(const char *,bool) {}
//void endDotFile(bool) {}
void startDescTable() {}
void endDescTable() {}
......@@ -245,13 +245,13 @@ class ManGenerator : public OutputGenerator
void startFontClass(const char *) {}
void endFontClass() {}
void startHtmlOnly() {}
void endHtmlOnly() {}
void startLatexOnly() {}
void endLatexOnly() {}
//void startHtmlOnly() {}
//void endHtmlOnly() {}
//void startLatexOnly() {}
//void endLatexOnly() {}
void startSectionRefList() {}
void endSectionRefList() {}
//void startSectionRefList() {}
//void endSectionRefList() {}
void writeCodeAnchor(const char *) {}
......
......@@ -301,7 +301,7 @@ MemberDef::MemberDef(const char *df,int dl,
exception=e;
proto=FALSE;
annScope=FALSE;
memSpec=FALSE;
memSpec=0;
annMemb=0;
annUsed=FALSE;
annShown=FALSE;
......@@ -651,6 +651,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
case Define: Doxygen::tagFile << "define"; break;
case EnumValue: Doxygen::tagFile << "enumvalue"; break;
case Property: Doxygen::tagFile << "property"; break;
case Event: Doxygen::tagFile << "event"; break;
case Variable: Doxygen::tagFile << "variable"; break;
case Typedef: Doxygen::tagFile << "typedef"; break;
case Enumeration: Doxygen::tagFile << "enumeration"; break;
......@@ -776,7 +777,8 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (getAnonymousEnumType()) // type is an anonymous enum
{
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);
}
else
......@@ -1053,7 +1055,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
htmlHelp->addIndexItem(cname,name(),cfname,anchor());
}
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));
found=TRUE;
......@@ -1169,7 +1172,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
isFriend() || isRelated() || isExplicit() ||
isMutable() || (isInline() && Config_getBool("INLINE_INFO")) ||
isSignal() || isSlot() ||
isStatic() || (classDef && classDef!=container)
isStatic() || (classDef && classDef!=container) ||
isSettable() || isGettable()
)
{
// write the member specifier list
......@@ -1186,6 +1190,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (isExplicit()) sl.append("explicit");
if (isMutable()) sl.append("mutable");
if (isStatic()) sl.append("static");
if (isGettable()) sl.append("get");
if (isSettable()) sl.append("set");
if (protection()==Protected) sl.append("protected");
else if (protection()==Private) sl.append("private");
if (lvirt==Virtual) sl.append("virtual");
......@@ -1585,11 +1591,11 @@ bool MemberDef::isLinkable() const
}
}
void MemberDef::setEnumDecl(OutputList &ed)
{
enumDeclList=new OutputList(&ed);
*enumDeclList+=ed;
}
//void MemberDef::setEnumDecl(OutputList &ed)
//{
// enumDeclList=new OutputList(&ed);
// *enumDeclList+=ed;
//}
bool MemberDef::isDocumentedFriendClass() const
{
......@@ -1706,6 +1712,7 @@ MemberDef *MemberDef::createTemplateInstanceMember(
imd->def = substituteTemplateArgumentsInString(def,formalArgs,actualArgs);
imd->setBodyDef(getBodyDef());
imd->setBodySegment(getStartBodyLine(),getEndBodyLine());
imd->setBodyMember(this);
// TODO: init other member variables (if needed).
// TODO: reimplemented info
......@@ -1796,3 +1803,122 @@ bool MemberDef::isDestructor() const
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
Slot,
Friend,
DCOP,
Property
Property,
Event
};
MemberDef(const char *defFileName,int defLine,
......@@ -114,11 +115,14 @@ class MemberDef : public Definition
bool isFriend() const { return mtype==Friend; }
bool isDCOP() const { return mtype==DCOP; }
bool isProperty() const { return mtype==Property; }
bool isEvent() const { return mtype==Event; }
bool isRelated() const { return related; }
bool isStatic() const { return stat; }
bool isInline() const { return (memSpec&Entry::Inline)!=0; }
bool isExplicit() const { return (memSpec&Entry::Explicit)!=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 isConstructor() const;
bool isDestructor() const;
......@@ -173,10 +177,10 @@ class MemberDef : public Definition
void insertEnumField(MemberDef *md);
void setEnumScope(MemberDef *md);
MemberDef *getEnumScope() const { return enumScope; }
void setEnumDecl(OutputList &ed);
//void setEnumUsed() { eUsed=TRUE; }
//bool enumUsed() const { return eUsed; }
OutputList *enumDecl() const { return enumDeclList; }
//void setEnumDecl(OutputList &ed);
//OutputList *enumDecl() const { return enumDeclList; }
MemberList *enumFieldList() const { return enumFields; }
void setDocumentedEnumValues(bool value) { docEnumValues=value; }
bool hasDocumentedEnumValues() const { return docEnumValues; }
......@@ -252,6 +256,10 @@ class MemberDef : public Definition
MemberDef *memberDefinition() const { return memDef; }
MemberDef *memberDeclaration() const { return memDec; }
void writeEnumDeclaration(OutputList &typeDecl,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd);
bool visited;
private:
......
......@@ -66,6 +66,7 @@ void MemberList::countDecMembers()
switch(md->memberType())
{
case MemberDef::Variable: // fall through
case MemberDef::Event: // fall through
case MemberDef::Property: m_varCnt++,m_numDecMembers++;
break;
case MemberDef::Function: // fall through
......@@ -189,7 +190,8 @@ void MemberList::writePlainDeclarations(OutputList &ol,
case MemberDef::Signal: // fall through
case MemberDef::Slot: // fall through
case MemberDef::DCOP: // fall through
case MemberDef::Property:
case MemberDef::Property: // fall through
case MemberDef::Event:
{
if (first) ol.startMemberList(),first=FALSE;
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
......@@ -198,6 +200,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
case MemberDef::Enumeration:
{
if (first) ol.startMemberList(),first=FALSE;
#if 0
OutputList typeDecl(&ol);
QCString name(md->name());
int i=name.findRev("::");
......@@ -313,9 +316,13 @@ void MemberList::writePlainDeclarations(OutputList &ol,
typeDecl.docify(" }");
md->setEnumDecl(typeDecl);
}
#endif
int enumVars=0;
MemberListIterator vmli(*this);
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
{
for ( ; (vmd=vmli.current()) ; ++vmli)
......@@ -335,7 +342,8 @@ void MemberList::writePlainDeclarations(OutputList &ol,
ol.startMemberItem(0);
ol.writeString("enum ");
ol.insertMemberAlign();
ol+=typeDecl; // append the enum values.
//ol+=typeDecl; // append the enum values.
md->writeEnumDeclaration(ol,cd,nd,fd,gd);
ol.endMemberItem(FALSE);
if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
......
......@@ -66,12 +66,13 @@ class BaseCodeDocInterface
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
* parser to generate the output for a specific format,
* This abstract class is used by output generation functions
* to generate the output for a specific format,
* 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
{
......@@ -232,62 +233,10 @@ class BaseOutputDocInterface : public BaseCodeDocInterface
virtual void endTextLink() = 0;
virtual void startPageRef() = 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 endSubsection() = 0;
virtual void startSubsubsection() = 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.
......@@ -306,7 +255,7 @@ class OutputGenerator : public BaseOutputDocInterface
// generic generator methods
///////////////////////////////////////////////////////////////
virtual OutputGenerator *copy() = 0;
virtual void append(const OutputGenerator *) = 0;
//virtual void append(const OutputGenerator *) = 0;
virtual void enable() = 0;
virtual void disable() = 0;
virtual void enableIf(OutputType o) = 0;
......@@ -314,8 +263,8 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void disableIfNot(OutputType o) = 0;
virtual bool isEnabled(OutputType o) = 0;
virtual OutputGenerator *get(OutputType o) = 0;
void clear() { b.close(); a.resize(0); b.setBuffer(a);
b.open(IO_WriteOnly); t.setDevice(&b); }
//void clear() { b.close(); a.resize(0); b.setBuffer(a);
// b.open(IO_WriteOnly); t.setDevice(&b); }
void startPlainFile(const char *name);
void endPlainFile();
QCString getContents() const;
......@@ -345,9 +294,6 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endIndexKey() = 0;
virtual void startIndexValue(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,
const char *text) = 0;
virtual void startGroupHeader() = 0;
......@@ -466,7 +412,7 @@ class OutputDocInterface : public BaseOutputDocInterface
/*! Appends the output generated by generator \a g to this
* 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
* generators) on a stack.
......
......@@ -156,20 +156,20 @@ bool OutputList::isEnabled(OutputGenerator::OutputType o)
return result;
}
OutputList &OutputList::operator+=(const OutputList &outputList)
{
OutputList *ol=(OutputList *)&outputList;
OutputGenerator *ogsrc=ol->outputs->first();
OutputGenerator *ogdst=outputs->first();
//printf("OutputList::operator+= src=%d dst=%d\n",outputs->count(),ol->outputs->count());
while (ogdst && ogsrc)
{
ogdst->append(ogsrc);
ogsrc=ol->outputs->next();
ogdst=outputs->next();
}
return *this;
}
//OutputList &OutputList::operator+=(const OutputList &outputList)
//{
// OutputList *ol=(OutputList *)&outputList;
// OutputGenerator *ogsrc=ol->outputs->first();
// OutputGenerator *ogdst=outputs->first();
// //printf("OutputList::operator+= src=%d dst=%d\n",outputs->count(),ol->outputs->count());
// while (ogdst && ogsrc)
// {
// ogdst->append(ogsrc);
// ogsrc=ol->outputs->next();
// ogdst=outputs->next();
// }
// return *this;
//}
void OutputList::pushGeneratorState()
{
......
......@@ -44,7 +44,7 @@ class OutputList : public OutputDocInterface
virtual ~OutputList();
OutputList(const OutputList *ol);
OutputList &operator=(const OutputList &ol);
OutputList &operator+=(const OutputList &ol);
//OutputList &operator+=(const OutputList &ol);
void add(const OutputGenerator *);
......@@ -72,10 +72,10 @@ class OutputList : public OutputDocInterface
{
return new OutputList(this);
}
void append(const OutputDocInterface *g)
{
operator+=(*(OutputList *)g);
}
//void append(const OutputDocInterface *g)
//{
// operator+=(*(OutputList *)g);
//}
//void writeIndex()
//{ forall(&OutputGenerator::writeIndex); }
......@@ -124,16 +124,16 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startItemList); }
void endItemList()
{ forall(&OutputGenerator::endItemList); }
void startEnumList()
{ forall(&OutputGenerator::startEnumList); }
void endEnumList()
{ forall(&OutputGenerator::endEnumList); }
void startAlphabeticalIndexList()
{ forall(&OutputGenerator::startAlphabeticalIndexList); }
void endAlphabeticalIndexList()
{ forall(&OutputGenerator::endAlphabeticalIndexList); }
void writeIndexHeading(const char *s)
{ forall(&OutputGenerator::writeIndexHeading,s); }
//void startEnumList()
//{ forall(&OutputGenerator::startEnumList); }
//void endEnumList()
//{ forall(&OutputGenerator::endEnumList); }
//void startAlphabeticalIndexList()
//{ forall(&OutputGenerator::startAlphabeticalIndexList); }
//void endAlphabeticalIndexList()
//{ forall(&OutputGenerator::endAlphabeticalIndexList); }
//void writeIndexHeading(const char *s)
//{ forall(&OutputGenerator::writeIndexHeading,s); }
void writeIndexItem(const char *ref,const char *file,const char *text)
{ forall(&OutputGenerator::writeIndexItem,ref,file,text); }
void docify(const char *s)
......@@ -154,8 +154,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startHtmlLink,url); }
void endHtmlLink()
{ forall(&OutputGenerator::endHtmlLink); }
void writeMailLink(const char *url)
{ forall(&OutputGenerator::writeMailLink,url); }
//void writeMailLink(const char *url)
//{ forall(&OutputGenerator::writeMailLink,url); }
void writeStartAnnoItem(const char *type,const char *file,
const char *path,const char *name)
{ forall(&OutputGenerator::writeStartAnnoItem,type,file,path,name); }
......@@ -213,14 +213,14 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startCodeFragment); }
void endCodeFragment()
{ forall(&OutputGenerator::endCodeFragment); }
void startPreFragment()
{ forall(&OutputGenerator::startPreFragment); }
void endPreFragment()
{ forall(&OutputGenerator::endPreFragment); }
void startVerbatimFragment()
{ forall(&OutputGenerator::startVerbatimFragment); }
void endVerbatimFragment()
{ forall(&OutputGenerator::endVerbatimFragment); }
//void startPreFragment()
//{ forall(&OutputGenerator::startPreFragment); }
//void endPreFragment()
//{ forall(&OutputGenerator::endPreFragment); }
//void startVerbatimFragment()
//{ forall(&OutputGenerator::startVerbatimFragment); }
//void endVerbatimFragment()
//{ forall(&OutputGenerator::endVerbatimFragment); }
void startCodeLine()
{ forall(&OutputGenerator::startCodeLine); }
void endCodeLine()
......@@ -280,56 +280,56 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startSmall); }
void endSmall()
{ forall(&OutputGenerator::endSmall); }
void startSubscript()
{ forall(&OutputGenerator::startSubscript); }
void endSubscript()
{ forall(&OutputGenerator::endSubscript); }
void startSuperscript()
{ forall(&OutputGenerator::startSuperscript); }
void endSuperscript()
{ forall(&OutputGenerator::endSuperscript); }
void startTable(bool hasCaption,int cols)
{ forall(&OutputGenerator::startTable,hasCaption,cols); }
void endTable(bool hasCaption)
{ forall(&OutputGenerator::endTable,hasCaption); }
void startCaption()
{ forall(&OutputGenerator::startCaption); }
void endCaption()
{ forall(&OutputGenerator::endCaption); }
void nextTableRow()
{ forall(&OutputGenerator::nextTableRow); }
void endTableRow()
{ forall(&OutputGenerator::endTableRow); }
void nextTableColumn()
{ forall(&OutputGenerator::nextTableColumn); }
void endTableColumn()
{ forall(&OutputGenerator::endTableColumn); }
//void startSubscript()
//{ forall(&OutputGenerator::startSubscript); }
//void endSubscript()
//{ forall(&OutputGenerator::endSubscript); }
//void startSuperscript()
//{ forall(&OutputGenerator::startSuperscript); }
//void endSuperscript()
//{ forall(&OutputGenerator::endSuperscript); }
//void startTable(bool hasCaption,int cols)
//{ forall(&OutputGenerator::startTable,hasCaption,cols); }
//void endTable(bool hasCaption)
//{ forall(&OutputGenerator::endTable,hasCaption); }
//void startCaption()
//{ forall(&OutputGenerator::startCaption); }
//void endCaption()
//{ forall(&OutputGenerator::endCaption); }
//void nextTableRow()
//{ forall(&OutputGenerator::nextTableRow); }
//void endTableRow()
//{ forall(&OutputGenerator::endTableRow); }
//void nextTableColumn()
//{ forall(&OutputGenerator::nextTableColumn); }
//void endTableColumn()
//{ forall(&OutputGenerator::endTableColumn); }
void lineBreak()
{ forall(&OutputGenerator::lineBreak); }
void startBold()
{ forall(&OutputGenerator::startBold); }
void endBold()
{ forall(&OutputGenerator::endBold); }
void writeCopyright()
{ forall(&OutputGenerator::writeCopyright); }
void writeQuote()
{ forall(&OutputGenerator::writeQuote); }
void writeUmlaut(char c)
{ forall(&OutputGenerator::writeUmlaut,c); }
void writeAcute(char c)
{ forall(&OutputGenerator::writeAcute,c); }
void writeGrave(char c)
{ forall(&OutputGenerator::writeGrave,c); }
void writeCirc(char c)
{ forall(&OutputGenerator::writeCirc,c); }
void writeTilde(char c)
{ forall(&OutputGenerator::writeTilde,c); }
void writeRing(char c)
{ forall(&OutputGenerator::writeRing,c); }
void writeSharpS()
{ forall(&OutputGenerator::writeSharpS); }
void writeCCedil(char c)
{ forall(&OutputGenerator::writeCCedil,c); }
//void writeCopyright()
//{ forall(&OutputGenerator::writeCopyright); }
//void writeQuote()
//{ forall(&OutputGenerator::writeQuote); }
//void writeUmlaut(char c)
//{ forall(&OutputGenerator::writeUmlaut,c); }
//void writeAcute(char c)
//{ forall(&OutputGenerator::writeAcute,c); }
//void writeGrave(char c)
//{ forall(&OutputGenerator::writeGrave,c); }
//void writeCirc(char c)
//{ forall(&OutputGenerator::writeCirc,c); }
//void writeTilde(char c)
//{ forall(&OutputGenerator::writeTilde,c); }
//void writeRing(char c)
//{ forall(&OutputGenerator::writeRing,c); }
//void writeSharpS()
//{ forall(&OutputGenerator::writeSharpS); }
//void writeCCedil(char c)
//{ forall(&OutputGenerator::writeCCedil,c); }
void startMemberDescription()
{ forall(&OutputGenerator::startMemberDescription); }
void endMemberDescription()
......@@ -343,8 +343,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startParamList,t,title); }
void endParamList()
{ forall(&OutputGenerator::endParamList); }
void endDescTitle()
{ forall(&OutputGenerator::endDescTitle); }
//void endDescTitle()
//{ forall(&OutputGenerator::endDescTitle); }
void writeDescItem()
{ forall(&OutputGenerator::writeDescItem); }
void startIndent()
......@@ -355,11 +355,11 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startSection,lab,title,t); }
void endSection(const char *lab,SectionInfo::SectionType t)
{ forall(&OutputGenerator::endSection,lab,t); }
void writeSectionRef(const char *ref,const char *file,
const char *anchor, const char *title)
{ forall(&OutputGenerator::writeSectionRef,ref,file,anchor,title); }
void writeSectionRefItem(const char *page,const char *lab, const char *title)
{ forall(&OutputGenerator::writeSectionRefItem,page,lab,title); }
//void writeSectionRef(const char *ref,const char *file,
// const char *anchor, const char *title)
//{ forall(&OutputGenerator::writeSectionRef,ref,file,anchor,title); }
//void writeSectionRefItem(const char *page,const char *lab, const char *title)
//{ forall(&OutputGenerator::writeSectionRefItem,page,lab,title); }
//void writeSectionRefAnchor(const char *page,const char *lab, const char *title)
//{ forall(&OutputGenerator::writeSectionRefAnchor,page,lab,title); }
void addIndexItem(const char *s1,const char *s2)
......@@ -382,18 +382,18 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startQuickIndexItem,s,l); }
void endQuickIndexItem()
{ forall(&OutputGenerator::endQuickIndexItem); }
void writeFormula(const char *n,const char *t)
{ forall(&OutputGenerator::writeFormula,n,t); }
//void writeFormula(const char *n,const char *t)
//{ forall(&OutputGenerator::writeFormula,n,t); }
void writeNonBreakableSpace(int num)
{ forall(&OutputGenerator::writeNonBreakableSpace,num); }
void startImage(const char *n,const char *s,bool c)
{ forall(&OutputGenerator::startImage,n,s,c); }
void endImage(bool c)
{ forall(&OutputGenerator::endImage,c); }
void startDotFile(const char *n,bool c)
{ forall(&OutputGenerator::startDotFile,n,c); }
void endDotFile(bool c)
{ forall(&OutputGenerator::endDotFile,c); }
//void startImage(const char *n,const char *s,bool c)
//{ forall(&OutputGenerator::startImage,n,s,c); }
//void endImage(bool c)
//{ forall(&OutputGenerator::endImage,c); }
//void startDotFile(const char *n,bool c)
//{ forall(&OutputGenerator::startDotFile,n,c); }
//void endDotFile(bool c)
//{ forall(&OutputGenerator::endDotFile,c); }
void startDescTable()
{ forall(&OutputGenerator::startDescTable); }
......@@ -450,19 +450,19 @@ class OutputList : public OutputDocInterface
void endFontClass()
{ forall(&OutputGenerator::endFontClass); }
void startHtmlOnly()
{ forall(&OutputGenerator::startHtmlOnly); }
void endHtmlOnly()
{ forall(&OutputGenerator::endHtmlOnly); }
void startLatexOnly()
{ forall(&OutputGenerator::startLatexOnly); }
void endLatexOnly()
{ forall(&OutputGenerator::endLatexOnly); }
//void startHtmlOnly()
//{ forall(&OutputGenerator::startHtmlOnly); }
//void endHtmlOnly()
//{ forall(&OutputGenerator::endHtmlOnly); }
//void startLatexOnly()
//{ forall(&OutputGenerator::startLatexOnly); }
//void endLatexOnly()
//{ forall(&OutputGenerator::endLatexOnly); }
void startSectionRefList()
{ forall(&OutputGenerator::startSectionRefList); }
void endSectionRefList()
{ forall(&OutputGenerator::endSectionRefList); }
//void startSectionRefList()
//{ forall(&OutputGenerator::startSectionRefList); }
//void endSectionRefList()
//{ forall(&OutputGenerator::endSectionRefList); }
void writeCodeAnchor(const char *name)
{ forall(&OutputGenerator::writeCodeAnchor,name); }
......
......@@ -122,9 +122,13 @@ public:
inline PerlModOutput &close(char c = 0) { iclose(c); return *this; }
inline PerlModOutput &addField(const char *s) { iaddField(s); return *this; }
inline PerlModOutput &addFieldQuoted(const char *field, const char *content)
inline PerlModOutput &addFieldQuotedString(const char *field, const char *content)
{
iaddFieldQuoted(field, content); return *this;
iaddFieldQuotedString(field, content); return *this;
}
inline PerlModOutput &addFieldBoolean(const char *field, bool content)
{
return addFieldQuotedString(field, content ? "yes" : "no");
}
inline PerlModOutput &openList(const char *s = 0) { open('[', s); return *this; }
inline PerlModOutput &closeList() { close(']'); return *this; }
......@@ -140,7 +144,7 @@ protected:
void decIndent();
void iaddQuoted(const char *);
void iaddFieldQuoted(const char *, const char *);
void iaddFieldQuotedString(const char *, const char *);
void iaddField(const char *);
void iopen(char, const char *);
......@@ -202,8 +206,10 @@ inline void PerlModOutput::iaddField(const char *s)
m_stream->add(" => ");
}
void PerlModOutput::iaddFieldQuoted(const char *field, const char *content)
void PerlModOutput::iaddFieldQuotedString(const char *field, const char *content)
{
if (content == 0)
return;
iaddField(field);
m_stream->add('\'');
iaddQuoted(content);
......@@ -230,7 +236,7 @@ void PerlModOutput::iclose(char c)
m_stream->add(",\n");
}
/*! @brief Concrete visitor implementation for Perl output. */
/*! @brief Concrete visitor implementation for PerlMod output. */
class PerlModDocVisitor : public DocVisitor
{
public:
......@@ -339,7 +345,7 @@ private:
// helper functions
//--------------------------------------
void addLink(const QString &ref,const QString &file,
void addLink(const QString &ref, const QString &file,
const QString &anchor);
void enterText();
......@@ -378,13 +384,13 @@ void PerlModDocVisitor::addLink(const QString &,const QString &file,const QStrin
QString link = file;
if (!anchor.isEmpty())
(link += "_1") += anchor;
m_output.addFieldQuoted("link", link);
m_output.addFieldQuotedString("link", link);
}
void PerlModDocVisitor::openItem(const char *name)
{
leaveText();
m_output.openHash().addFieldQuoted("type", name);
m_output.openHash().addFieldQuotedString("type", name);
}
void PerlModDocVisitor::closeItem()
......@@ -437,7 +443,7 @@ void PerlModDocVisitor::visit(DocLinkedWord *w)
{
openItem("url");
addLink(w->ref(), w->file(), w->anchor());
m_output.addFieldQuoted("content", w->word());
m_output.addFieldQuotedString("content", w->word());
closeItem();
}
......@@ -525,7 +531,7 @@ void PerlModDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::LatexOnly: type = "latexonly"; break;
}
openItem(type);
m_output.addFieldQuoted("content", s->text());
m_output.addFieldQuotedString("content", s->text());
closeItem();
}
......@@ -533,7 +539,7 @@ void PerlModDocVisitor::visit(DocAnchor *anc)
{
QString anchor = anc->file() + "_1" + anc->anchor();
openItem("anchor");
m_output.addFieldQuoted("id", anchor);
m_output.addFieldQuotedString("id", anchor);
closeItem();
}
......@@ -554,7 +560,7 @@ void PerlModDocVisitor::visit(DocInclude *inc)
case DocInclude::VerbInclude: type = "preformatted"; break;
}
openItem(type);
m_output.addFieldQuoted("content", inc->text());
m_output.addFieldQuotedString("content", inc->text());
closeItem();
}
......@@ -587,7 +593,7 @@ void PerlModDocVisitor::visit(DocFormula *f)
openItem("formula");
QString id;
id += f->id();
m_output.addFieldQuoted("id", id).addFieldQuoted("content", f->text());
m_output.addFieldQuotedString("id", id).addFieldQuotedString("content", f->text());
closeItem();
}
......@@ -933,7 +939,7 @@ void PerlModDocVisitor::visitPre(DocRef *ref)
{
openItem("ref");
if (!ref->hasLinkText())
m_output.addFieldQuoted("text", ref->targetTitle());
m_output.addFieldQuotedString("text", ref->targetTitle());
}
void PerlModDocVisitor::visitPost(DocRef *)
......@@ -972,7 +978,7 @@ void PerlModDocVisitor::visitPost(DocSecRefList *)
void PerlModDocVisitor::visitPre(DocLanguage *l)
{
openItem("language");
m_output.addFieldQuoted("id", l->id());
m_output.addFieldQuotedString("id", l->id());
}
void PerlModDocVisitor::visitPost(DocLanguage *)
......@@ -1012,7 +1018,7 @@ void PerlModDocVisitor::visitPre(DocParamList *pl)
for (li.toFirst();(s=li.current());++li)
{
m_output.openHash()
.addFieldQuoted("name", s)
.addFieldQuotedString("name", s)
.closeHash();
}
m_output.closeList()
......@@ -1074,8 +1080,7 @@ void PerlModDocVisitor::visitPost(DocText *)
{
}
static void addTemplateArgumentList(ArgumentList *al,
PerlModOutput &output,const char * /*name*/)
static void addTemplateArgumentList(ArgumentList *al,PerlModOutput &output,const char *)
{
QCString indentStr;
if (!al)
......@@ -1087,26 +1092,24 @@ static void addTemplateArgumentList(ArgumentList *al,
{
output.openHash();
if (!a->type.isEmpty())
output.addFieldQuoted("type", a->type);
output.addFieldQuotedString("type", a->type);
if (!a->name.isEmpty())
output.addFieldQuoted("declaration_name", a->name)
.addFieldQuoted("definition_name", a->name);
output.addFieldQuotedString("declaration_name", a->name)
.addFieldQuotedString("definition_name", a->name);
if (!a->defval.isEmpty())
output.addFieldQuoted("default", a->defval);
output.addFieldQuotedString("default", a->defval);
output.closeHash();
}
output.closeList();
}
/*
static void addMemberTemplateLists(MemberDef *md,PerlModOutput &output)
{
ClassDef *cd = md->getClassDef();
const char *cname = cd ? cd->name().data() : 0;
if (md->templateArguments()) // function template prefix
addTemplateArgumentList(md->templateArguments(),output,cname);
}
*/
//static void addMemberTemplateLists(MemberDef *md,PerlModOutput &output)
//{
// ClassDef *cd = md->getClassDef();
// const char *cname = cd ? cd->name().data() : 0;
// if (md->templateArguments()) // function template prefix
// addTemplateArgumentList(md->templateArguments(),output,cname);
//}
static void addTemplateList(ClassDef *cd,PerlModOutput &output)
{
......@@ -1123,11 +1126,8 @@ static void addPerlModDocBlock(PerlModOutput &output,
{
QCString stext = text.stripWhiteSpace();
if (stext.isEmpty())
{
output.addField(name).add("{},\n");
}
else
{
else {
DocNode *root = validatingParseDoc(fileName,lineNr,scope,md,stext,FALSE);
output.openHash(name);
PerlModDocVisitor *visitor = new PerlModDocVisitor(output);
......@@ -1161,7 +1161,7 @@ static const char *getVirtualnessName(Specifier virt)
return 0;
}
static void generatePerlForMember(MemberDef *md,PerlModOutput &output,Definition *)
static void generatePerlModForMember(MemberDef *md,PerlModOutput &output,Definition *)
{
// + declaration/definition arg lists
......@@ -1184,6 +1184,7 @@ static void generatePerlForMember(MemberDef *md,PerlModOutput &output,Definition
case MemberDef::Define: memType="define"; break;
case MemberDef::EnumValue: ASSERT(0); break;
case MemberDef::Property: memType="property"; break;
case MemberDef::Event: memType="event"; break;
case MemberDef::Variable: memType="variable"; break;
case MemberDef::Typedef: memType="typedef"; break;
case MemberDef::Enumeration: memType="enum"; break;
......@@ -1202,22 +1203,23 @@ static void generatePerlForMember(MemberDef *md,PerlModOutput &output,Definition
scopeName=md->getNamespaceDef()->name();
output.openHash()
.addFieldQuoted("kind", memType)
.addFieldQuoted("name", md->name())
.addFieldQuoted("virtualness", getVirtualnessName(md->virtualness()))
.addFieldQuoted("protection", getProtectionName(md->protection()));
.addFieldQuotedString("kind", memType)
.addFieldQuotedString("name", md->name())
.addFieldQuotedString("virtualness", getVirtualnessName(md->virtualness()))
.addFieldQuotedString("protection", getProtectionName(md->protection()))
.addFieldBoolean("static", md->isStatic());
addPerlModDocBlock(output,"brief",md->getDefFileName(),md->getDefLine(),scopeName,md,md->briefDescription());
addPerlModDocBlock(output,"detailed",md->getDefFileName(),md->getDefLine(),scopeName,md,md->documentation());
if (md->memberType()!=MemberDef::Define &&
md->memberType()!=MemberDef::Enumeration)
output.addFieldQuoted("type", md->typeString());
output.addFieldQuotedString("type", md->typeString());
if (isFunc) //function
{
ArgumentList *al = md->argumentList();
output.addFieldQuoted("const", (al && al->constSpecifier) ? "yes" : "no")
.addFieldQuoted("volatile", (al && al->volatileSpecifier) ? "yes" : "no");
output.addFieldBoolean("const", al && al->constSpecifier)
.addFieldBoolean("volatile", al && al->volatileSpecifier);
output.openList("parameters");
ArgumentList *declAl = md->declArgumentList();
......@@ -1233,22 +1235,22 @@ static void generatePerlForMember(MemberDef *md,PerlModOutput &output,Definition
output.openHash();
if (!a->name.isEmpty())
output.addFieldQuoted("declaration_name", a->name);
output.addFieldQuotedString("declaration_name", a->name);
if (defArg && !defArg->name.isEmpty() && defArg->name!=a->name)
output.addFieldQuoted("definition_name", defArg->name);
output.addFieldQuotedString("definition_name", defArg->name);
if (!a->type.isEmpty())
output.addFieldQuoted("type", a->type);
output.addFieldQuotedString("type", a->type);
if (!a->array.isEmpty())
output.addFieldQuoted("array", a->array);
output.addFieldQuotedString("array", a->array);
if (!a->defval.isEmpty())
output.addFieldQuoted("default_value", a->defval);
output.addFieldQuotedString("default_value", a->defval);
if (!a->attrib.isEmpty())
output.addFieldQuoted("attributes", a->attrib);
output.addFieldQuotedString("attributes", a->attrib);
output.closeHash();
if (defArg) ++defAli;
......@@ -1265,16 +1267,16 @@ static void generatePerlForMember(MemberDef *md,PerlModOutput &output,Definition
for (ali.toFirst();(a=ali.current());++ali)
{
output.openHash()
.addFieldQuoted("name", a->type)
.addFieldQuotedString("name", a->type)
.closeHash();
}
output.closeList();
}
if (!md->initializer().isEmpty())
output.addFieldQuoted("initializer", md->initializer());
output.addFieldQuotedString("initializer", md->initializer());
if (md->excpString())
output.addFieldQuoted("exceptions", md->excpString());
output.addFieldQuotedString("exceptions", md->excpString());
if (md->memberType()==MemberDef::Enumeration) // enum
{
......@@ -1286,10 +1288,10 @@ static void generatePerlForMember(MemberDef *md,PerlModOutput &output,Definition
for (emli.toFirst();(emd=emli.current());++emli)
{
output.openHash()
.addFieldQuoted("name", emd->name());
.addFieldQuotedString("name", emd->name());
if (!emd->initializer().isEmpty())
output.addFieldQuoted("initializer", emd->initializer());
output.addFieldQuotedString("initializer", emd->initializer());
addPerlModDocBlock(output,"brief",emd->getDefFileName(),emd->getDefLine(),scopeName,emd,emd->briefDescription());
......@@ -1304,7 +1306,7 @@ static void generatePerlForMember(MemberDef *md,PerlModOutput &output,Definition
MemberDef *rmd = md->reimplements();
if (rmd)
output.openHash("reimplements")
.addFieldQuoted("name", rmd->name())
.addFieldQuotedString("name", rmd->name())
.closeHash();
MemberList *rbml = md->reimplementedBy();
......@@ -1314,7 +1316,7 @@ static void generatePerlForMember(MemberDef *md,PerlModOutput &output,Definition
output.openList("reimplemented_by");
for (mli.toFirst();(rmd=mli.current());++mli)
output.openHash()
.addFieldQuoted("name", rmd->name())
.addFieldQuotedString("name", rmd->name())
.closeHash();
output.closeList();
}
......@@ -1322,7 +1324,7 @@ static void generatePerlForMember(MemberDef *md,PerlModOutput &output,Definition
output.closeHash();
}
static void generatePerlSection(Definition *d,PerlModOutput &output,
static void generatePerlModSection(Definition *d,PerlModOutput &output,
MemberList *ml,const char *name,const char *header=0)
{
if (ml->count()==0) return; // empty list
......@@ -1330,14 +1332,14 @@ static void generatePerlSection(Definition *d,PerlModOutput &output,
output.openHash(name);
if (header)
output.addFieldQuoted("header", header);
output.addFieldQuotedString("header", header);
output.openList("members");
MemberListIterator mli(*ml);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
generatePerlForMember(md,output,d);
generatePerlModForMember(md,output,d);
}
output.closeList()
.closeHash();
......@@ -1360,21 +1362,21 @@ static void addListOfAllMembers(ClassDef *cd, PerlModOutput &output)
if (d==0) d = cd;
output.openHash()
.addFieldQuoted("name", md->name())
.addFieldQuoted("virtualness", getVirtualnessName(md->virtualness()))
.addFieldQuoted("protection", getProtectionName(mi->prot));
.addFieldQuotedString("name", md->name())
.addFieldQuotedString("virtualness", getVirtualnessName(md->virtualness()))
.addFieldQuotedString("protection", getProtectionName(mi->prot));
if (!mi->ambiguityResolutionScope.isEmpty())
output.addFieldQuoted("ambiguity_scope", mi->ambiguityResolutionScope);
output.addFieldQuotedString("ambiguity_scope", mi->ambiguityResolutionScope);
output.addFieldQuoted("scope", cd->name())
output.addFieldQuotedString("scope", cd->name())
.closeHash();
}
}
output.closeList();
}
static void generatePerlForClass(ClassDef *cd, PerlModOutput &output)
static void generatePerlModForClass(ClassDef *cd, PerlModOutput &output)
{
// + brief description
// + detailed description
......@@ -1397,7 +1399,7 @@ static void generatePerlForClass(ClassDef *cd, PerlModOutput &output)
if (cd->templateMaster()!=0) return; // skip generated template instances.
output.openHash()
.addFieldQuoted("name", cd->name());
.addFieldQuotedString("name", cd->name());
if (cd->baseClasses()->count()>0)
{
......@@ -1406,9 +1408,9 @@ static void generatePerlForClass(ClassDef *cd, PerlModOutput &output)
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
output.openHash()
.addFieldQuoted("name", bcd->classDef->displayName())
.addFieldQuoted("virtualness", getVirtualnessName(bcd->virt))
.addFieldQuoted("protection", getProtectionName(bcd->prot))
.addFieldQuotedString("name", bcd->classDef->displayName())
.addFieldQuotedString("virtualness", getVirtualnessName(bcd->virt))
.addFieldQuotedString("protection", getProtectionName(bcd->prot))
.closeHash();
output.closeList();
}
......@@ -1420,9 +1422,9 @@ static void generatePerlForClass(ClassDef *cd, PerlModOutput &output)
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
output.openHash()
.addFieldQuoted("name", bcd->classDef->displayName())
.addFieldQuoted("virtualness", getVirtualnessName(bcd->virt))
.addFieldQuoted("protection", getProtectionName(bcd->prot))
.addFieldQuotedString("name", bcd->classDef->displayName())
.addFieldQuotedString("virtualness", getVirtualnessName(bcd->virt))
.addFieldQuotedString("protection", getProtectionName(bcd->prot))
.closeHash();
output.closeList();
}
......@@ -1435,7 +1437,7 @@ static void generatePerlForClass(ClassDef *cd, PerlModOutput &output)
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
output.openHash()
.addFieldQuoted("name", cd->name())
.addFieldQuotedString("name", cd->name())
.closeHash();
output.closeList();
}
......@@ -1452,8 +1454,8 @@ static void generatePerlForClass(ClassDef *cd, PerlModOutput &output)
if (ii->fileDef && !ii->fileDef->isReference()) // TODO: support external references
t << " id=\"" << ii->fileDef->getOutputFileBase() << "\"";
#endif
output.addFieldQuoted("local", ii->local ? "yes" : "no")
.addFieldQuoted("name", nm)
output.addFieldBoolean("local", ii->local)
.addFieldQuotedString("name", nm)
.closeHash();
}
}
......@@ -1463,31 +1465,31 @@ static void generatePerlForClass(ClassDef *cd, PerlModOutput &output)
MemberGroupSDict::Iterator mgli(*cd->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
generatePerlSection(cd,output,mg->members(),"user_defined",mg->header());
generatePerlSection(cd,output,&cd->pubTypes,"public_typedefs");
generatePerlSection(cd,output,&cd->pubMethods,"public_methods");
generatePerlSection(cd,output,&cd->pubAttribs,"public_members");
generatePerlSection(cd,output,&cd->pubSlots,"public_slots");
generatePerlSection(cd,output,&cd->signals,"signals");
generatePerlSection(cd,output,&cd->dcopMethods,"dcop_methods");
generatePerlSection(cd,output,&cd->properties,"properties");
generatePerlSection(cd,output,&cd->pubStaticMethods,"public_static_methods");
generatePerlSection(cd,output,&cd->pubStaticAttribs,"public_static_members");
generatePerlSection(cd,output,&cd->proTypes,"protected_typedefs");
generatePerlSection(cd,output,&cd->proMethods,"protected_methods");
generatePerlSection(cd,output,&cd->proAttribs,"protected_members");
generatePerlSection(cd,output,&cd->proSlots,"protected_slots");
generatePerlSection(cd,output,&cd->proStaticMethods,"protected_static_methods");
generatePerlSection(cd,output,&cd->proStaticAttribs,"protected_static_members");
generatePerlSection(cd,output,&cd->priTypes,"private_typedefs");
generatePerlSection(cd,output,&cd->priMethods,"private_methods");
generatePerlSection(cd,output,&cd->priAttribs,"private_members");
generatePerlSection(cd,output,&cd->priSlots,"private_slots");
generatePerlSection(cd,output,&cd->priStaticMethods,"private_static_methods");
generatePerlSection(cd,output,&cd->priStaticAttribs,"private_static_members");
generatePerlSection(cd,output,&cd->friends,"friend_methods");
generatePerlSection(cd,output,&cd->related,"related_methods");
generatePerlModSection(cd,output,mg->members(),"user_defined",mg->header());
generatePerlModSection(cd,output,&cd->pubTypes,"public_typedefs");
generatePerlModSection(cd,output,&cd->pubMethods,"public_methods");
generatePerlModSection(cd,output,&cd->pubAttribs,"public_members");
generatePerlModSection(cd,output,&cd->pubSlots,"public_slots");
generatePerlModSection(cd,output,&cd->signals,"signals");
generatePerlModSection(cd,output,&cd->dcopMethods,"dcop_methods");
generatePerlModSection(cd,output,&cd->properties,"properties");
generatePerlModSection(cd,output,&cd->pubStaticMethods,"public_static_methods");
generatePerlModSection(cd,output,&cd->pubStaticAttribs,"public_static_members");
generatePerlModSection(cd,output,&cd->proTypes,"protected_typedefs");
generatePerlModSection(cd,output,&cd->proMethods,"protected_methods");
generatePerlModSection(cd,output,&cd->proAttribs,"protected_members");
generatePerlModSection(cd,output,&cd->proSlots,"protected_slots");
generatePerlModSection(cd,output,&cd->proStaticMethods,"protected_static_methods");
generatePerlModSection(cd,output,&cd->proStaticAttribs,"protected_static_members");
generatePerlModSection(cd,output,&cd->priTypes,"private_typedefs");
generatePerlModSection(cd,output,&cd->priMethods,"private_methods");
generatePerlModSection(cd,output,&cd->priAttribs,"private_members");
generatePerlModSection(cd,output,&cd->priSlots,"private_slots");
generatePerlModSection(cd,output,&cd->priStaticMethods,"private_static_methods");
generatePerlModSection(cd,output,&cd->priStaticAttribs,"private_static_members");
generatePerlModSection(cd,output,&cd->friends,"friend_methods");
generatePerlModSection(cd,output,&cd->related,"related_methods");
addPerlModDocBlock(output,"brief",cd->getDefFileName(),cd->getDefLine(),cd->name(),0,cd->briefDescription());
addPerlModDocBlock(output,"detailed",cd->getDefFileName(),cd->getDefLine(),cd->name(),0,cd->documentation());
......@@ -1497,14 +1499,14 @@ static void generatePerlForClass(ClassDef *cd, PerlModOutput &output)
if (!inheritanceGraph.isTrivial())
{
t << " <inheritancegraph>" << endl;
inheritanceGraph.writePerl(t);
inheritanceGraph.writePerlMod(t);
t << " </inheritancegraph>" << endl;
}
DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation);
if (!collaborationGraph.isTrivial())
{
t << " <collaborationgraph>" << endl;
collaborationGraph.writePerl(t);
collaborationGraph.writePerlMod(t);
t << " </collaborationgraph>" << endl;
}
t << " <location file=\""
......@@ -1521,7 +1523,7 @@ static void generatePerlForClass(ClassDef *cd, PerlModOutput &output)
output.closeHash();
}
static void generatePerlForNamespace(NamespaceDef *nd, PerlModOutput &output)
static void generatePerlModForNamespace(NamespaceDef *nd, PerlModOutput &output)
{
// + contained class definitions
// + contained namespace definitions
......@@ -1535,7 +1537,7 @@ static void generatePerlForNamespace(NamespaceDef *nd, PerlModOutput &output)
if (nd->isReference()) return; // skip external references
output.openHash()
.addFieldQuoted("name", nd->name());
.addFieldQuotedString("name", nd->name());
ClassSDict *cl = nd->classSDict;
if (cl)
......@@ -1545,7 +1547,7 @@ static void generatePerlForNamespace(NamespaceDef *nd, PerlModOutput &output)
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
output.openHash()
.addFieldQuoted("name", cd->name())
.addFieldQuotedString("name", cd->name())
.closeHash();
output.closeList();
}
......@@ -1558,7 +1560,7 @@ static void generatePerlForNamespace(NamespaceDef *nd, PerlModOutput &output)
NamespaceDef *nd;
for (nli.toFirst();(nd=nli.current());++nli)
output.openHash()
.addFieldQuoted("name", nd->name())
.addFieldQuotedString("name", nd->name())
.closeHash();
output.closeList();
}
......@@ -1566,14 +1568,14 @@ static void generatePerlForNamespace(NamespaceDef *nd, PerlModOutput &output)
MemberGroupSDict::Iterator mgli(*nd->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
generatePerlSection(nd,output,mg->members(),"user-defined",mg->header());
generatePerlModSection(nd,output,mg->members(),"user-defined",mg->header());
generatePerlSection(nd,output,&nd->decDefineMembers,"defines");
generatePerlSection(nd,output,&nd->decProtoMembers,"prototypes");
generatePerlSection(nd,output,&nd->decTypedefMembers,"typedefs");
generatePerlSection(nd,output,&nd->decEnumMembers,"enums");
generatePerlSection(nd,output,&nd->decFuncMembers,"functions");
generatePerlSection(nd,output,&nd->decVarMembers,"variables");
generatePerlModSection(nd,output,&nd->decDefineMembers,"defines");
generatePerlModSection(nd,output,&nd->decProtoMembers,"prototypes");
generatePerlModSection(nd,output,&nd->decTypedefMembers,"typedefs");
generatePerlModSection(nd,output,&nd->decEnumMembers,"enums");
generatePerlModSection(nd,output,&nd->decFuncMembers,"functions");
generatePerlModSection(nd,output,&nd->decVarMembers,"variables");
addPerlModDocBlock(output,"brief",nd->getDefFileName(),nd->getDefLine(),0,0,nd->briefDescription());
addPerlModDocBlock(output,"detailed",nd->getDefFileName(),nd->getDefLine(),0,0,nd->documentation());
......@@ -1581,7 +1583,7 @@ static void generatePerlForNamespace(NamespaceDef *nd, PerlModOutput &output)
output.closeHash();
}
static void generatePerlForFile(FileDef *fd, PerlModOutput &output)
static void generatePerlModForFile(FileDef *fd, PerlModOutput &output)
{
// + includes files
// + includedby files
......@@ -1600,7 +1602,7 @@ static void generatePerlForFile(FileDef *fd, PerlModOutput &output)
if (fd->isReference()) return;
output.openHash()
.addFieldQuoted("name", fd->name());
.addFieldQuotedString("name", fd->name());
QListIterator<IncludeInfo> ili1(*fd->includeFileList());
IncludeInfo *inc;
......@@ -1608,10 +1610,10 @@ static void generatePerlForFile(FileDef *fd, PerlModOutput &output)
for (ili1.toFirst();(inc=ili1.current());++ili1)
{
output.openHash()
.addFieldQuoted("name", inc->includeName);
.addFieldQuotedString("name", inc->includeName);
if (inc->fileDef && !inc->fileDef->isReference())
{
output.addFieldQuoted("ref", inc->fileDef->getOutputFileBase());
output.addFieldQuotedString("ref", inc->fileDef->getOutputFileBase());
}
output.closeHash();
}
......@@ -1622,21 +1624,21 @@ static void generatePerlForFile(FileDef *fd, PerlModOutput &output)
for (ili2.toFirst();(inc=ili2.current());++ili2)
{
output.openHash()
.addFieldQuoted("name => ", inc->includeName);
.addFieldQuotedString("name => ", inc->includeName);
if (inc->fileDef && !inc->fileDef->isReference())
{
output.addFieldQuoted("ref", inc->fileDef->getOutputFileBase());
output.addFieldQuotedString("ref", inc->fileDef->getOutputFileBase());
}
output.closeHash();
}
output.closeList();
generatePerlSection(fd,output,&fd->decDefineMembers,"defines");
generatePerlSection(fd,output,&fd->decProtoMembers,"prototypes");
generatePerlSection(fd,output,&fd->decTypedefMembers,"typedefs");
generatePerlSection(fd,output,&fd->decEnumMembers,"enums");
generatePerlSection(fd,output,&fd->decFuncMembers,"functions");
generatePerlSection(fd,output,&fd->decVarMembers,"variables");
generatePerlModSection(fd,output,&fd->decDefineMembers,"defines");
generatePerlModSection(fd,output,&fd->decProtoMembers,"prototypes");
generatePerlModSection(fd,output,&fd->decTypedefMembers,"typedefs");
generatePerlModSection(fd,output,&fd->decEnumMembers,"enums");
generatePerlModSection(fd,output,&fd->decFuncMembers,"functions");
generatePerlModSection(fd,output,&fd->decVarMembers,"variables");
addPerlModDocBlock(output,"brief",fd->getDefFileName(),fd->getDefLine(),0,0,fd->briefDescription());
addPerlModDocBlock(output,"detailed",fd->getDefFileName(),fd->getDefLine(),0,0,fd->documentation());
......@@ -1644,7 +1646,7 @@ static void generatePerlForFile(FileDef *fd, PerlModOutput &output)
output.closeHash();
}
static void generatePerlForGroup(GroupDef *gd, PerlModOutput &output)
static void generatePerlModForGroup(GroupDef *gd, PerlModOutput &output)
{
// + members
// + member groups
......@@ -1661,8 +1663,8 @@ static void generatePerlForGroup(GroupDef *gd, PerlModOutput &output)
if (gd->isReference()) return; // skip external references
output.openHash()
.addFieldQuoted("name", gd->name())
.addFieldQuoted("title", gd->groupTitle());
.addFieldQuotedString("name", gd->name())
.addFieldQuotedString("title", gd->groupTitle());
FileList *fl = gd->getFiles();
if (fl)
......@@ -1672,7 +1674,7 @@ static void generatePerlForGroup(GroupDef *gd, PerlModOutput &output)
FileDef *fd = fl->first();
for (fli.toFirst();(fd=fli.current());++fli)
output.openHash()
.addFieldQuoted("name", fd->name())
.addFieldQuotedString("name", fd->name())
.closeHash();
output.closeList();
}
......@@ -1685,7 +1687,7 @@ static void generatePerlForGroup(GroupDef *gd, PerlModOutput &output)
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
output.openHash()
.addFieldQuoted("name", cd->name())
.addFieldQuotedString("name", cd->name())
.closeHash();
output.closeList();
}
......@@ -1698,7 +1700,7 @@ static void generatePerlForGroup(GroupDef *gd, PerlModOutput &output)
NamespaceDef *nd;
for (nli.toFirst();(nd=nli.current());++nli)
output.openHash()
.addFieldQuoted("name", nd->name())
.addFieldQuotedString("name", nd->name())
.closeHash();
output.closeList();
}
......@@ -1711,7 +1713,7 @@ static void generatePerlForGroup(GroupDef *gd, PerlModOutput &output)
PageInfo *pi;
for (pli.toFirst();(pi=pli.current());++pli)
output.openHash()
.addFieldQuoted("title", pi->title)
.addFieldQuotedString("title", pi->title)
.closeHash();
output.closeList();
}
......@@ -1724,7 +1726,7 @@ static void generatePerlForGroup(GroupDef *gd, PerlModOutput &output)
GroupDef *sgd;
for (gli.toFirst();(sgd=gli.current());++gli)
output.openHash()
.addFieldQuoted("title", gd->groupTitle())
.addFieldQuotedString("title", gd->groupTitle())
.closeHash();
output.closeList();
}
......@@ -1732,14 +1734,14 @@ static void generatePerlForGroup(GroupDef *gd, PerlModOutput &output)
MemberGroupSDict::Iterator mgli(*gd->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
generatePerlSection(gd,output,mg->members(),"user-defined",mg->header());
generatePerlModSection(gd,output,mg->members(),"user-defined",mg->header());
generatePerlSection(gd,output,&gd->decDefineMembers,"defines");
generatePerlSection(gd,output,&gd->decProtoMembers,"prototypes");
generatePerlSection(gd,output,&gd->decTypedefMembers,"typedefs");
generatePerlSection(gd,output,&gd->decEnumMembers,"enums");
generatePerlSection(gd,output,&gd->decFuncMembers,"functions");
generatePerlSection(gd,output,&gd->decVarMembers,"variables");
generatePerlModSection(gd,output,&gd->decDefineMembers,"defines");
generatePerlModSection(gd,output,&gd->decProtoMembers,"prototypes");
generatePerlModSection(gd,output,&gd->decTypedefMembers,"typedefs");
generatePerlModSection(gd,output,&gd->decEnumMembers,"enums");
generatePerlModSection(gd,output,&gd->decFuncMembers,"functions");
generatePerlModSection(gd,output,&gd->decVarMembers,"variables");
addPerlModDocBlock(output,"brief",gd->getDefFileName(),gd->getDefLine(),0,0,gd->briefDescription());
addPerlModDocBlock(output,"detailed",gd->getDefFileName(),gd->getDefLine(),0,0,gd->documentation());
......@@ -1747,7 +1749,7 @@ static void generatePerlForGroup(GroupDef *gd, PerlModOutput &output)
output.closeHash();
}
static void generatePerlForPage(PageInfo *pi, PerlModOutput &output)
static void generatePerlModForPage(PageInfo *pi, PerlModOutput &output)
{
// + name
// + title
......@@ -1756,11 +1758,11 @@ static void generatePerlForPage(PageInfo *pi, PerlModOutput &output)
if (pi->isReference()) return;
output.openHash()
.addFieldQuoted("name", pi->name);
.addFieldQuotedString("name", pi->name);
SectionInfo *si = Doxygen::sectionDict.find(pi->name);
if (si)
output.addFieldQuoted("title", si->title);
output.addFieldQuotedString("title", si->title);
addPerlModDocBlock(output,"detailed",pi->defFileName,pi->defLine,0,0,pi->doc);
}
......@@ -1813,7 +1815,14 @@ void generatePerlMod()
}
}
QCString fileName=outputDirectory+"/DoxyDocs.pm";
QDir perlmodDir(outputDirectory+"/perlmod");
if (!perlmodDir.exists() && !perlmodDir.mkdir(outputDirectory+"/perlmod"))
{
err("Could not create perlmod directory in %s\n",outputDirectory.data());
return;
}
QCString fileName=outputDirectory+"/perlmod/DoxyDocs.pm";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
{
......@@ -1830,14 +1839,14 @@ void generatePerlMod()
ClassSDict::Iterator cli(Doxygen::classSDict);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
generatePerlForClass(cd,output);
generatePerlModForClass(cd,output);
output.closeList();
output.openList("namespaces");
NamespaceSDict::Iterator nli(Doxygen::namespaceSDict);
NamespaceDef *nd;
for (nli.toFirst();(nd=nli.current());++nli)
generatePerlForNamespace(nd,output);
generatePerlModForNamespace(nd,output);
output.closeList();
output.openList("files");
......@@ -1848,7 +1857,7 @@ void generatePerlMod()
FileNameIterator fni(*fn);
FileDef *fd;
for (;(fd=fni.current());++fni)
generatePerlForFile(fd,output);
generatePerlModForFile(fd,output);
}
output.closeList();
......@@ -1856,16 +1865,16 @@ void generatePerlMod()
GroupSDict::Iterator gli(Doxygen::groupSDict);
GroupDef *gd;
for (;(gd=gli.current());++gli)
generatePerlForGroup(gd,output);
generatePerlModForGroup(gd,output);
output.closeList();
output.openList("pages");
PageSDict::Iterator pdi(*Doxygen::pageSDict);
PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi)
generatePerlForPage(pi,output);
generatePerlModForPage(pi,output);
if (Doxygen::mainPage)
generatePerlForPage(Doxygen::mainPage,output);
generatePerlModForPage(Doxygen::mainPage,output);
output.closeList();
output.closeHash().add(";\n1;\n");
......
......@@ -2049,7 +2049,7 @@ void preprocessFile(const char *fileName,BufStr &output)
}
else
{
QCString cmd = inputFilter+" "+fileName;
QCString cmd = inputFilter+" \""+fileName+"\"";
preYYin = popen(cmd,"r");
if (!preYYin)
{
......
......@@ -910,7 +910,7 @@ void RTFDocVisitor::visitPre(DocParamList *pl)
for (li.toFirst();(s=li.current());++li)
{
if (!first) m_t << ","; else first=FALSE;
m_t << s;
filter(s);
}
m_t << "} ";
}
......
......@@ -882,25 +882,25 @@ void RTFGenerator::endItemList()
m_omitParagraph = TRUE;
}
/*! start enumeration list */
void RTFGenerator::startEnumList() // starts an enumeration list
{
DBG_RTF(t << "{\\comment (startEnumList)}" << endl)
t << "{" << endl;
incrementIndentLevel();
rtf_listItemInfo[m_listLevel].isEnum = TRUE;
rtf_listItemInfo[m_listLevel].number = 1;
}
/*! end enumeration list */
void RTFGenerator::endEnumList()
{
newParagraph();
DBG_RTF(t << "{\\comment (endEnumList)}" << endl)
t << "}";
decrementIndentLevel();
m_omitParagraph = TRUE;
}
///*! start enumeration list */
//void RTFGenerator::startEnumList() // starts an enumeration list
//{
// DBG_RTF(t << "{\\comment (startEnumList)}" << endl)
// t << "{" << endl;
// incrementIndentLevel();
// rtf_listItemInfo[m_listLevel].isEnum = TRUE;
// rtf_listItemInfo[m_listLevel].number = 1;
//}
//
///*! end enumeration list */
//void RTFGenerator::endEnumList()
//{
// newParagraph();
// DBG_RTF(t << "{\\comment (endEnumList)}" << endl)
// t << "}";
// decrementIndentLevel();
// m_omitParagraph = TRUE;
//}
/*! write bullet or enum item */
void RTFGenerator::writeListItem()
......@@ -976,12 +976,12 @@ void RTFGenerator::endHtmlLink()
}
}
void RTFGenerator::writeMailLink(const char *url)
{
startTypewriter();
docify(url);
endTypewriter();
}
//void RTFGenerator::writeMailLink(const char *url)
//{
// startTypewriter();
// docify(url);
// endTypewriter();
//}
void RTFGenerator::writeStartAnnoItem(const char *,const char *f,
const char *path,const char *name)
......@@ -1096,73 +1096,73 @@ void RTFGenerator::endSubsubsection()
// t << "}";
//}
void RTFGenerator::startTable(bool,int colNumbers)
{
DBG_RTF(t << "{\\comment startTable}\n";)
m_numCols=colNumbers;
t << "\\par\n";
}
void RTFGenerator::endTable(bool hasCaption)
{
DBG_RTF(t << "{\\comment endTable}\n";)
if (!hasCaption)
t << "\n\\pard \\widctlpar\\intbl\\adjustright\n{\\row }\n";
t << "\\pard\n" << endl;
}
void RTFGenerator::startCaption()
{
DBG_RTF(t << "{\\comment startCaption}\n";)
endTableRow();
t << "\\trowd \\trgaph108\\trleft-108\\trbrdrt\\brdrs\\brdrw10 \\trbrdrl\\brdrs\\brdrw10 \\trbrdrb\\brdrs\\brdrw10 \\trbrdrr\\brdrs\\brdrw10 \\trbrdrh\\brdrs\\brdrw10 \\trbrdrv\\brdrs\\brdrw10" << endl;
t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10 \\clbrdrl\\brdrs\\brdrw10 \\clbrdrb\\brdrs\\brdrw10 \\clbrdrr \\brdrs\\brdrw10 \\cltxlrtb \\cellx"<<rtf_pageWidth<<"\\pard \\qc\\nowidctlpar\\widctlpar\\intbl\\adjustright " << endl;
nextTableColumn();
}
void RTFGenerator::endCaption()
{
DBG_RTF(t << "{\\comment endCaption}\n";)
endTableColumn();
endTableRow();
}
void RTFGenerator::nextTableRow()
{
DBG_RTF(t << "{\\comment nextTableRow}\n";)
ASSERT(m_numCols>0 && m_numCols<25);
uint columnWidth=rtf_pageWidth/m_numCols;
t << "\\trowd \\trgaph108\\trleft-108\\trbrdrt\\brdrs\\brdrw10 "
"\\trbrdrl\\brdrs\\brdrw10 \\trbrdrb\\brdrs\\brdrw10 "
"\\trbrdrr\\brdrs\\brdrw10 \\trbrdrh\\brdrs\\brdrw10 "
"\\trbrdrv\\brdrs\\brdrw10 "<<endl;
for (int i=0;i<m_numCols;i++)
{
t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10 \\clbrdrl\\brdrs\\brdrw10 "
"\\clbrdrb\\brdrs\\brdrw10 \\clbrdrr \\brdrs\\brdrw10 \\cltxlrtb "
"\\cellx" << (i*columnWidth) << endl;
}
t << "\\pard \\widctlpar\\intbl\\adjustright\n{";
}
void RTFGenerator::endTableRow()
{
DBG_RTF(t << "{\\comment endTableRow}\n";)
t << "\n\\pard \\widctlpar\\intbl\\adjustright\n{\\row }\n";
}
void RTFGenerator::nextTableColumn()
{
DBG_RTF(t << "{\\comment nextTableColumn}\n";)
t << "{ ";
}
void RTFGenerator::endTableColumn()
{
DBG_RTF(t << "{\\comment endTableColumn}\n";)
t << " \\cell }";
}
//void RTFGenerator::startTable(bool,int colNumbers)
//{
// DBG_RTF(t << "{\\comment startTable}\n";)
// m_numCols=colNumbers;
// t << "\\par\n";
//}
//
//void RTFGenerator::endTable(bool hasCaption)
//{
// DBG_RTF(t << "{\\comment endTable}\n";)
// if (!hasCaption)
// t << "\n\\pard \\widctlpar\\intbl\\adjustright\n{\\row }\n";
// t << "\\pard\n" << endl;
//}
//
//void RTFGenerator::startCaption()
//{
// DBG_RTF(t << "{\\comment startCaption}\n";)
// endTableRow();
// t << "\\trowd \\trgaph108\\trleft-108\\trbrdrt\\brdrs\\brdrw10 \\trbrdrl\\brdrs\\brdrw10 \\trbrdrb\\brdrs\\brdrw10 \\trbrdrr\\brdrs\\brdrw10 \\trbrdrh\\brdrs\\brdrw10 \\trbrdrv\\brdrs\\brdrw10" << endl;
// t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10 \\clbrdrl\\brdrs\\brdrw10 \\clbrdrb\\brdrs\\brdrw10 \\clbrdrr \\brdrs\\brdrw10 \\cltxlrtb \\cellx"<<rtf_pageWidth<<"\\pard \\qc\\nowidctlpar\\widctlpar\\intbl\\adjustright " << endl;
// nextTableColumn();
//}
//
//void RTFGenerator::endCaption()
//{
// DBG_RTF(t << "{\\comment endCaption}\n";)
// endTableColumn();
// endTableRow();
//}
//
//void RTFGenerator::nextTableRow()
//{
// DBG_RTF(t << "{\\comment nextTableRow}\n";)
// ASSERT(m_numCols>0 && m_numCols<25);
// uint columnWidth=rtf_pageWidth/m_numCols;
// t << "\\trowd \\trgaph108\\trleft-108\\trbrdrt\\brdrs\\brdrw10 "
// "\\trbrdrl\\brdrs\\brdrw10 \\trbrdrb\\brdrs\\brdrw10 "
// "\\trbrdrr\\brdrs\\brdrw10 \\trbrdrh\\brdrs\\brdrw10 "
// "\\trbrdrv\\brdrs\\brdrw10 "<<endl;
// for (int i=0;i<m_numCols;i++)
// {
// t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10 \\clbrdrl\\brdrs\\brdrw10 "
// "\\clbrdrb\\brdrs\\brdrw10 \\clbrdrr \\brdrs\\brdrw10 \\cltxlrtb "
// "\\cellx" << (i*columnWidth) << endl;
// }
// t << "\\pard \\widctlpar\\intbl\\adjustright\n{";
//}
//
//void RTFGenerator::endTableRow()
//{
// DBG_RTF(t << "{\\comment endTableRow}\n";)
// t << "\n\\pard \\widctlpar\\intbl\\adjustright\n{\\row }\n";
//}
//
//void RTFGenerator::nextTableColumn()
//{
// DBG_RTF(t << "{\\comment nextTableColumn}\n";)
// t << "{ ";
//}
//
//void RTFGenerator::endTableColumn()
//{
// DBG_RTF(t << "{\\comment endTableColumn}\n";)
// t << " \\cell }";
//}
//
void RTFGenerator::startTextLink(const char *f,const char *anchor)
{
if (Config_getBool("RTF_HYPERLINKS"))
......@@ -1490,29 +1490,29 @@ void RTFGenerator::startDescList(SectionTypes)
newParagraph();
}
void RTFGenerator::endDescTitle()
{
DBG_RTF(t << "{\\comment (endDescTitle) }" << endl)
endBold();
t << "}";
newParagraph();
incrementIndentLevel();
t << rtf_Style_Reset << rtf_DList_DepthStyle();
}
//void RTFGenerator::endDescTitle()
//{
// DBG_RTF(t << "{\\comment (endDescTitle) }" << endl)
// endBold();
// t << "}";
// newParagraph();
// incrementIndentLevel();
// t << rtf_Style_Reset << rtf_DList_DepthStyle();
//}
void RTFGenerator::writeDescItem()
{
DBG_RTF(t << "{\\comment (writeDescItem) }" << endl)
}
void RTFGenerator::endDescList()
{
DBG_RTF(t << "{\\comment (endDescList)}" << endl)
newParagraph();
decrementIndentLevel();
m_omitParagraph = TRUE;
t << "}";
}
//void RTFGenerator::endDescList()
//{
// DBG_RTF(t << "{\\comment (endDescList)}" << endl)
// newParagraph();
// decrementIndentLevel();
// m_omitParagraph = TRUE;
// t << "}";
//}
void RTFGenerator::startSection(const char *,const char *title,SectionInfo::SectionType type)
......@@ -1549,34 +1549,34 @@ void RTFGenerator::endSection(const char *lab,SectionInfo::SectionType)
t << "}";
}
void RTFGenerator::writeSectionRef(const char *ref,const char *,
const char *lab,const char *title)
{
if (ref)
{
docify(title);
}
else
{
startBold();
docify(title);
endBold();
t << " (";
docify(theTranslator->trPageAbbreviation());
writeRTFReference(lab);
t << ")" << endl;
}
}
void RTFGenerator::writeSectionRefItem(const char *,const char *lab,
const char *title)
{
docify(title);
t << "\\tab";
writeRTFReference(lab);
t << endl;
}
//void RTFGenerator::writeSectionRef(const char *ref,const char *,
// const char *lab,const char *title)
//{
// if (ref)
// {
// docify(title);
// }
// else
// {
// startBold();
// docify(title);
// endBold();
// t << " (";
// docify(theTranslator->trPageAbbreviation());
// writeRTFReference(lab);
// t << ")" << endl;
// }
//}
//
//void RTFGenerator::writeSectionRefItem(const char *,const char *lab,
// const char *title)
//{
// docify(title);
// t << "\\tab";
// writeRTFReference(lab);
// t << endl;
//}
//
//void RTFGenerator::writeSectionRefAnchor(const char *name,const char *lab,
// const char *title)
//{
......@@ -1711,10 +1711,10 @@ void RTFGenerator::endClassDiagram(ClassDiagram &d,
t << "}" << endl;
}
void RTFGenerator::writeFormula(const char *,const char *text)
{
t << text;
}
//void RTFGenerator::writeFormula(const char *,const char *text)
//{
// t << text;
//}
void RTFGenerator::startMemberItem(int)
{
......@@ -1802,46 +1802,46 @@ void RTFGenerator::endMemberList()
#endif
}
void RTFGenerator::startImage(const char *name,const char *,bool)
{
newParagraph();
t << "{" << endl;
t << rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
t << name;
t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl;
}
void RTFGenerator::endImage(bool)
{
// not yet implemented
}
void RTFGenerator::startDotFile(const char *name,bool)
{
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("RTF_OUTPUT");
writeDotGraphFromFile(name,outDir,baseName,BITMAP);
newParagraph();
t << "{" << endl;
t << rtf_Style_Reset << endl;
t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
t << outDir << "\\" << baseName;
t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl;
}
void RTFGenerator::endDotFile(bool)
{
// not yet implemented
}
//void RTFGenerator::startImage(const char *name,const char *,bool)
//{
// newParagraph();
// t << "{" << endl;
// t << rtf_Style_Reset << endl;
// t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
// t << name;
// t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
// t << "}" << endl;
//}
//
//void RTFGenerator::endImage(bool)
//{
// // not yet implemented
//}
//
//void RTFGenerator::startDotFile(const char *name,bool)
//{
// 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("RTF_OUTPUT");
// writeDotGraphFromFile(name,outDir,baseName,BITMAP);
// newParagraph();
// t << "{" << endl;
// t << rtf_Style_Reset << endl;
// t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
// t << outDir << "\\" << baseName;
// t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
// t << "}" << endl;
//}
//
//void RTFGenerator::endDotFile(bool)
//{
// // not yet implemented
//}
//
void RTFGenerator::startDescTable()
{
DBG_RTF(t << "{\\comment (startDescTable) }" << endl)
......@@ -1993,116 +1993,116 @@ void RTFGenerator::endMemberSubtitle()
t << "}" << endl;
}
void RTFGenerator::writeUmlaut(char c)
{
switch(c)
{
case 'A' : t << '\304'; break;
case 'E' : t << '\313'; break;
case 'I' : t << '\317'; break;
case 'O' : t << '\326'; break;
case 'U' : t << '\334'; break;
case 'Y' : t << 'Y'; break;
case 'a' : t << '\344'; break;
case 'e' : t << '\353'; break;
case 'i' : t << '\357'; break;
case 'o' : t << '\366'; break;
case 'u' : t << '\374'; break;
case 'y' : t << '\377'; break;
default: t << '?'; break;
}
}
void RTFGenerator::writeAcute(char c)
{
switch(c)
{
case 'A' : t << '\301'; break;
case 'E' : t << '\311'; break;
case 'I' : t << '\315'; break;
case 'O' : t << '\323'; break;
case 'U' : t << '\332'; break;
case 'Y' : t << '\335'; break;
case 'a' : t << '\341'; break;
case 'e' : t << '\351'; break;
case 'i' : t << '\355'; break;
case 'o' : t << '\363'; break;
case 'u' : t << '\372'; break;
case 'y' : t << '\375'; break;
default: t << '?'; break;
}
}
void RTFGenerator::writeGrave(char c)
{
switch(c)
{
case 'A' : t << '\300'; break;
case 'E' : t << '\310'; break;
case 'I' : t << '\314'; break;
case 'O' : t << '\322'; break;
case 'U' : t << '\331'; break;
case 'a' : t << '\340'; break;
case 'e' : t << '\350'; break;
case 'i' : t << '\354'; break;
case 'o' : t << '\362'; break;
case 'u' : t << '\371'; break;
default: t << '?'; break;
}
}
void RTFGenerator::writeCirc(char c)
{
switch(c)
{
case 'A' : t << '\302'; break;
case 'E' : t << '\312'; break;
case 'I' : t << '\316'; break;
case 'O' : t << '\324'; break;
case 'U' : t << '\333'; break;
case 'a' : t << '\342'; break;
case 'e' : t << '\352'; break;
case 'i' : t << '\356'; break;
case 'o' : t << '\364'; break;
case 'u' : t << '\373'; break;
default: t << '?'; break;
}
}
void RTFGenerator::writeTilde(char c)
{
switch(c)
{
case 'A' : t << '\303'; break;
case 'N' : t << '\321'; break;
case 'O' : t << '\325'; break;
case 'a' : t << '\343'; break;
case 'n' : t << '\361'; break;
case 'o' : t << '\365'; break;
default: t << '?'; break;
}
}
void RTFGenerator::writeRing(char c)
{
switch(c)
{
case 'A' : t << '\305'; break;
case 'a' : t << '\345'; break;
default: t << '?'; break;
}
}
void RTFGenerator::writeCCedil(char c)
{
switch(c)
{
case 'C' : t << '\307'; break;
case 'c' : t << '\347'; break;
default: t << '?'; break;
}
}
//void RTFGenerator::writeUmlaut(char c)
//{
// switch(c)
// {
// case 'A' : t << '\304'; break;
// case 'E' : t << '\313'; break;
// case 'I' : t << '\317'; break;
// case 'O' : t << '\326'; break;
// case 'U' : t << '\334'; break;
// case 'Y' : t << 'Y'; break;
// case 'a' : t << '\344'; break;
// case 'e' : t << '\353'; break;
// case 'i' : t << '\357'; break;
// case 'o' : t << '\366'; break;
// case 'u' : t << '\374'; break;
// case 'y' : t << '\377'; break;
// default: t << '?'; break;
// }
//}
//
//void RTFGenerator::writeAcute(char c)
//{
// switch(c)
// {
// case 'A' : t << '\301'; break;
// case 'E' : t << '\311'; break;
// case 'I' : t << '\315'; break;
// case 'O' : t << '\323'; break;
// case 'U' : t << '\332'; break;
// case 'Y' : t << '\335'; break;
// case 'a' : t << '\341'; break;
// case 'e' : t << '\351'; break;
// case 'i' : t << '\355'; break;
// case 'o' : t << '\363'; break;
// case 'u' : t << '\372'; break;
// case 'y' : t << '\375'; break;
// default: t << '?'; break;
// }
//}
//
//void RTFGenerator::writeGrave(char c)
//{
// switch(c)
// {
// case 'A' : t << '\300'; break;
// case 'E' : t << '\310'; break;
// case 'I' : t << '\314'; break;
// case 'O' : t << '\322'; break;
// case 'U' : t << '\331'; break;
// case 'a' : t << '\340'; break;
// case 'e' : t << '\350'; break;
// case 'i' : t << '\354'; break;
// case 'o' : t << '\362'; break;
// case 'u' : t << '\371'; break;
// default: t << '?'; break;
// }
//}
//
//void RTFGenerator::writeCirc(char c)
//{
// switch(c)
// {
// case 'A' : t << '\302'; break;
// case 'E' : t << '\312'; break;
// case 'I' : t << '\316'; break;
// case 'O' : t << '\324'; break;
// case 'U' : t << '\333'; break;
// case 'a' : t << '\342'; break;
// case 'e' : t << '\352'; break;
// case 'i' : t << '\356'; break;
// case 'o' : t << '\364'; break;
// case 'u' : t << '\373'; break;
// default: t << '?'; break;
// }
//}
//
//void RTFGenerator::writeTilde(char c)
//{
// switch(c)
// {
// case 'A' : t << '\303'; break;
// case 'N' : t << '\321'; break;
// case 'O' : t << '\325'; break;
// case 'a' : t << '\343'; break;
// case 'n' : t << '\361'; break;
// case 'o' : t << '\365'; break;
// default: t << '?'; break;
// }
//}
//
//void RTFGenerator::writeRing(char c)
//{
// switch(c)
// {
// case 'A' : t << '\305'; break;
// case 'a' : t << '\345'; break;
// default: t << '?'; break;
// }
//}
//
//void RTFGenerator::writeCCedil(char c)
//{
// switch(c)
// {
// case 'C' : t << '\307'; break;
// case 'c' : t << '\347'; break;
// default: t << '?'; break;
// }
//}
//
/**
* VERY brittle routine inline RTF's included by other RTF's.
* it is recursive and ugly.
......
......@@ -72,11 +72,11 @@ class RTFGenerator : public OutputGenerator
void endIndexValue(const char *,bool);
void startItemList();
void endItemList();
void startEnumList();
void endEnumList();
void startAlphabeticalIndexList() {}
void endAlphabeticalIndexList() {}
void writeIndexHeading(const char *) {}
//void startEnumList();
//void endEnumList();
//void startAlphabeticalIndexList() {}
//void endAlphabeticalIndexList() {}
//void writeIndexHeading(const char *) {}
void writeIndexItem(const char *ref,const char *file,const char *name);
void docify(const char *text);
void codify(const char *text);
......@@ -88,7 +88,7 @@ class RTFGenerator : public OutputGenerator
void endTextLink();
void startHtmlLink(const char *url);
void endHtmlLink();
void writeMailLink(const char *url);
//void writeMailLink(const char *url);
void startTypewriter() { t << "{\\f2 "; }
void endTypewriter() { t << "}"; }
void startGroupHeader();
......@@ -114,10 +114,10 @@ class RTFGenerator : public OutputGenerator
void writeAnchor(const char *fileName,const char *name);
void startCodeFragment();
void endCodeFragment();
void startPreFragment() { startCodeFragment(); }
void endPreFragment() { endCodeFragment(); }
void startVerbatimFragment() { startCodeFragment(); }
void endVerbatimFragment() { endCodeFragment(); }
//void startPreFragment() { startCodeFragment(); }
//void endPreFragment() { endCodeFragment(); }
//void startVerbatimFragment() { startCodeFragment(); }
//void endVerbatimFragment() { endCodeFragment(); }
void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; }
void startCodeLine() { col=0; }
void endCodeLine() { lineBreak(); }
......@@ -152,43 +152,43 @@ class RTFGenerator : public OutputGenerator
void endCenter() { t << "}"; }
void startSmall() { t << "{\\sub "; }
void endSmall() { t << "}"; }
void startSubscript() { t << "{\\sub " << endl;}
void endSubscript() { t << "}"; }
void startSuperscript() { t << "{\\super " << endl;}
void endSuperscript() { t << "}"; }
void startTable(bool,int);
void endTable(bool);
void startCaption();
void endCaption();
void nextTableRow();
void endTableRow();
void nextTableColumn();
void endTableColumn();
void writeCopyright() { t << "\251"; }
void writeQuote() { t << "\""; }
void writeUmlaut(char c);
void writeAcute(char c);
void writeGrave(char c);
void writeCirc(char c);
void writeTilde(char c);
void writeRing(char c);
void writeSharpS() { t << "\337"; }
void writeCCedil(char c);
//void startSubscript() { t << "{\\sub " << endl;}
//void endSubscript() { t << "}"; }
//void startSuperscript() { t << "{\\super " << endl;}
//void endSuperscript() { t << "}"; }
//void startTable(bool,int);
//void endTable(bool);
//void startCaption();
//void endCaption();
//void nextTableRow();
//void endTableRow();
//void nextTableColumn();
//void endTableColumn();
//void writeCopyright() { t << "\251"; }
//void writeQuote() { t << "\""; }
//void writeUmlaut(char c);
//void writeAcute(char c);
//void writeGrave(char c);
//void writeCirc(char c);
//void writeTilde(char c);
//void writeRing(char c);
//void writeSharpS() { t << "\337"; }
//void writeCCedil(char c);
void startMemberDescription();
void endMemberDescription();
void startDescList(SectionTypes);
void endDescList();
//void endDescList();
void startSimpleSect(SectionTypes,const char *,const char *,const char *);
void endSimpleSect();
void startParamList(ParamListTypes,const char *);
void endParamList();
void endDescTitle();
//void endDescTitle();
void writeDescItem();
void startSection(const char *,const char *,SectionInfo::SectionType);
void endSection(const char *,SectionInfo::SectionType);
void writeSectionRef(const char *,const char *,const char *,const char *);
void writeSectionRefItem(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 writeSectionRefAnchor(const char *,const char *,const char *);
void addIndexItem(const char *,const char *);
void startIndent();
......@@ -203,12 +203,12 @@ class RTFGenerator : public OutputGenerator
void endPageRef(const char *,const char *);
void startQuickIndexItem(const char *,const char *) {}
void endQuickIndexItem() {}
void writeFormula(const char *,const char *);
//void writeFormula(const char *,const char *);
void writeNonBreakableSpace(int);
void startImage(const char *,const char *,bool);
void endImage(bool);
void startDotFile(const char *,bool);
void endDotFile(bool);
//void startImage(const char *,const char *,bool);
//void endImage(bool);
//void startDotFile(const char *,bool);
//void endDotFile(bool);
void startDescTable();
void endDescTable();
......@@ -248,13 +248,13 @@ class RTFGenerator : public OutputGenerator
void startFontClass(const char *) {}
void endFontClass() {}
void startHtmlOnly() {}
void endHtmlOnly() {}
void startLatexOnly() {}
void endLatexOnly() {}
//void startHtmlOnly() {}
//void endHtmlOnly() {}
//void startLatexOnly() {}
//void endLatexOnly() {}
void startSectionRefList() {}
void endSectionRefList() {}
//void startSectionRefList() {}
//void endSectionRefList() {}
void writeCodeAnchor(const char *) {}
......
......@@ -122,6 +122,7 @@ static QCString formulaText;
static bool useOverrideCommands = FALSE;
static bool insideIDL = FALSE;
static bool insideJava = FALSE;
static bool insideCS = FALSE;
static bool insidePHP = FALSE;
static bool insidePHPCode = FALSE;
static bool insideCppQuote = FALSE;
......@@ -391,6 +392,7 @@ static void setContext()
QCString fileName = yyFileName;
insideIDL = fileName.right(4)==".idl" || fileName.right(4)==".odl";
insideJava = fileName.right(5)==".java";
insideCS = fileName.right(3)==".cs";
insidePHP = fileName.right(4)==".php" || fileName.right(4)==".inc";
if ( insidePHP )
{
......@@ -510,6 +512,7 @@ ID [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}?)
SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
CSSCOPENAME (({ID}?{BN}*"."{BN}*)*)((~{BN}*)?{ID})
ATTR ({B}+[^>\n]*)?
A [aA]
BR [bB][rR]
......@@ -653,6 +656,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
%x PackageName
%x GetCallType
%x JavaImport
%x CSAccessorDecl
%%
......@@ -1277,25 +1281,21 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
insideTryBlock=FALSE;
BEGIN(TryFunctionBlock);
}
// else if ( insidePHP && strcmp(yytext,"function")==0 )
// {
// BEGIN(
// }
else
{
if (YY_START==FindMembers)
{
addType( current ) ;
}
if (insideJava && strcmp(yytext,"public")==0)
if ((insideJava || insideCS) && strcmp(yytext,"public")==0)
{
current->protection = Public;
}
else if (insideJava && strcmp(yytext,"protected")==0)
else if ((insideJava || insideCS) && strcmp(yytext,"protected")==0)
{
current->protection = Protected;
}
else if (insideJava && strcmp(yytext,"private")==0)
else if ((insideJava || insideCS) && strcmp(yytext,"private")==0)
{
current->protection = Private;
}
......@@ -1318,7 +1318,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
}
<FindMembers>"." {
if (insideJava)
if (insideJava || insideCS)
{
current->name+=".";
}
......@@ -2727,6 +2727,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
lineCount();
BEGIN( ClassVar );
}
<CompoundName>{CSSCOPENAME} { // C# style scope
current->name = substitute(yytext,".","::");
lineCount();
BEGIN( ClassVar );
}
<ClassVar>{SCOPENAME}{BN}*/"(" {
if (insideIDL && strncmp(yytext,"switch",6)==0 && !isId(yytext[6]))
{
......@@ -2792,7 +2797,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<ClassVar>":" {
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;
else
baseProt=Private;
......@@ -2889,7 +2897,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->extends->append(
new BaseInfo(baseName,baseProt,baseVirt)
);
if (current->section == Entry::INTERFACE_SEC || insideJava || insidePHP)
if (current->section == Entry::INTERFACE_SEC || insideJava || insidePHP || insideCS)
baseProt=Public;
else
baseProt=Private;
......@@ -3040,7 +3048,27 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
lineCount();
}
<FindMembers>"{" {
if (insideJava && current->stat && current->name.isEmpty() && current->type.isEmpty())
if (insideCS && !current->name.isEmpty() && !current->type.isEmpty())
{
if (current->type.left(6)=="event " || current->type.find("event")!=-1) // event
{
current->mtype = mtype = Event;
}
else // property
{
current->mtype = mtype = Property;
}
current->bodyLine = yyLineNr;
curlyCount=0;
BEGIN(CSAccessorDecl);
}
else
{
if ((insideJava || insideCS) &&
current->stat &&
current->name.isEmpty() &&
current->type.isEmpty()
)
{
// static Java initializer
needsSemi = FALSE;
......@@ -3055,8 +3083,24 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
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}+ {
lastBriefContext=tmpDocType;
BEGIN( ClassDocBrief );
......
......@@ -927,9 +927,14 @@ void TagFileParser::buildMemberList(Entry *ce,QList<TagMemberInfo> &members)
}
else if (tmi->kind=="property")
{
me->section = Entry::FUNCTION_SEC;
me->section = Entry::VARIABLE_SEC;
me->mtype = Property;
}
else if (tmi->kind=="event")
{
me->section = Entry::VARIABLE_SEC;
me->mtype = Event;
}
else if (tmi->kind=="variable")
{
me->section = Entry::VARIABLE_SEC;
......
......@@ -383,6 +383,12 @@ class Translator
virtual QCString trDeprecatedList() = 0;
//////////////////////////////////////////////////////////////////////////
// new since 1.2.18
//////////////////////////////////////////////////////////////////////////
virtual QCString trEvents() = 0;
virtual QCString trEventDocumentation() = 0;
};
#endif
......@@ -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:
virtual QCString updateNeededMessage()
......
......@@ -27,7 +27,7 @@
#ifndef TRANSLATOR_BR_H
#define TRANSLATOR_BR_H
class TranslatorBrazilian: public Translator
class TranslatorBrazilian: public TranslatorAdapter_1_2_18
{
public:
......
......@@ -163,7 +163,7 @@
// probably slightly faster.
class TranslatorCzech : public Translator
class TranslatorCzech : public TranslatorAdapter_1_2_18
{
private:
/*! The decode() inline assumes the source written in the
......
......@@ -1415,6 +1415,24 @@ class TranslatorEnglish : public Translator
{
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
......@@ -50,7 +50,7 @@
#ifndef TRANSLATOR_HR_H
#define TRANSLATOR_HR_H
class TranslatorCroatian : public Translator
class TranslatorCroatian : public TranslatorAdapter_1_2_18
{
private:
/*! to avoid macro redefinition from translator_cz.h */
......
......@@ -66,7 +66,7 @@
#ifndef TRANSLATOR_IT_H
#define TRANSLATOR_IT_H
class TranslatorItalian : public Translator
class TranslatorItalian : public TranslatorAdapter_1_2_18
{
public:
......
......@@ -61,7 +61,7 @@ class TranslatorJapaneseEn : public TranslatorEnglish
}
};
class TranslatorJapanese : public Translator
class TranslatorJapanese : public TranslatorAdapter_1_2_18
{
private:
/*! The decode() can change euc into sjis */
......
......@@ -1013,6 +1013,23 @@ class TranslatorDutch : public Translator
{
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
......@@ -38,7 +38,7 @@
#ifndef TRANSLATOR_PT_H
#define TRANSLATOR_PT_H
class TranslatorPortuguese : public Translator
class TranslatorPortuguese : public TranslatorAdapter_1_2_18
{
public:
......
......@@ -50,7 +50,7 @@
#ifndef TRANSLATOR_RU_H
#define TRANSLATOR_RU_H
class TranslatorRussian : public Translator
class TranslatorRussian : public TranslatorAdapter_1_2_18
{
private:
/*! The Decode() inline assumes the source written in the
......
......@@ -23,7 +23,7 @@
#ifndef TRANSLATOR_SK_H
#define TRANSLATOR_SK_H
class TranslatorSlovak : public Translator
class TranslatorSlovak : public TranslatorAdapter_1_2_18
{
private:
/*! The Decode() inline assumes the source written in the
......
......@@ -509,9 +509,10 @@ ClassDef *getResolvedClass(
//printf("===================\n");
do
{
//printf("trying getResolvedClass(%s,%s)\n",scope ? scope->name().data() : "<none>", n);
Definition *typedefScope = 0;
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())
{
......@@ -520,7 +521,8 @@ ClassDef *getResolvedClass(
// strip * and & from n
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);
if (pIsTypeDef) *pIsTypeDef=TRUE;
......@@ -581,9 +583,12 @@ ClassDef *getResolvedClass(
if (pTemplSpec) *pTemplSpec = typeName.right(typeName.length()-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
{
......@@ -775,7 +780,8 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam
}
//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
if (external ? cd->isLinkable() : cd->isLinkableInProject())
......@@ -785,6 +791,10 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam
found=TRUE;
}
}
else if (isTypeDef)
{
goto endloop;
}
if (scopeOffset==0)
{
......@@ -796,6 +806,7 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam
}
} while (!found && scopeOffset>=0);
endloop:
//if (!found) printf("Trying to link %s in %s\n",word.data(),scName);
if (!found &&
getDefs(scName,word,0,md,cd,fd,nd,gd) &&
......@@ -830,6 +841,7 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam
out.writeString(word);
}
// set next start point in the string
//printf("index=%d/%d\n",index,txtStr.length());
skipIndex=index=newIndex+matchLen;
floatingIndex+=matchLen;
}
......@@ -1055,7 +1067,7 @@ QCString fileToString(const char *name,bool filter)
}
else // filter the input
{
QCString cmd=Config_getString("INPUT_FILTER")+" "+name;
QCString cmd=Config_getString("INPUT_FILTER")+" \""+name+"\"";
FILE *f=popen(cmd,"r");
if (!f)
{
......@@ -2291,7 +2303,7 @@ bool resolveRef(/* in */ const char *scName,
QCString tsName = name;
bool memberScopeFirst = tsName.find('#')!=-1;
QCString fullName = substitute(tsName,"#","::");
fullName = substitute(fullName,".","::");
fullName = removeRedundantWhiteSpace(substitute(fullName,".","::"));
int scopePos=fullName.findRev("::");
int bracePos=fullName.findRev('('); // reverse is needed for operator()(...)
......@@ -3745,7 +3757,7 @@ static void latin2ToLatex(QTextStream &t,unsigned char c)
}
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 isJapanese = theTranslator->idLanguage()=="japanese";
......@@ -3813,12 +3825,16 @@ void filterLatexString(QTextStream &t,const char *str,
case '~': t << "$\\sim$"; break;
case '[': if (Config_getBool("PDF_HYPERLINKS"))
t << "\\mbox{[}";
else if (insideItem)
t << "\[";
else
t << "[";
break;
case ']': if (pc=='[') t << "$\\,$";
if (Config_getBool("PDF_HYPERLINKS"))
t << "\\mbox{]}";
else if (insideItem)
t << "\[";
else
t << "]";
break;
......
......@@ -200,7 +200,8 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
QCString escapeCharsInString(const char *name,bool allowDots);
void addGroupListToTitle(OutputList &ol,Definition *d);
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);
#endif
......
......@@ -1251,6 +1251,20 @@ static void writeMemberReference(QTextStream &t,Definition *def,MemberDef *rmd,c
{
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();
if (d==Doxygen::globalScope) d=rmd->getBodyDef();
if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
......@@ -1273,6 +1287,7 @@ static void writeMemberReference(QTextStream &t,Definition *def,MemberDef *rmd,c
<< "\">" << convertToXML(name)
<< "</" << tagName << ">" << endl;
}
#endif
}
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
case MemberDef::Define: memType="define"; break;
case MemberDef::EnumValue: ASSERT(0); break;
case MemberDef::Property: memType="property"; break;
case MemberDef::Event: memType="event"; break;
case MemberDef::Variable: memType="variable"; break;
case MemberDef::Typedef: memType="typedef"; break;
case MemberDef::Enumeration: memType="enum"; break;
......@@ -1744,6 +1760,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
generateXMLSection(cd,ti,t,&cd->signals,"signal");
generateXMLSection(cd,ti,t,&cd->dcopMethods,"dcop-func");
generateXMLSection(cd,ti,t,&cd->properties,"property");
generateXMLSection(cd,ti,t,&cd->events,"event");
generateXMLSection(cd,ti,t,&cd->pubStaticMethods,"public-static-func");
generateXMLSection(cd,ti,t,&cd->pubStaticAttribs,"public-static-attrib");
generateXMLSection(cd,ti,t,&cd->proTypes,"protected-type");
......
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