diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-11-06 21:06:38 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-11-06 21:06:38 (GMT) |
commit | c400bd439b3df09704e33df382ed7b08f80dd8ed (patch) | |
tree | d2b3049367f2df643a3f305ecfcd739b426c3edc /src/perlmodgen.cpp | |
parent | c6d6555a949e86be5c859311eb4db5dcc092c258 (diff) | |
download | Doxygen-c400bd439b3df09704e33df382ed7b08f80dd8ed.zip Doxygen-c400bd439b3df09704e33df382ed7b08f80dd8ed.tar.gz Doxygen-c400bd439b3df09704e33df382ed7b08f80dd8ed.tar.bz2 |
Release-1.2.18-20021106
Diffstat (limited to 'src/perlmodgen.cpp')
-rw-r--r-- | src/perlmodgen.cpp | 966 |
1 files changed, 584 insertions, 382 deletions
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index 596aa0b..66c57f9 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -102,14 +102,31 @@ class PerlModOutput { public: - PerlModOutput() : m_stream(0), m_indentation(0) { m_spaces[0] = 0; } + bool m_pretty; + + inline PerlModOutput(bool pretty) + : m_pretty(pretty), m_stream(0), m_indentation(false), m_blockstart(true) + { + m_spaces[0] = 0; + } + virtual ~PerlModOutput() { } inline void setPerlModOutputStream(PerlModOutputStream *os) { m_stream = os; } inline PerlModOutput &openSave() { iopenSave(); return *this; } inline PerlModOutput &closeSave(QString &s) { icloseSave(s); return *this; } - + + inline PerlModOutput &continueBlock() + { + if (m_blockstart) + m_blockstart = false; + else + m_stream->add(','); + indent(); + return *this; + } + inline PerlModOutput &add(char c) { m_stream->add(c); return *this; } inline PerlModOutput &add(const char *s) { m_stream->add(s); return *this; } inline PerlModOutput &add(QCString &s) { m_stream->add(s); return *this; } @@ -118,12 +135,24 @@ public: inline PerlModOutput &add(unsigned int n) { m_stream->add(n); return *this; } PerlModOutput &addQuoted(const char *s) { iaddQuoted(s); return *this; } - inline PerlModOutput &indent() { m_stream->add(m_spaces); return *this; } + + inline PerlModOutput &indent() + { + if (m_pretty) { + m_stream->add('\n'); + m_stream->add(m_spaces); + } + return *this; + } inline PerlModOutput &open(char c, const char *s = 0) { iopen(c, s); return *this; } inline PerlModOutput &close(char c = 0) { iclose(c); return *this; } inline PerlModOutput &addField(const char *s) { iaddField(s); return *this; } + inline PerlModOutput &addFieldQuotedChar(const char *field, char content) + { + iaddFieldQuotedChar(field, content); return *this; + } inline PerlModOutput &addFieldQuotedString(const char *field, const char *content) { iaddFieldQuotedString(field, content); return *this; @@ -146,6 +175,7 @@ protected: void decIndent(); void iaddQuoted(const char *); + void iaddFieldQuotedChar(const char *, char); void iaddFieldQuotedString(const char *, const char *); void iaddField(const char *); @@ -156,6 +186,7 @@ private: PerlModOutputStream *m_stream; int m_indentation; + bool m_blockstart; QStack<PerlModOutputStream> m_saved; char m_spaces[PERLOUTPUT_MAX_INDENTATION * 2 + 2]; @@ -203,9 +234,19 @@ void PerlModOutput::iaddQuoted(const char *s) inline void PerlModOutput::iaddField(const char *s) { - indent(); + continueBlock(); m_stream->add(s); - m_stream->add(" => "); + m_stream->add(m_pretty ? " => " : "=>"); +} + +void PerlModOutput::iaddFieldQuotedChar(const char *field, char content) +{ + iaddField(field); + m_stream->add('\''); + if (content == '\'') + m_stream->add('\\'); + m_stream->add(content); + m_stream->add('\''); } void PerlModOutput::iaddFieldQuotedString(const char *field, const char *content) @@ -215,7 +256,7 @@ void PerlModOutput::iaddFieldQuotedString(const char *field, const char *content iaddField(field); m_stream->add('\''); iaddQuoted(content); - m_stream->add("',\n"); + m_stream->add('\''); } void PerlModOutput::iopen(char c, const char *s) @@ -223,10 +264,10 @@ void PerlModOutput::iopen(char c, const char *s) if (s != 0) iaddField(s); else - indent(); + continueBlock(); m_stream->add(c); - m_stream->add('\n'); incIndent(); + m_blockstart = true; } void PerlModOutput::iclose(char c) @@ -235,7 +276,7 @@ void PerlModOutput::iclose(char c) indent(); if (c != 0) m_stream->add(c); - m_stream->add(",\n"); + m_blockstart = false; } /*! @brief Concrete visitor implementation for PerlMod output. */ @@ -243,7 +284,7 @@ class PerlModDocVisitor : public DocVisitor { public: PerlModDocVisitor(PerlModOutput &); - virtual ~PerlModDocVisitor() {} + virtual ~PerlModDocVisitor() { } void finish(); @@ -292,8 +333,8 @@ public: void visitPost(DocHtmlList *) ; void visitPre(DocHtmlListItem *); void visitPost(DocHtmlListItem *); - void visitPre(DocHtmlPre *); - void visitPost(DocHtmlPre *); + //void visitPre(DocHtmlPre *); + //void visitPost(DocHtmlPre *); void visitPre(DocHtmlDescList *); void visitPost(DocHtmlDescList *); void visitPre(DocHtmlDescTitle *); @@ -358,6 +399,8 @@ private: void singleItem(const char *); void openSubBlock(const char * = 0); void closeSubBlock(); + void openOther(); + void closeOther(); //-------------------------------------- // state variables @@ -365,6 +408,7 @@ private: PerlModOutput &m_output; bool m_textmode; + bool m_textblockstart; QString m_other; }; @@ -397,6 +441,7 @@ void PerlModDocVisitor::openItem(const char *name) void PerlModDocVisitor::closeItem() { + leaveText(); m_output.closeHash(); } @@ -413,9 +458,10 @@ void PerlModDocVisitor::leaveText() { if (!m_textmode) return; - m_output.add("\'\n"); - closeItem(); m_textmode = false; + m_output + .add('\'') + .closeHash(); } void PerlModDocVisitor::singleItem(const char *name) @@ -427,6 +473,7 @@ void PerlModDocVisitor::singleItem(const char *name) void PerlModDocVisitor::openSubBlock(const char *s) { m_output.openList(s); + m_textblockstart = true; } void PerlModDocVisitor::closeSubBlock() @@ -435,6 +482,20 @@ void PerlModDocVisitor::closeSubBlock() m_output.closeList(); } +void PerlModDocVisitor::openOther() +{ + leaveText(); + m_output.openSave(); +} + +void PerlModDocVisitor::closeOther() +{ + QString other; + leaveText(); + m_output.closeSave(other); + m_other += other; +} + void PerlModDocVisitor::visit(DocWord *w) { enterText(); @@ -459,6 +520,8 @@ void PerlModDocVisitor::visit(DocSymbol *sy) { char c = 0; const char *s = 0; + const char *accent = 0; + const char *symbol = 0; switch(sy->symbol()) { case DocSymbol::At: c = '@'; break; @@ -469,27 +532,41 @@ void PerlModDocVisitor::visit(DocSymbol *sy) case DocSymbol::Hash: c = '#'; break; case DocSymbol::Percent: c = '%'; break; case DocSymbol::Quot: c = '"'; break; - case DocSymbol::Szlig: c = 'ß'; break; case DocSymbol::Nbsp: c = ' '; break; - case DocSymbol::Uml: c = sy->letter(); break; - case DocSymbol::Acute: c = sy->letter(); break; - case DocSymbol::Grave: c = sy->letter(); break; - case DocSymbol::Circ: c = sy->letter(); break; - case DocSymbol::Tilde: c = sy->letter(); break; - case DocSymbol::Cedil: c = sy->letter(); break; - case DocSymbol::Ring: c = sy->letter(); break; + case DocSymbol::Uml: accent = "umlaut"; break; + case DocSymbol::Acute: accent = "acute"; break; + case DocSymbol::Grave: accent = "grave"; break; + case DocSymbol::Circ: accent = "circ"; break; + case DocSymbol::Tilde: accent = "tilde"; break; + case DocSymbol::Cedil: accent = "cedilla"; break; + case DocSymbol::Ring: accent = "ring"; break; case DocSymbol::BSlash: s = "\\\\"; break; - case DocSymbol::Copy: s = "(c)"; break; + case DocSymbol::Copy: symbol = "copyright"; break; + case DocSymbol::Szlig: symbol = "szlig"; break; case DocSymbol::Apos: s = "\\\'"; break; case DocSymbol::Unknown: err("Error: unknown symbol found\n"); break; } - enterText(); - if (c != 0) + if (c != 0) { + enterText(); m_output.add(c); - else + } else if (s != 0) { + enterText(); m_output.add(s); + } else if (symbol != 0) { + leaveText(); + openItem("symbol"); + m_output.addFieldQuotedString("symbol", symbol); + closeItem(); + } else if (accent != 0) { + leaveText(); + openItem("accent"); + m_output + .addFieldQuotedString("accent", accent) + .addFieldQuotedChar("letter", sy->letter()); + closeItem(); + } } void PerlModDocVisitor::visit(DocURL *u) @@ -501,18 +578,26 @@ void PerlModDocVisitor::visit(DocURL *u) void PerlModDocVisitor::visit(DocLineBreak *) { singleItem("linebreak"); } void PerlModDocVisitor::visit(DocHorRuler *) { singleItem("hruler"); } + void PerlModDocVisitor::visit(DocStyleChange *s) { + const char *style = 0; switch (s->style()) { - case DocStyleChange::Bold: break; // bold - case DocStyleChange::Italic: break; // italic - case DocStyleChange::Code: break; // code - case DocStyleChange::Subscript: break; // subscript - case DocStyleChange::Superscript: break; // superscript - case DocStyleChange::Center: break; // center - case DocStyleChange::Small: break; // small + case DocStyleChange::Bold: style = "bold"; break; + case DocStyleChange::Italic: style = "italic"; break; + case DocStyleChange::Code: style = "code"; break; + case DocStyleChange::Subscript: style = "subscript"; break; + case DocStyleChange::Superscript: style = "superscript"; break; + case DocStyleChange::Center: style = "center"; break; + case DocStyleChange::Small: style = "small"; break; + case DocStyleChange::Preformatted: style = "preformatted"; break; + } + openItem("style"); + m_output.addFieldQuotedString("style", style) + .addFieldBoolean("enable", s->enable()); + closeItem(); } void PerlModDocVisitor::visit(DocVerbatim *s) @@ -616,22 +701,45 @@ void PerlModDocVisitor::visit(DocIndexEntry *) void PerlModDocVisitor::visitPre(DocAutoList *l) { - openItem(l->isEnumList() ? "ordered_list" : "itemized_list"); + openItem("list"); + m_output.addFieldQuotedString("style", l->isEnumList() ? "ordered" : "itemized"); openSubBlock("content"); } -void PerlModDocVisitor::visitPost(DocAutoList *) { closeSubBlock(); closeItem(); } -void PerlModDocVisitor::visitPre(DocAutoListItem *) { openSubBlock(); } -void PerlModDocVisitor::visitPost(DocAutoListItem *) { closeSubBlock(); } +void PerlModDocVisitor::visitPost(DocAutoList *) +{ + closeSubBlock(); + closeItem(); +} + +void PerlModDocVisitor::visitPre(DocAutoListItem *) +{ + openSubBlock(); +} + +void PerlModDocVisitor::visitPost(DocAutoListItem *) +{ + closeSubBlock(); +} + void PerlModDocVisitor::visitPre(DocPara *) { + if (m_textblockstart) + m_textblockstart = false; + else + singleItem("parbreak"); + /* openItem("para"); openSubBlock("content"); + */ } + void PerlModDocVisitor::visitPost(DocPara *) { + /* closeSubBlock(); closeItem(); + */ } void PerlModDocVisitor::visitPre(DocRoot *) @@ -644,7 +752,6 @@ void PerlModDocVisitor::visitPost(DocRoot *) void PerlModDocVisitor::visitPre(DocSimpleSect *s) { - leaveText(); const char *type = 0; switch (s->type()) { @@ -667,15 +774,14 @@ void PerlModDocVisitor::visitPre(DocSimpleSect *s) err("Error: unknown simple section found\n"); break; } - m_output.openSave().openList(type); + openOther(); + openSubBlock(type); } void PerlModDocVisitor::visitPost(DocSimpleSect *) { - QString content; - leaveText(); - m_output.closeList().closeSave(content); - m_other += content; + closeSubBlock(); + closeOther(); } void PerlModDocVisitor::visitPre(DocTitle *) @@ -692,44 +798,63 @@ void PerlModDocVisitor::visitPost(DocTitle *) void PerlModDocVisitor::visitPre(DocSimpleList *) { - openItem("itemized_list"); + openItem("list"); + m_output.addFieldQuotedString("style", "itemized"); openSubBlock("content"); } -void PerlModDocVisitor::visitPost(DocSimpleList *) { closeSubBlock(); } + +void PerlModDocVisitor::visitPost(DocSimpleList *) +{ + closeSubBlock(); + closeItem(); +} + void PerlModDocVisitor::visitPre(DocSimpleListItem *) { openSubBlock(); } void PerlModDocVisitor::visitPost(DocSimpleListItem *) { closeSubBlock(); } void PerlModDocVisitor::visitPre(DocSection *s) { - QString sect = "sect" + (s->level() + 1); + QString sect = QString("sect%1").arg(s->level()); openItem(sect); openSubBlock("content"); } -void PerlModDocVisitor::visitPost(DocSection *) { closeSubBlock(); } -void PerlModDocVisitor::visitPre(DocHtmlList *l) +void PerlModDocVisitor::visitPost(DocSection *) { - openItem((l->type() == DocHtmlList::Ordered) ? "ordered_list" : "itemized_list"); - openSubBlock("content"); + closeSubBlock(); + closeItem(); } -void PerlModDocVisitor::visitPost(DocHtmlList *) { closeSubBlock(); } -void PerlModDocVisitor::visitPre(DocHtmlListItem *) { openSubBlock(); } -void PerlModDocVisitor::visitPost(DocHtmlListItem *) { closeSubBlock(); } -void PerlModDocVisitor::visitPre(DocHtmlPre *) +void PerlModDocVisitor::visitPre(DocHtmlList *l) { - openItem("preformatted"); + openItem("list"); + m_output.addFieldQuotedString("style", (l->type() == DocHtmlList::Ordered) ? "ordered" : "itemized"); openSubBlock("content"); - //m_insidePre=TRUE; } -void PerlModDocVisitor::visitPost(DocHtmlPre *) +void PerlModDocVisitor::visitPost(DocHtmlList *) { - //m_insidePre=FALSE; closeSubBlock(); closeItem(); } +void PerlModDocVisitor::visitPre(DocHtmlListItem *) { openSubBlock(); } +void PerlModDocVisitor::visitPost(DocHtmlListItem *) { closeSubBlock(); } + +//void PerlModDocVisitor::visitPre(DocHtmlPre *) +//{ +// openItem("preformatted"); +// openSubBlock("content"); +// //m_insidePre=TRUE; +//} + +//void PerlModDocVisitor::visitPost(DocHtmlPre *) +//{ +// //m_insidePre=FALSE; +// closeSubBlock(); +// closeItem(); +//} + void PerlModDocVisitor::visitPre(DocHtmlDescList *) { #if 0 @@ -943,10 +1068,12 @@ void PerlModDocVisitor::visitPre(DocRef *ref) openItem("ref"); if (!ref->hasLinkText()) m_output.addFieldQuotedString("text", ref->targetTitle()); + openSubBlock("content"); } void PerlModDocVisitor::visitPost(DocRef *) { + closeSubBlock(); closeItem(); } @@ -1002,15 +1129,14 @@ void PerlModDocVisitor::visitPre(DocParamSect *s) err("Error: unknown parameter section found\n"); break; } - m_output.openSave().openList(type); + openOther(); + openSubBlock(type); } void PerlModDocVisitor::visitPost(DocParamSect *) { - leaveText(); - QString content; - m_output.closeList().closeSave(content); - m_other += content; + closeSubBlock(); + closeOther(); } void PerlModDocVisitor::visitPre(DocParamList *pl) @@ -1048,10 +1174,14 @@ void PerlModDocVisitor::visitPre(DocXRefItem *) m_output.add("</xreftitle>"); m_output.add("<xrefdescription>"); #endif + openItem("xrefitem"); + openSubBlock("content"); } void PerlModDocVisitor::visitPost(DocXRefItem *) { + closeSubBlock(); + closeItem(); #if 0 m_output.add("</xrefdescription>"); m_output.add("</xrefsect>"); @@ -1062,10 +1192,12 @@ void PerlModDocVisitor::visitPre(DocInternalRef *ref) { openItem("ref"); addLink(0,ref->file(),ref->anchor()); + openSubBlock("content"); } void PerlModDocVisitor::visitPost(DocInternalRef *) { + closeSubBlock(); closeItem(); } @@ -1133,7 +1265,7 @@ static void addPerlModDocBlock(PerlModOutput &output, { QCString stext = text.stripWhiteSpace(); if (stext.isEmpty()) - output.addField(name).add("{},\n"); + output.addField(name).add("{}"); else { DocNode *root = validatingParseDoc(fileName,lineNr,scope,md,stext,FALSE); output.openHash(name); @@ -1181,38 +1313,40 @@ class PerlModGenerator { public: - PerlModOutput output; + PerlModOutput m_output; - QString pathDoxyModelPM; + QString pathDoxyStructurePM; QString pathDoxyDocsTex; QString pathDoxyFormatTex; QString pathDoxyLatexTex; QString pathDoxyLatexDVI; QString pathDoxyLatexPDF; - QString pathDoxyTemplateTex; + QString pathDoxyStructureTex; QString pathDoxyDocsPM; QString pathDoxyLatexPL; - QString pathDoxyLatexTemplatePL; + QString pathDoxyLatexStructurePL; QString pathDoxyRules; QString pathMakefile; - void generatePerlModForMember(MemberDef *md,Definition *); - void generatePerlModSection(Definition *d, - MemberList *ml,const char *name,const char *header=0); - void addListOfAllMembers(ClassDef *cd, PerlModOutput &output); - void generatePerlModForClass(ClassDef *cd, PerlModOutput &output); - void generatePerlModForNamespace(NamespaceDef *nd, PerlModOutput &output); - void generatePerlModForFile(FileDef *fd, PerlModOutput &output); - void generatePerlModForGroup(GroupDef *gd, PerlModOutput &output); - void generatePerlModForPage(PageInfo *pi, PerlModOutput &output); + inline PerlModGenerator(bool pretty) : m_output(pretty) { } + + void generatePerlModForMember(MemberDef *md, Definition *); + void generatePerlModSection(Definition *d, MemberList *ml, + const char *name, const char *header=0); + void addListOfAllMembers(ClassDef *cd); + void generatePerlModForClass(ClassDef *cd); + void generatePerlModForNamespace(NamespaceDef *nd); + void generatePerlModForFile(FileDef *fd); + void generatePerlModForGroup(GroupDef *gd); + void generatePerlModForPage(PageInfo *pi); bool createOutputFile(QFile &f, const char *s); bool createOutputDir(QDir &perlModDir); bool generateDoxyLatexTex(); bool generateDoxyFormatTex(); - bool generateDoxyModelPM(); + bool generateDoxyStructurePM(); bool generateDoxyLatexPL(); - bool generateDoxyLatexTemplatePL(); + bool generateDoxyLatexStructurePL(); bool generateDoxyRules(); bool generateMakefile(); bool generatePerlModOutput(); @@ -1222,7 +1356,6 @@ public: void PerlModGenerator::generatePerlModForMember(MemberDef *md,Definition *) { - // + declaration/definition arg lists // + reimplements // + reimplementedBy @@ -1261,26 +1394,26 @@ void PerlModGenerator::generatePerlModForMember(MemberDef *md,Definition *) else if (md->getNamespaceDef()) scopeName=md->getNamespaceDef()->name(); - output.openHash() + m_output.openHash() .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()); + addPerlModDocBlock(m_output,"brief",md->getDefFileName(),md->getDefLine(),scopeName,md,md->briefDescription()); + addPerlModDocBlock(m_output,"detailed",md->getDefFileName(),md->getDefLine(),scopeName,md,md->documentation()); if (md->memberType()!=MemberDef::Define && md->memberType()!=MemberDef::Enumeration) - output.addFieldQuotedString("type", md->typeString()); + m_output.addFieldQuotedString("type", md->typeString()); if (isFunc) //function { ArgumentList *al = md->argumentList(); - output.addFieldBoolean("const", al && al->constSpecifier) + m_output.addFieldBoolean("const", al && al->constSpecifier) .addFieldBoolean("volatile", al && al->volatileSpecifier); - output.openList("parameters"); + m_output.openList("parameters"); ArgumentList *declAl = md->declArgumentList(); ArgumentList *defAl = md->argumentList(); if (declAl && declAl->count()>0) @@ -1291,80 +1424,80 @@ void PerlModGenerator::generatePerlModForMember(MemberDef *md,Definition *) for (declAli.toFirst();(a=declAli.current());++declAli) { Argument *defArg = defAli.current(); - output.openHash(); + m_output.openHash(); if (!a->name.isEmpty()) - output.addFieldQuotedString("declaration_name", a->name); + m_output.addFieldQuotedString("declaration_name", a->name); if (defArg && !defArg->name.isEmpty() && defArg->name!=a->name) - output.addFieldQuotedString("definition_name", defArg->name); + m_output.addFieldQuotedString("definition_name", defArg->name); if (!a->type.isEmpty()) - output.addFieldQuotedString("type", a->type); + m_output.addFieldQuotedString("type", a->type); if (!a->array.isEmpty()) - output.addFieldQuotedString("array", a->array); + m_output.addFieldQuotedString("array", a->array); if (!a->defval.isEmpty()) - output.addFieldQuotedString("default_value", a->defval); + m_output.addFieldQuotedString("default_value", a->defval); if (!a->attrib.isEmpty()) - output.addFieldQuotedString("attributes", a->attrib); + m_output.addFieldQuotedString("attributes", a->attrib); - output.closeHash(); + m_output.closeHash(); if (defArg) ++defAli; } } - output.closeList(); + m_output.closeList(); } else if (md->memberType()==MemberDef::Define && md->argsString()!=0) // define { - output.openList("parameters"); + m_output.openList("parameters"); ArgumentListIterator ali(*md->argumentList()); Argument *a; for (ali.toFirst();(a=ali.current());++ali) { - output.openHash() + m_output.openHash() .addFieldQuotedString("name", a->type) .closeHash(); } - output.closeList(); + m_output.closeList(); } if (!md->initializer().isEmpty()) - output.addFieldQuotedString("initializer", md->initializer()); + m_output.addFieldQuotedString("initializer", md->initializer()); if (md->excpString()) - output.addFieldQuotedString("exceptions", md->excpString()); + m_output.addFieldQuotedString("exceptions", md->excpString()); if (md->memberType()==MemberDef::Enumeration) // enum { if (md->enumFieldList()) { - output.openList("values"); + m_output.openList("values"); MemberListIterator emli(*md->enumFieldList()); MemberDef *emd; for (emli.toFirst();(emd=emli.current());++emli) { - output.openHash() + m_output.openHash() .addFieldQuotedString("name", emd->name()); if (!emd->initializer().isEmpty()) - output.addFieldQuotedString("initializer", emd->initializer()); + m_output.addFieldQuotedString("initializer", emd->initializer()); - addPerlModDocBlock(output,"brief",emd->getDefFileName(),emd->getDefLine(),scopeName,emd,emd->briefDescription()); + addPerlModDocBlock(m_output,"brief",emd->getDefFileName(),emd->getDefLine(),scopeName,emd,emd->briefDescription()); - addPerlModDocBlock(output,"detailed",emd->getDefFileName(),emd->getDefLine(),scopeName,emd,emd->documentation()); + addPerlModDocBlock(m_output,"detailed",emd->getDefFileName(),emd->getDefLine(),scopeName,emd,emd->documentation()); - output.closeHash(); + m_output.closeHash(); } - output.closeList(); + m_output.closeList(); } } MemberDef *rmd = md->reimplements(); if (rmd) - output.openHash("reimplements") + m_output.openHash("reimplements") .addFieldQuotedString("name", rmd->name()) .closeHash(); @@ -1372,15 +1505,15 @@ void PerlModGenerator::generatePerlModForMember(MemberDef *md,Definition *) if (rbml) { MemberListIterator mli(*rbml); - output.openList("reimplemented_by"); + m_output.openList("reimplemented_by"); for (mli.toFirst();(rmd=mli.current());++mli) - output.openHash() + m_output.openHash() .addFieldQuotedString("name", rmd->name()) .closeHash(); - output.closeList(); + m_output.closeList(); } - output.closeHash(); + m_output.closeHash(); } void PerlModGenerator::generatePerlModSection(Definition *d, @@ -1388,25 +1521,25 @@ void PerlModGenerator::generatePerlModSection(Definition *d, { if (ml->count()==0) return; // empty list - output.openHash(name); + m_output.openHash(name); if (header) - output.addFieldQuotedString("header", header); + m_output.addFieldQuotedString("header", header); - output.openList("members"); + m_output.openList("members"); MemberListIterator mli(*ml); MemberDef *md; for (mli.toFirst();(md=mli.current());++mli) { generatePerlModForMember(md,d); } - output.closeList() + m_output.closeList() .closeHash(); } -void PerlModGenerator::addListOfAllMembers(ClassDef *cd, PerlModOutput &output) +void PerlModGenerator::addListOfAllMembers(ClassDef *cd) { - output.openList("all_members"); + m_output.openList("all_members"); MemberNameInfoSDict::Iterator mnii(*cd->memberNameInfoSDict()); MemberNameInfo *mni; for (mnii.toFirst();(mni=mnii.current());++mnii) @@ -1420,22 +1553,22 @@ void PerlModGenerator::addListOfAllMembers(ClassDef *cd, PerlModOutput &output) Definition *d=md->getGroupDef(); if (d==0) d = cd; - output.openHash() + m_output.openHash() .addFieldQuotedString("name", md->name()) .addFieldQuotedString("virtualness", getVirtualnessName(md->virtualness())) .addFieldQuotedString("protection", getProtectionName(mi->prot)); if (!mi->ambiguityResolutionScope.isEmpty()) - output.addFieldQuotedString("ambiguity_scope", mi->ambiguityResolutionScope); + m_output.addFieldQuotedString("ambiguity_scope", mi->ambiguityResolutionScope); - output.addFieldQuotedString("scope", cd->name()) + m_output.addFieldQuotedString("scope", cd->name()) .closeHash(); } } - output.closeList(); + m_output.closeList(); } -void PerlModGenerator::generatePerlModForClass(ClassDef *cd, PerlModOutput &output) +void PerlModGenerator::generatePerlModForClass(ClassDef *cd) { // + brief description // + detailed description @@ -1457,48 +1590,48 @@ void PerlModGenerator::generatePerlModForClass(ClassDef *cd, PerlModOutput &outp if (cd->name().find('@')!=-1) return; // skip anonymous compounds. if (cd->templateMaster()!=0) return; // skip generated template instances. - output.openHash() + m_output.openHash() .addFieldQuotedString("name", cd->name()); if (cd->baseClasses()->count()>0) { - output.openList("base"); + m_output.openList("base"); BaseClassListIterator bcli(*cd->baseClasses()); BaseClassDef *bcd; for (bcli.toFirst();(bcd=bcli.current());++bcli) - output.openHash() + m_output.openHash() .addFieldQuotedString("name", bcd->classDef->displayName()) .addFieldQuotedString("virtualness", getVirtualnessName(bcd->virt)) .addFieldQuotedString("protection", getProtectionName(bcd->prot)) .closeHash(); - output.closeList(); + m_output.closeList(); } if (cd->subClasses()->count()>0) { - output.openList("derived"); + m_output.openList("derived"); BaseClassListIterator bcli(*cd->baseClasses()); BaseClassDef *bcd; for (bcli.toFirst();(bcd=bcli.current());++bcli) - output.openHash() + m_output.openHash() .addFieldQuotedString("name", bcd->classDef->displayName()) .addFieldQuotedString("virtualness", getVirtualnessName(bcd->virt)) .addFieldQuotedString("protection", getProtectionName(bcd->prot)) .closeHash(); - output.closeList(); + m_output.closeList(); } ClassSDict *cl = cd->getInnerClasses(); if (cl) { - output.openList("inner"); + m_output.openList("inner"); ClassSDict::Iterator cli(*cl); ClassDef *cd; for (cli.toFirst();(cd=cli.current());++cli) - output.openHash() + m_output.openHash() .addFieldQuotedString("name", cd->name()) .closeHash(); - output.closeList(); + m_output.closeList(); } IncludeInfo *ii=cd->includeInfo(); @@ -1508,19 +1641,19 @@ void PerlModGenerator::generatePerlModForClass(ClassDef *cd, PerlModOutput &outp if (nm.isEmpty() && ii->fileDef) nm = ii->fileDef->docName(); if (!nm.isEmpty()) { - output.openHash("includes"); + m_output.openHash("includes"); #if 0 if (ii->fileDef && !ii->fileDef->isReference()) // TODO: support external references t << " id=\"" << ii->fileDef->getOutputFileBase() << "\""; #endif - output.addFieldBoolean("local", ii->local) + m_output.addFieldBoolean("local", ii->local) .addFieldQuotedString("name", nm) .closeHash(); } } - addTemplateList(cd,output); - addListOfAllMembers(cd,output); + addTemplateList(cd,m_output); + addListOfAllMembers(cd); MemberGroupSDict::Iterator mgli(*cd->memberGroupSDict); MemberGroup *mg; for (;(mg=mgli.current());++mgli) @@ -1550,8 +1683,8 @@ void PerlModGenerator::generatePerlModForClass(ClassDef *cd, PerlModOutput &outp generatePerlModSection(cd,&cd->friends,"friend_methods"); generatePerlModSection(cd,&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()); + addPerlModDocBlock(m_output,"brief",cd->getDefFileName(),cd->getDefLine(),cd->name(),0,cd->briefDescription()); + addPerlModDocBlock(m_output,"detailed",cd->getDefFileName(),cd->getDefLine(),cd->name(),0,cd->documentation()); #if 0 DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance); @@ -1579,10 +1712,10 @@ void PerlModGenerator::generatePerlModForClass(ClassDef *cd, PerlModOutput &outp t << "/>" << endl; #endif - output.closeHash(); + m_output.closeHash(); } -void PerlModGenerator::generatePerlModForNamespace(NamespaceDef *nd, PerlModOutput &output) +void PerlModGenerator::generatePerlModForNamespace(NamespaceDef *nd) { // + contained class definitions // + contained namespace definitions @@ -1595,33 +1728,33 @@ void PerlModGenerator::generatePerlModForNamespace(NamespaceDef *nd, PerlModOutp if (nd->isReference()) return; // skip external references - output.openHash() + m_output.openHash() .addFieldQuotedString("name", nd->name()); ClassSDict *cl = nd->classSDict; if (cl) { - output.openList("classes"); + m_output.openList("classes"); ClassSDict::Iterator cli(*cl); ClassDef *cd; for (cli.toFirst();(cd=cli.current());++cli) - output.openHash() + m_output.openHash() .addFieldQuotedString("name", cd->name()) .closeHash(); - output.closeList(); + m_output.closeList(); } NamespaceSDict *nl = nd->namespaceSDict; if (nl) { - output.openList("namespaces"); + m_output.openList("namespaces"); NamespaceSDict::Iterator nli(*nl); NamespaceDef *nd; for (nli.toFirst();(nd=nli.current());++nli) - output.openHash() + m_output.openHash() .addFieldQuotedString("name", nd->name()) .closeHash(); - output.closeList(); + m_output.closeList(); } MemberGroupSDict::Iterator mgli(*nd->memberGroupSDict); @@ -1636,13 +1769,13 @@ void PerlModGenerator::generatePerlModForNamespace(NamespaceDef *nd, PerlModOutp generatePerlModSection(nd,&nd->decFuncMembers,"functions"); generatePerlModSection(nd,&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()); + addPerlModDocBlock(m_output,"brief",nd->getDefFileName(),nd->getDefLine(),0,0,nd->briefDescription()); + addPerlModDocBlock(m_output,"detailed",nd->getDefFileName(),nd->getDefLine(),0,0,nd->documentation()); - output.closeHash(); + m_output.closeHash(); } -void PerlModGenerator::generatePerlModForFile(FileDef *fd, PerlModOutput &output) +void PerlModGenerator::generatePerlModForFile(FileDef *fd) { // + includes files // + includedby files @@ -1660,37 +1793,37 @@ void PerlModGenerator::generatePerlModForFile(FileDef *fd, PerlModOutput &output if (fd->isReference()) return; - output.openHash() + m_output.openHash() .addFieldQuotedString("name", fd->name()); QListIterator<IncludeInfo> ili1(*fd->includeFileList()); IncludeInfo *inc; - output.openList("includes"); + m_output.openList("includes"); for (ili1.toFirst();(inc=ili1.current());++ili1) { - output.openHash() + m_output.openHash() .addFieldQuotedString("name", inc->includeName); if (inc->fileDef && !inc->fileDef->isReference()) { - output.addFieldQuotedString("ref", inc->fileDef->getOutputFileBase()); + m_output.addFieldQuotedString("ref", inc->fileDef->getOutputFileBase()); } - output.closeHash(); + m_output.closeHash(); } - output.closeList(); + m_output.closeList(); QListIterator<IncludeInfo> ili2(*fd->includedByFileList()); - output.openList("included_by"); + m_output.openList("included_by"); for (ili2.toFirst();(inc=ili2.current());++ili2) { - output.openHash() - .addFieldQuotedString("name => ", inc->includeName); + m_output.openHash() + .addFieldQuotedString("name", inc->includeName); if (inc->fileDef && !inc->fileDef->isReference()) { - output.addFieldQuotedString("ref", inc->fileDef->getOutputFileBase()); + m_output.addFieldQuotedString("ref", inc->fileDef->getOutputFileBase()); } - output.closeHash(); + m_output.closeHash(); } - output.closeList(); + m_output.closeList(); generatePerlModSection(fd,&fd->decDefineMembers,"defines"); generatePerlModSection(fd,&fd->decProtoMembers,"prototypes"); @@ -1699,13 +1832,13 @@ void PerlModGenerator::generatePerlModForFile(FileDef *fd, PerlModOutput &output generatePerlModSection(fd,&fd->decFuncMembers,"functions"); generatePerlModSection(fd,&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()); + addPerlModDocBlock(m_output,"brief",fd->getDefFileName(),fd->getDefLine(),0,0,fd->briefDescription()); + addPerlModDocBlock(m_output,"detailed",fd->getDefFileName(),fd->getDefLine(),0,0,fd->documentation()); - output.closeHash(); + m_output.closeHash(); } -void PerlModGenerator::generatePerlModForGroup(GroupDef *gd, PerlModOutput &output) +void PerlModGenerator::generatePerlModForGroup(GroupDef *gd) { // + members // + member groups @@ -1721,73 +1854,73 @@ void PerlModGenerator::generatePerlModForGroup(GroupDef *gd, PerlModOutput &outp if (gd->isReference()) return; // skip external references - output.openHash() + m_output.openHash() .addFieldQuotedString("name", gd->name()) .addFieldQuotedString("title", gd->groupTitle()); FileList *fl = gd->getFiles(); if (fl) { - output.openList("files"); + m_output.openList("files"); QListIterator<FileDef> fli(*fl); FileDef *fd = fl->first(); for (fli.toFirst();(fd=fli.current());++fli) - output.openHash() + m_output.openHash() .addFieldQuotedString("name", fd->name()) .closeHash(); - output.closeList(); + m_output.closeList(); } ClassSDict *cl = gd->getClasses(); if (cl) { - output.openList("classes"); + m_output.openList("classes"); ClassSDict::Iterator cli(*cl); ClassDef *cd; for (cli.toFirst();(cd=cli.current());++cli) - output.openHash() + m_output.openHash() .addFieldQuotedString("name", cd->name()) .closeHash(); - output.closeList(); + m_output.closeList(); } NamespaceList *nl = gd->getNamespaces(); if (nl) { - output.openList("namespaces"); + m_output.openList("namespaces"); NamespaceListIterator nli(*nl); NamespaceDef *nd; for (nli.toFirst();(nd=nli.current());++nli) - output.openHash() + m_output.openHash() .addFieldQuotedString("name", nd->name()) .closeHash(); - output.closeList(); + m_output.closeList(); } PageSDict *pl = gd->getPages(); if (pl) { - output.openList("pages"); + m_output.openList("pages"); PageSDict::Iterator pli(*pl); PageInfo *pi; for (pli.toFirst();(pi=pli.current());++pli) - output.openHash() + m_output.openHash() .addFieldQuotedString("title", pi->title) .closeHash(); - output.closeList(); + m_output.closeList(); } GroupList *gl = gd->getSubGroups(); if (gl) { - output.openList("groups"); + m_output.openList("groups"); GroupListIterator gli(*gl); GroupDef *sgd; for (gli.toFirst();(sgd=gli.current());++gli) - output.openHash() + m_output.openHash() .addFieldQuotedString("title", gd->groupTitle()) .closeHash(); - output.closeList(); + m_output.closeList(); } MemberGroupSDict::Iterator mgli(*gd->memberGroupSDict); @@ -1802,13 +1935,13 @@ void PerlModGenerator::generatePerlModForGroup(GroupDef *gd, PerlModOutput &outp generatePerlModSection(gd,&gd->decFuncMembers,"functions"); generatePerlModSection(gd,&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()); + addPerlModDocBlock(m_output,"brief",gd->getDefFileName(),gd->getDefLine(),0,0,gd->briefDescription()); + addPerlModDocBlock(m_output,"detailed",gd->getDefFileName(),gd->getDefLine(),0,0,gd->documentation()); - output.closeHash(); + m_output.closeHash(); } -void PerlModGenerator::generatePerlModForPage(PageInfo *pi, PerlModOutput &output) +void PerlModGenerator::generatePerlModForPage(PageInfo *pi) { // + name // + title @@ -1816,14 +1949,15 @@ void PerlModGenerator::generatePerlModForPage(PageInfo *pi, PerlModOutput &outpu if (pi->isReference()) return; - output.openHash() + m_output.openHash() .addFieldQuotedString("name", pi->name); SectionInfo *si = Doxygen::sectionDict.find(pi->name); if (si) - output.addFieldQuotedString("title", si->title); + m_output.addFieldQuotedString("title", si->title); - addPerlModDocBlock(output,"detailed",pi->defFileName,pi->defLine,0,0,pi->doc); + addPerlModDocBlock(m_output,"detailed",pi->defFileName,pi->defLine,0,0,pi->doc); + m_output.closeHash(); } bool PerlModGenerator::generatePerlModOutput() @@ -1834,24 +1968,24 @@ bool PerlModGenerator::generatePerlModOutput() QTextStream outputTextStream(&outputFile); PerlModOutputStream outputStream(&outputTextStream); - output.setPerlModOutputStream(&outputStream); - output.add("$doxydocs =\n").openHash(); + m_output.setPerlModOutputStream(&outputStream); + m_output.add("$doxydocs=").openHash(); - output.openList("classes"); + m_output.openList("classes"); ClassSDict::Iterator cli(Doxygen::classSDict); ClassDef *cd; for (cli.toFirst();(cd=cli.current());++cli) - generatePerlModForClass(cd,output); - output.closeList(); + generatePerlModForClass(cd); + m_output.closeList(); - output.openList("namespaces"); + m_output.openList("namespaces"); NamespaceSDict::Iterator nli(Doxygen::namespaceSDict); NamespaceDef *nd; for (nli.toFirst();(nd=nli.current());++nli) - generatePerlModForNamespace(nd,output); - output.closeList(); + generatePerlModForNamespace(nd); + m_output.closeList(); - output.openList("files"); + m_output.openList("files"); FileNameListIterator fnli(Doxygen::inputNameList); FileName *fn; for (;(fn=fnli.current());++fnli) @@ -1859,27 +1993,27 @@ bool PerlModGenerator::generatePerlModOutput() FileNameIterator fni(*fn); FileDef *fd; for (;(fd=fni.current());++fni) - generatePerlModForFile(fd,output); + generatePerlModForFile(fd); } - output.closeList(); + m_output.closeList(); - output.openList("groups"); + m_output.openList("groups"); GroupSDict::Iterator gli(Doxygen::groupSDict); GroupDef *gd; for (;(gd=gli.current());++gli) - generatePerlModForGroup(gd,output); - output.closeList(); + generatePerlModForGroup(gd); + m_output.closeList(); - output.openList("pages"); + m_output.openList("pages"); PageSDict::Iterator pdi(*Doxygen::pageSDict); PageInfo *pi=0; for (pdi.toFirst();(pi=pdi.current());++pdi) - generatePerlModForPage(pi,output); + generatePerlModForPage(pi); if (Doxygen::mainPage) - generatePerlModForPage(Doxygen::mainPage,output); - output.closeList(); + generatePerlModForPage(Doxygen::mainPage); + m_output.closeList(); - output.closeHash().add(";\n1;\n"); + m_output.closeHash().add(";\n1;\n"); return true; } @@ -1943,10 +2077,10 @@ bool PerlModGenerator::createOutputDir(QDir &perlModDir) return true; } -bool PerlModGenerator::generateDoxyModelPM() +bool PerlModGenerator::generateDoxyStructurePM() { QFile doxyModelPM; - if (!createOutputFile(doxyModelPM, pathDoxyModelPM)) + if (!createOutputFile(doxyModelPM, pathDoxyStructurePM)) return false; QTextStream doxyModelPMStream(&doxyModelPM); @@ -2006,7 +2140,7 @@ bool PerlModGenerator::generateDoxyModelPM() "\t];\n" "}\n" "\n" - "$doxymodel =\n" + "$doxystructure =\n" " [ \"hash\", \"Root\",\n" " {\n" "\tfiles =>\n" @@ -2026,6 +2160,20 @@ bool PerlModGenerator::generateDoxyModelPM() "\t },\n" "\t ],\n" "\t ],\n" + "\tpages =>\n" + "\t [ \"list\", \"Pages\",\n" + "\t [ \"hash\", \"Page\",\n" + "\t {\n" + "\t\tname => [ \"string\", \"PageName\" ],\n" + "\t\tdetailed =>\n" + "\t\t [ \"hash\", \"PageDetailed\",\n" + "\t\t {\n" + "\t\t doc => [ \"doc\", \"PageDetailedDoc\" ],\n" + "\t\t },\n" + "\t\t ],\n" + "\t },\n" + "\t ],\n" + "\t ],\n" "\tclasses =>\n" "\t [ \"list\", \"Classes\",\n" "\t [ \"hash\", \"Class\",\n" @@ -2064,67 +2212,90 @@ bool PerlModGenerator::generateDoxyRules() return false; bool perlmodLatex = Config_getBool("PERLMOD_LATEX"); + QString prefix = Config_getString("PERLMOD_MAKEVAR_PREFIX"); QTextStream doxyRulesStream(&doxyRules); doxyRulesStream << - "DOXYEXECPATH = " << pathDoxyExec << "\n" - "DOXYFILE = " << pathDoxyfile << "\n" - "DOXYDOCS_PM = " << pathDoxyDocsPM << "\n" - "DOXYMODEL_PM = " << pathDoxyModelPM << "\n" - "DOXYRULES = " << pathDoxyRules << "\n"; + prefix << "DOXY_EXEC_PATH = " << pathDoxyExec << "\n" << + prefix << "DOXYFILE = " << pathDoxyfile << "\n" << + prefix << "DOXYDOCS_PM = " << pathDoxyDocsPM << "\n" << + prefix << "DOXYSTRUCTURE_PM = " << pathDoxyStructurePM << "\n" << + prefix << "DOXYRULES = " << pathDoxyRules << "\n"; if (perlmodLatex) doxyRulesStream << - "DOXYLATEX_PL = " << pathDoxyLatexPL << "\n" - "DOXYLATEXTEMPLATE_PL = " << pathDoxyLatexTemplatePL << "\n" - "DOXYTEMPLATE_TEX = " << pathDoxyTemplateTex << "\n" - "DOXYDOCS_TEX = " << pathDoxyDocsTex << "\n" - "DOXYFORMAT_TEX = " << pathDoxyFormatTex << "\n" - "DOXYLATEX_TEX = " << pathDoxyLatexTex << "\n" - "DOXYLATEX_DVI = " << pathDoxyLatexDVI << "\n" - "DOXYLATEX_PDF = " << pathDoxyLatexPDF << "\n"; + prefix << "DOXYLATEX_PL = " << pathDoxyLatexPL << "\n" << + prefix << "DOXYLATEXSTRUCTURE_PL = " << pathDoxyLatexStructurePL << "\n" << + prefix << "DOXYSTRUCTURE_TEX = " << pathDoxyStructureTex << "\n" << + prefix << "DOXYDOCS_TEX = " << pathDoxyDocsTex << "\n" << + prefix << "DOXYFORMAT_TEX = " << pathDoxyFormatTex << "\n" << + prefix << "DOXYLATEX_TEX = " << pathDoxyLatexTex << "\n" << + prefix << "DOXYLATEX_DVI = " << pathDoxyLatexDVI << "\n" << + prefix << "DOXYLATEX_PDF = " << pathDoxyLatexPDF << "\n"; doxyRulesStream << "\n" ".PHONY: clean-perlmod\n" - "clean-perlmod:\n" - "\trm -f $(DOXYMODEL_PM) $(DOXYDOCS_PM)"; + "clean-perlmod::\n" + "\trm -f $(" << prefix << "DOXYSTRUCTURE_PM) \\\n" + "\t$(" << prefix << "DOXYDOCS_PM)"; if (perlmodLatex) doxyRulesStream << " \\\n" - "\t$(DOXYLATEX_PL) $(DOXYLATEXTEMPLATE_PL) \\\n" - "\t$(DOXYDOCS_TEX) $(DOXYTEMPLATE_TEX) \\\n" - "\t$(DOXYFORMAT_TEX) $(DOXYLATEX_TEX) \\\n" - "\t$(DOXYLATEX_PDF) $(DOXYLATEX_DVI) \\\n" - "\t$(addprefix $(DOXYLATEX_TEX:tex=),out aux log)"; + "\t$(" << prefix << "DOXYLATEX_PL) \\\n" + "\t$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n" + "\t$(" << prefix << "DOXYDOCS_TEX) \\\n" + "\t$(" << prefix << "DOXYSTRUCTURE_TEX) \\\n" + "\t$(" << prefix << "DOXYFORMAT_TEX) \\\n" + "\t$(" << prefix << "DOXYLATEX_TEX) \\\n" + "\t$(" << prefix << "DOXYLATEX_PDF) \\\n" + "\t$(" << prefix << "DOXYLATEX_DVI) \\\n" + "\t$(addprefix $(" << prefix << "DOXYLATEX_TEX:tex=),out aux log)"; doxyRulesStream << "\n\n"; doxyRulesStream << - "$(DOXYRULES) $(DOXYMAKEFILE) $(DOXYMODEL_PM) $(DOXYDOCS_PM)"; + "$(" << prefix << "DOXYRULES) \\\n" + "$(" << prefix << "DOXYMAKEFILE) \\\n" + "$(" << prefix << "DOXYSTRUCTURE_PM) \\\n" + "$(" << prefix << "DOXYDOCS_PM)"; if (perlmodLatex) { doxyRulesStream << " \\\n" - "$(DOXYLATEX_PL) $(DOXYLATEXTEMPLATE_PL) \\\n" - "$(DOXYFORMAT_TEX) $(DOXYLATEX_TEX)"; + "$(" << prefix << "DOXYLATEX_PL) \\\n" + "$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n" + "$(" << prefix << "DOXYFORMAT_TEX) \\\n" + "$(" << prefix << "DOXYLATEX_TEX)"; } doxyRulesStream << - ": $(DOXYFILE)\n" - "\tcd $(DOXYEXECPATH) ; doxygen \"$<\"\n"; + ": \\\n" + "\t$(" << prefix << "DOXYFILE)\n" + "\tcd $(" << prefix << "DOXY_EXEC_PATH) ; doxygen \"$<\"\n"; if (perlmodLatex) { doxyRulesStream << "\n" - "$(DOXYDOCS_TEX): $(DOXYLATEX_PL) $(DOXYDOCS_PM)\n" + "$(" << prefix << "DOXYDOCS_TEX): \\\n" + "$(" << prefix << "DOXYLATEX_PL) \\\n" + "$(" << prefix << "DOXYDOCS_PM)\n" "\tperl -I\"$(<D)\" \"$<\" >\"$@\"\n" "\n" - "$(DOXYTEMPLATE_TEX): $(DOXYLATEXTEMPLATE_PL) $(DOXYMODEL_PM)\n" + "$(" << prefix << "DOXYSTRUCTURE_TEX): \\\n" + "$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n" + "$(" << prefix << "DOXYSTRUCTURE_PM)\n" "\tperl -I\"$(<D)\" \"$<\" >\"$@\"\n" "\n" - "$(DOXYLATEX_PDF) $(DOXYLATEX_DVI): $(DOXYLATEX_TEX) $(DOXYFORMAT_TEX) $(DOXYTEMPLATE_TEX) $(DOXYDOCS_TEX)\n" + "$(" << prefix << "DOXYLATEX_PDF) \\\n" + "$(" << prefix << "DOXYLATEX_DVI): \\\n" + "$(" << prefix << "DOXYLATEX_TEX) \\\n" + "$(" << prefix << "DOXYFORMAT_TEX) \\\n" + "$(" << prefix << "DOXYSTRUCTURE_TEX) \\\n" + "$(" << prefix << "DOXYDOCS_TEX)\n" "\n" - "$(DOXYLATEX_PDF): $(DOXYLATEX_TEX)\n" + "$(" << prefix << "DOXYLATEX_PDF): \\\n" + "$(" << prefix << "DOXYLATEX_TEX)\n" "\tpdflatex -interaction=nonstopmode \"$<\"\n" "\n" - "$(DOXYLATEX_DVI): $(DOXYLATEX_TEX)\n" + "$(" << prefix << "DOXYLATEX_DVI): \\\n" + "$(" << prefix << "DOXYLATEX_TEX)\n" "\tlatex -interaction=nonstopmode \"$<\"\n"; } @@ -2138,6 +2309,7 @@ bool PerlModGenerator::generateMakefile() return false; bool perlmodLatex = Config_getBool("PERLMOD_LATEX"); + QString prefix = Config_getString("PERLMOD_MAKEVAR_PREFIX"); QTextStream makefileStream(&makefile); makefileStream << @@ -2150,47 +2322,43 @@ bool PerlModGenerator::generateMakefile() if (perlmodLatex) { makefileStream << - "pdf: $(DOXYLATEX_PDF)\n" - "dvi: $(DOXYLATEX_DVI)\n"; + "pdf: $(" << prefix << "DOXYLATEX_PDF)\n" + "dvi: $(" << prefix << "DOXYLATEX_DVI)\n"; } return true; } -bool PerlModGenerator::generateDoxyLatexTemplatePL() +bool PerlModGenerator::generateDoxyLatexStructurePL() { - QFile doxyLatexTemplatePL; - if (!createOutputFile(doxyLatexTemplatePL, pathDoxyLatexTemplatePL)) + QFile doxyLatexStructurePL; + if (!createOutputFile(doxyLatexStructurePL, pathDoxyLatexStructurePL)) return false; - QTextStream doxyLatexTemplatePLStream(&doxyLatexTemplatePL); - doxyLatexTemplatePLStream << - "use DoxyModel;\n" + QTextStream doxyLatexStructurePLStream(&doxyLatexStructurePL); + doxyLatexStructurePLStream << + "use DoxyStructure;\n" "\n" - "sub template($) {\n" - "\tmy $model = $_[0];\n" - "\tmy ($type, $name) = @$model[0, 1];\n" - "\tif ($type eq \"string\") {\n" - "\t\tprint \"\\\\def\\\\\" . $name . \"#1{#1}%\\n\";\n" - "\t} elsif ($type eq \"doc\") {\n" - "\t\tprint \"\\\\def\\\\\" . $name . \"#1{#1}%\\n\";\n" - "\t} elsif ($type eq \"hash\") {\n" - "\t\tmy ($key, $value);\n" - "\t\twhile (($key, $submodel) = each %{$$model[2]}) {\n" - "\t\t\tmy $subname = $$submodel[1];\n" - "\t\t\tprint \"\\\\def\\\\\" . $subname . \"Empty{}%\\n\";\n" - "\t\t\tprint \"\\\\def\\\\field\" . $subname . \"Empty{\\\\\" . $subname . \"Empty}%\\n\";\n" - "\t\t\ttemplate($submodel);\n" + "sub process($) {\n" + "\tmy $node = $_[0];\n" + "\tmy ($type, $name) = @$node[0, 1];\n" + "\tmy $command;\n" + "\tif ($type eq \"string\") { $command = \"String\" }\n" + "\telsif ($type eq \"doc\") { $command = \"Doc\" }\n" + "\telsif ($type eq \"hash\") {\n" + "\t\t$command = \"Hash\";\n" + "\t\tfor my $subnode (values %{$$node[2]}) {\n" + "\t\t\tprocess($subnode);\n" "\t\t}\n" - "\t\tprint \"\\\\def\\\\\" . $name . \"{}%\\n\";\n" - "\t} elsif ($type eq \"list\") {\n" - "\t\ttemplate($$model[2]);\n" - "\t\tprint \"\\\\def\\\\\" . $name . \"#1{#1}%\\n\";\n" - "\t\tprint \"\\\\def\\\\\" . $name . \"Sep{}%\\n\";\n" "\t}\n" + "\telsif ($type eq \"list\") {\n" + "\t\t$command = \"List\";\n" + "\t\tprocess($$node[2]);\n" + "\t}\n" + "\tprint \"\\\\\" . $command . \"Node{\" . $name . \"}%\\n\";\n" "}\n" "\n" - "template($doxymodel);\n"; + "process($doxystructure);\n"; return true; } @@ -2203,16 +2371,17 @@ bool PerlModGenerator::generateDoxyLatexPL() QTextStream doxyLatexPLStream(&doxyLatexPL); doxyLatexPLStream << - "use DoxyModel;\n" + "use DoxyStructure;\n" "use DoxyDocs;\n" "\n" "sub latex_quote($) {\n" "\tmy $text = $_[0];\n" "\t$text =~ s/\\\\/\\\\textbackslash /g;\n" + "\t$text =~ s/\\|/\\\\textbar /g;\n" + "\t$text =~ s/</\\\\textless /g;\n" + "\t$text =~ s/>/\\\\textgreater /g;\n" "\t$text =~ s/~/\\\\textasciitilde /g;\n" - "\t$text =~ s/</\\\\textasciiless /g;\n" - "\t$text =~ s/>/\\\\textasciigreater /g;\n" - "\t$text =~ s/\\\\^/\\\\textasciicircum /g;\n" + "\t$text =~ s/\\^/\\\\textasciicircum /g;\n" "\t$text =~ s/[\\$&%#_{}]/\\\\$&/g;\n" "\tprint $text;\n" "}\n" @@ -2223,17 +2392,43 @@ bool PerlModGenerator::generateDoxyLatexPL() "\t\tmy $type = $$item{type};\n" "\t\tif ($type eq \"text\") {\n" "\t\t\tlatex_quote($$item{content});\n" - "\t\t} elsif ($type eq \"para\") {\n" - "\t\t\tgenerate_doc($$item{content});\n" - "#\t\t\tprint \"\\\\par\\n\";\n" - "\t\t} elsif ($type eq \"bold\") {\n" - "\t\t\tprint \"\\\\textbf{\";\n" - "\t\t\tgenerate_doc($$item{content});\n" - "\t\t\tprint \"}\";\n" - "\t\t} elsif ($type eq \"emphasis\") {\n" - "\t\t\tprint \"\\\\textit{\";\n" - "\t\t\tgenerate_doc($$item{content});\n" - "\t\t\tprint \"}\";\n" + "\t\t} elsif ($type eq \"parbreak\") {\n" + "\t\t\tprint \"\\n\\n\";\n" + "\t\t} elsif ($type eq \"style\") {\n" + "\t\t\tmy $style = $$item{style};\n" + "\t\t\tif ($$item{enable} eq \"yes\") {\n" + "\t\t\t\tif ($style eq \"bold\") { print '\\bfseries'; }\n" + "\t\t\t\tif ($style eq \"italic\") { print '\\itshape'; }\n" + "\t\t\t\tif ($style eq \"code\") { print '\\ttfamily'; }\n" + "\t\t\t} else {\n" + "\t\t\t\tif ($style eq \"bold\") { print '\\mdseries'; }\n" + "\t\t\t\tif ($style eq \"italic\") { print '\\upshape'; }\n" + "\t\t\t\tif ($style eq \"code\") { print '\\rmfamily'; }\n" + "\t\t\t}\n" + "\t\t\tprint '{}';\n" + "\t\t} elsif ($type eq \"symbol\") {\n" + "\t\t\tmy $symbol = $$item{symbol};\n" + "\t\t\tif ($symbol eq \"copyright\") { print '\\copyright'; }\n" + "\t\t\telsif ($symbol eq \"szlig\") { print '\\ss'; }\n" + "\t\t\tprint '{}';\n" + "\t\t} elsif ($type eq \"accent\") {\n" + "\t\t\tmy ($accent) = $$item{accent};\n" + "\t\t\tif ($accent eq \"umlaut\") { print '\\\"'; }\n" + "\t\t\telsif ($accent eq \"acute\") { print '\\\\\\''; }\n" + "\t\t\telsif ($accent eq \"grave\") { print '\\`'; }\n" + "\t\t\telsif ($accent eq \"circ\") { print '\\^'; }\n" + "\t\t\telsif ($accent eq \"tilde\") { print '\\~'; }\n" + "\t\t\telsif ($accent eq \"cedilla\") { print '\\c'; }\n" + "\t\t\telsif ($accent eq \"ring\") { print '\\r'; }\n" + "\t\t\tprint \"{\" . $$item{letter} . \"}\"; \n" + "\t\t} elsif ($type eq \"list\") {\n" + "\t\t\tmy $env = ($$item{style} eq \"ordered\") ? \"enumerate\" : \"itemize\";\n" + "\t\t\tprint \"\\n\\\\begin{\" . $env .\"}\";\n" + "\t\t \tfor my $subitem (@{$$item{content}}) {\n" + "\t\t\t\tprint \"\\n\\\\item \";\n" + "\t\t\t\tgenerate_doc($subitem);\n" + "\t\t \t}\n" + "\t\t\tprint \"\\n\\\\end{\" . $env .\"}\";\n" "\t\t} elsif ($type eq \"url\") {\n" "\t\t\tlatex_quote($$item{content});\n" "\t\t}\n" @@ -2241,8 +2436,8 @@ bool PerlModGenerator::generateDoxyLatexPL() "}\n" "\n" "sub generate($$) {\n" - "\tmy ($item, $model) = @_;\n" - "\tmy ($type, $name) = @$model[0, 1];\n" + "\tmy ($item, $node) = @_;\n" + "\tmy ($type, $name) = @$node[0, 1];\n" "\tif ($type eq \"string\") {\n" "\t\tprint \"\\\\\" . $name . \"{\";\n" "\t\tlatex_quote($item);\n" @@ -2253,17 +2448,17 @@ bool PerlModGenerator::generateDoxyLatexPL() "\t\t\tgenerate_doc($item);\n" "\t\t\tprint \"}%\\n\";\n" "\t\t} else {\n" - "\t\t\tprint \"\\\\\" . $name . \"Empty%\\n\";\n" + "#\t\t\tprint \"\\\\\" . $name . \"Empty%\\n\";\n" "\t\t}\n" "\t} elsif ($type eq \"hash\") {\n" "\t\tmy ($key, $value);\n" - "\t\twhile (($key, $submodel) = each %{$$model[2]}) {\n" - "\t\t\tmy $subname = $$submodel[1];\n" - "\t\t\tprint \"\\\\def\\\\field\" . $subname . \"{\";\n" + "\t\twhile (($key, $subnode) = each %{$$node[2]}) {\n" + "\t\t\tmy $subname = $$subnode[1];\n" + "\t\t\tprint \"\\\\Defcs{field\" . $subname . \"}{\";\n" "\t\t\tif ($$item{$key}) {\n" - "\t\t\t\tgenerate($$item{$key}, $submodel);\n" + "\t\t\t\tgenerate($$item{$key}, $subnode);\n" "\t\t\t} else {\n" - "\t\t\t\t\tprint \"\\\\\" . $subname . \"Empty%\\n\";\n" + "#\t\t\t\t\tprint \"\\\\\" . $subname . \"Empty%\\n\";\n" "\t\t\t}\n" "\t\t\tprint \"}%\\n\";\n" "\t\t}\n" @@ -2276,17 +2471,17 @@ bool PerlModGenerator::generateDoxyLatexPL() "\t\t\t\tif ($index) {\n" "\t\t\t\t\tprint \"\\\\\" . $name . \"Sep%\\n\";\n" "\t\t\t\t}\n" - "\t\t\t\tgenerate($subitem, $$model[2]);\n" + "\t\t\t\tgenerate($subitem, $$node[2]);\n" "\t\t\t\t$index++;\n" "\t\t\t}\n" "\t\t\tprint \"}%\\n\";\n" "\t\t} else {\n" - "\t\t\tprint \"\\\\\" . $name . \"Empty%\\n\";\n" + "#\t\t\tprint \"\\\\\" . $name . \"Empty%\\n\";\n" "\t\t}\n" "\t}\n" "}\n" "\n" - "generate($doxydocs, $doxymodel);\n"; + "generate($doxydocs, $doxystructure);\n"; return true; } @@ -2299,51 +2494,56 @@ bool PerlModGenerator::generateDoxyFormatTex() QTextStream doxyFormatTexStream(&doxyFormatTex); doxyFormatTexStream << - "\\input{" << pathDoxyTemplateTex << "}\n" + "\\def\\Defcs#1{\\long\\expandafter\\def\\csname#1\\endcsname}\n" + "\\Defcs{Empty}{}\n" + "\\def\\IfEmpty#1{\\expandafter\\ifx\\csname#1\\endcsname\\Empty}\n" + "\n" + "\\def\\StringNode#1{\\Defcs{#1}##1{##1}}\n" + "\\def\\DocNode#1{\\Defcs{#1}##1{##1}}\n" + "\\def\\ListNode#1{\\Defcs{#1}##1{##1}\\Defcs{#1Sep}{}}\n" + "\\def\\HashNode#1{\\Defcs{#1}{}}\n" + "\n" + "\\input{" << pathDoxyStructureTex << "}\n" "\n" "\\newbox\\BoxA\n" "\\dimendef\\DimenA=151\\relax\n" "\\dimendef\\DimenB=152\\relax\n" "\\countdef\\ZoneDepth=151\\relax\n" "\n" - "\\def\\Ifxcscs#1#2{%\n" - "\\expandafter\\let\\expandafter\\Ifxcscsa\\csname#1\\endcsname%\n" - "\\expandafter\\let\\expandafter\\Ifxcscsb\\csname#2\\endcsname%\n" - "\\ifx\\Ifxcscsa\\Ifxcscsb}%\n" + "\\def\\Cs#1{\\csname#1\\endcsname}\n" + "\\def\\Letcs#1{\\expandafter\\let\\csname#1\\endcsname}\n" + "\\def\\Heading#1{\\vskip 4mm\\relax\\textbf{#1}}\n" + "\\def\\See#1{\\begin{flushleft}\\Heading{See also: }#1\\end{flushleft}}\n" "\n" - "\\def\\Cs#1{\\csname#1\\endcsname}%\n" - "\\def\\Defcs#1{\\expandafter\\def\\csname#1\\endcsname}%\n" - "\\def\\Letcs#1{\\expandafter\\let\\csname#1\\endcsname}%\n" - "\\def\\Heading#1{\\vskip 4mm\\relax\\textbf{#1}}%\n" - "\\def\\See#1{\\begin{flushleft}\\Heading{See also: }#1\\end{flushleft}}%\n" - "\n" - "\\def\\Frame#1{\\vskip 3mm\\relax\\fbox{ \\vbox{\\hsize0.95\\hsize\\vskip 1mm\\relax%\n" - "\\raggedright#1\\vskip 0.5mm\\relax} }}%\n" + "\\def\\Frame#1{\\vskip 3mm\\relax\\fbox{ \\vbox{\\hsize0.95\\hsize\\vskip 1mm\\relax\n" + "\\raggedright#1\\vskip 0.5mm\\relax} }}\n" "\n" "\\def\\Zone#1#2#3{%\n" - "\\Defcs{#1}{\n" - "\\advance\\ZoneDepth1\\relax%\n" - "\\Letcs{Mode\\number\\ZoneDepth}0%\n" - "\\Letcs{Present\\number\\ZoneDepth}0%\n" - "#2%\n" + "\\Defcs{Test#1}{#2}%\n" + "\\Defcs{Emit#1}{#3}%\n" + "\\Defcs{#1}{%\n" + "\\advance\\ZoneDepth1\\relax\n" + "\\Letcs{Mode\\number\\ZoneDepth}0\\relax\n" + "\\Letcs{Present\\number\\ZoneDepth}0\\relax\n" + "\\Cs{Test#1}\n" "\\expandafter\\if\\Cs{Present\\number\\ZoneDepth}1%\n" - "\\advance\\ZoneDepth-1\\relax%\n" - "\\Letcs{Present\\number\\ZoneDepth}1%\n" + "\\advance\\ZoneDepth-1\\relax\n" + "\\Letcs{Present\\number\\ZoneDepth}1\\relax\n" "\\expandafter\\if\\Cs{Mode\\number\\ZoneDepth}1%\n" - "\\advance\\ZoneDepth1\\relax%\n" - "\\Letcs{Mode\\number\\ZoneDepth}1%\n" - "#3%\n" - "\\advance\\ZoneDepth-1\\relax\\fi%\n" - "\\advance\\ZoneDepth1\\relax\\fi%\n" - "\\advance\\ZoneDepth-1\\relax}}%\n" + "\\advance\\ZoneDepth1\\relax\n" + "\\Letcs{Mode\\number\\ZoneDepth}1\\relax\n" + "\\Cs{Emit#1}\n" + "\\advance\\ZoneDepth-1\\relax\\fi\n" + "\\advance\\ZoneDepth1\\relax\\fi\n" + "\\advance\\ZoneDepth-1\\relax}}\n" "\n" "\\def\\Member#1#2{%\n" - "\\Defcs{Test#1}{\\Cs{field#1Detailed}%\n" - "\\Ifxcscs{field#1DetailedDoc}{field#1DetailedDocEmpty}\\else\\Letcs{Present#1}1\\fi}\n" - "\\Defcs{#1}{\\Letcs{Present#1}0%\n" - "\\Cs{Test#1}\\if1\\Cs{Present#1}\\Letcs{Present\\number\\ZoneDepth}1%\n" - "\\if1\\Cs{Mode\\number\\ZoneDepth}#2\\fi\\fi}}%\n" - "%\n" + "\\Defcs{Test#1}{\\Cs{field#1Detailed}\n" + "\\IfEmpty{field#1DetailedDoc}\\else\\Letcs{Present#1}1\\fi}\n" + "\\Defcs{#1}{\\Letcs{Present#1}0\\relax\n" + "\\Cs{Test#1}\\if1\\Cs{Present#1}\\Letcs{Present\\number\\ZoneDepth}1\\relax\n" + "\\if1\\Cs{Mode\\number\\ZoneDepth}#2\\fi\\fi}}\n" + "\n" "\\def\\TypedefMemberList#1#2{%\n" "\\Defcs{#1DetailedDoc}##1{\\vskip 5.5mm\\relax##1}%\n" "\\Defcs{#1Name}##1{\\textbf{##1}}%\n" @@ -2369,40 +2569,48 @@ bool PerlModGenerator::generateDoxyFormatTex() "\\Defcs{#1PDBlocksSep}{\\vskip 2mm\\relax}%\n" "%\n" "\\Defcs{#1PDBlocks}##1{%\n" - "\\Heading{Parameters:}\\vskip 1.5mm\\relax%\n" - "\\DimenA0pt\\relax%\n" + "\\Heading{Parameters:}\\vskip 1.5mm\\relax\n" + "\\DimenA0pt\\relax\n" "\\Defcs{#1PDBlock}{\\setbox\\BoxA\\hbox{\\Cs{field#1PDParams}}%\n" "\\ifdim\\DimenA<\\wd\\BoxA\\DimenA\\wd\\BoxA\\fi}%\n" "##1%\n" "\\advance\\DimenA3mm\\relax\n" - "\\DimenB\\hsize\\advance\\DimenB-\\DimenA\\relax%\n" - "\\Defcs{#1PDBlock}{\\hbox to\\hsize{\\vtop{\\hsize\\DimenA\\relax%\n" - "\\Cs{field#1PDParams}}\\hfill%\n" + "\\DimenB\\hsize\\advance\\DimenB-\\DimenA\\relax\n" + "\\Defcs{#1PDBlock}{\\hbox to\\hsize{\\vtop{\\hsize\\DimenA\\relax\n" + "\\Cs{field#1PDParams}}\\hfill\n" "\\vtop{\\hsize\\DimenB\\relax\\Cs{field#1PDDoc}}}}%\n" - "##1}%\n" - "%\n" - "\\Defcs{#1ParamName}##1{\\textit{##1}}%\n" - "\\Defcs{#1Param}{\\Cs{field#1ParamType}{} \\Cs{field#1ParamName}}%\n" - "\\Defcs{#1ParamsSep}{, }%\n" - "%\n" - "\\Defcs{#1Name}##1{\\textbf{##1}}%\n" - "\\Defcs{#1See}##1{\\See{##1}}%\n" - "\\Defcs{#1Return}##1{\\Heading{Returns: }##1}%\n" + "##1}\n" + "\n" + "\\Defcs{#1ParamName}##1{\\textit{##1}}\n" + "\\Defcs{#1Param}{\\Cs{field#1ParamType}{} \\Cs{field#1ParamName}}\n" + "\\Defcs{#1ParamsSep}{, }\n" + "\n" + "\\Defcs{#1Name}##1{\\textbf{##1}}\n" + "\\Defcs{#1See}##1{\\See{##1}}\n" + "\\Defcs{#1Return}##1{\\Heading{Returns: }##1}\n" "\\Defcs{field#1Title}{\\Frame{\\Cs{field#1Type}{} \\Cs{field#1Name}(\\Cs{field#1Params})}}%\n" "%\n" "\\Zone{#1s}{\\Cs{field#1List}}{\\subsubsection{#2}\\Cs{field#1List}}%\n" - "\\Member{#1}{\n" - "\\Cs{field#1Title}\\vskip 6mm\\relax\\Cs{field#1DetailedDoc}%\n" + "\\Member{#1}{%\n" + "\\Cs{field#1Title}\\vskip 6mm\\relax\\Cs{field#1DetailedDoc}\n" "\\Cs{field#1Return}\\Cs{field#1PDBlocks}\\Cs{field#1See}\\vskip 5mm\\relax}}\n" "\n" - "\\TypedefMemberList{FileTypedef}{Typedefs}%\n" - "\\VariableMemberList{FileVariable}{Variables}%\n" - "\\FunctionMemberList{FileFunction}{Functions}%\n" + "\\def\\FileDetailed{\\fieldFileDetailedDoc\\par}\n" + "\\def\\ClassDetailed{\\fieldClassDetailedDoc\\par}\n" + "\n" + "\\def\\FileSubzones{\\fieldFileTypedefs\\fieldFileVariables\\fieldFileFunctions}\n" "\n" - "\\def\\FileDetailed{\\fieldFileDetailedDoc\\par}%\n" + "\\def\\ClassSubzones{%\n" + "\\fieldClassPublicTypedefs\\fieldClassPublicMembers\\fieldClassPublicMethods\n" + "\\fieldClassProtectedTypedefs\\fieldClassProtectedMembers\\fieldClassProtectedMethods\n" + "\\fieldClassPrivateTypedefs\\fieldClassPrivateMembers\\fieldClassPrivateMethods}\n" "\n" - "\\def\\TestFile{\\fieldFileTypedefs\\fieldFileVariables\\fieldFileFunctions}%\n" - "\\Zone{File}{\\TestFile}{\\subsection{\\fieldFileName}\\fieldFileDetailed\\TestFile}%\n" + "\\Member{Page}{\\subsection{\\fieldPageName}\\fieldPageDetailedDoc}\n" + "\n" + "\\TypedefMemberList{FileTypedef}{Typedefs}\n" + "\\VariableMemberList{FileVariable}{Variables}\n" + "\\FunctionMemberList{FileFunction}{Functions}\n" + "\\Zone{File}{\\FileSubzones}{\\subsection{\\fieldFileName}\\fieldFileDetailed\\FileSubzones}\n" "\n" "\\TypedefMemberList{ClassPublicTypedef}{Public Typedefs}\n" "\\TypedefMemberList{ClassProtectedTypedef}{Protected Typedefs}\n" @@ -2413,36 +2621,29 @@ bool PerlModGenerator::generateDoxyFormatTex() "\\FunctionMemberList{ClassPublicMethod}{Public Methods}\n" "\\FunctionMemberList{ClassProtectedMethod}{Protected Methods}\n" "\\FunctionMemberList{ClassPrivateMethod}{Private Methods}\n" + "\\Zone{Class}{\\ClassSubzones}{\\subsection{\\fieldClassName}\\fieldClassDetailed\\ClassSubzones}\n" "\n" - "\\def\\ClassDetailed{\\fieldClassDetailedDoc\\par}%\n" - "\n" - "\\def\\TestClass{%\n" - "\\fieldClassPublicTypedefs\\fieldClassPublicMembers\\fieldClassPublicMethods%\n" - "\\fieldClassProtectedTypedefs\\fieldClassProtectedMembers\\fieldClassProtectedMethods%\n" - "\\fieldClassPrivateTypedefs\\fieldClassPrivateMembers\\fieldClassPrivateMethods}%\n" - "\n" - "\\Zone{Class}{\\TestClass}{\\subsection{\\fieldClassName}\\fieldClassDetailed\\TestClass}%\n" - "\n" - "\\Zone{AllFiles}{\\fieldFiles}{\\section{Files}\\fieldFiles}%\n" - "\\Zone{AllClasses}{\\fieldClasses}{\\section{Classes}\\fieldClasses}%\n" + "\\Zone{AllPages}{\\fieldPages}{\\section{Pages}\\fieldPages}\n" + "\\Zone{AllFiles}{\\fieldFiles}{\\section{Files}\\fieldFiles}\n" + "\\Zone{AllClasses}{\\fieldClasses}{\\section{Classes}\\fieldClasses}\n" "\n" - "\\newlength{\\oldparskip}%\n" - "\\newlength{\\oldparindent}%\n" - "\\newlength{\\oldfboxrule}%\n" + "\\newlength{\\oldparskip}\n" + "\\newlength{\\oldparindent}\n" + "\\newlength{\\oldfboxrule}\n" "\n" - "\\ZoneDepth0%\n" - "\\Letcs{Mode0}1%\n" + "\\ZoneDepth0\\relax\n" + "\\Letcs{Mode0}1\\relax\n" "\n" "\\def\\EmitDoxyDocs{%\n" - "\\setlength{\\oldparskip}{\\parskip}%\n" - "\\setlength{\\oldparindent}{\\parindent}%\n" - "\\setlength{\\oldfboxrule}{\\fboxrule}%\n" - "\\setlength{\\parskip}{0cm}%\n" - "\\setlength{\\parindent}{0cm}%\n" - "\\setlength{\\fboxrule}{1pt}%\n" - "\\AllFiles\\AllClasses%\n" - "\\setlength{\\parskip}{\\oldparskip}%\n" - "\\setlength{\\parindent}{\\oldparindent}%\n" + "\\setlength{\\oldparskip}{\\parskip}\n" + "\\setlength{\\oldparindent}{\\parindent}\n" + "\\setlength{\\oldfboxrule}{\\fboxrule}\n" + "\\setlength{\\parskip}{0cm}\n" + "\\setlength{\\parindent}{0cm}\n" + "\\setlength{\\fboxrule}{1pt}\n" + "\\AllPages\\AllFiles\\AllClasses\n" + "\\setlength{\\parskip}{\\oldparskip}\n" + "\\setlength{\\parindent}{\\oldparindent}\n" "\\setlength{\\fboxrule}{\\oldfboxrule}}\n"; return true; @@ -2467,6 +2668,7 @@ bool PerlModGenerator::generateDoxyLatexTex() "\n" "\\begin{document}\n" "\\input{" << pathDoxyDocsTex << "}\n" + "\\sloppy\n" "\\EmitDoxyDocs\n" "\\end{document}\n"; @@ -2490,29 +2692,29 @@ void PerlModGenerator::generate() bool perlmodLatex = Config_getBool("PERLMOD_LATEX"); pathDoxyDocsPM = perlModDir.absPath() + "/DoxyDocs.pm"; - pathDoxyModelPM = perlModDir.absPath() + "/DoxyModel.pm"; + pathDoxyStructurePM = perlModDir.absPath() + "/DoxyStructure.pm"; pathMakefile = perlModDir.absPath() + "/Makefile"; pathDoxyRules = perlModDir.absPath() + "/doxyrules.make"; if (perlmodLatex) { - pathDoxyTemplateTex = perlModDir.absPath() + "/doxytemplate.tex"; + pathDoxyStructureTex = perlModDir.absPath() + "/doxystructure.tex"; pathDoxyFormatTex = perlModDir.absPath() + "/doxyformat.tex"; pathDoxyLatexTex = perlModDir.absPath() + "/doxylatex.tex"; pathDoxyLatexDVI = perlModDir.absPath() + "/doxylatex.dvi"; pathDoxyLatexPDF = perlModDir.absPath() + "/doxylatex.pdf"; pathDoxyDocsTex = perlModDir.absPath() + "/doxydocs.tex"; pathDoxyLatexPL = perlModDir.absPath() + "/doxylatex.pl"; - pathDoxyLatexTemplatePL = perlModDir.absPath() + "/doxylatex-template.pl"; + pathDoxyLatexStructurePL = perlModDir.absPath() + "/doxylatex-structure.pl"; } if (!(generatePerlModOutput() - && generateDoxyModelPM() + && generateDoxyStructurePM() && generateMakefile() && generateDoxyRules())) return; if (perlmodLatex) { - if (!(generateDoxyLatexTemplatePL() + if (!(generateDoxyLatexStructurePL() && generateDoxyLatexPL() && generateDoxyLatexTex() && generateDoxyFormatTex())) @@ -2522,7 +2724,7 @@ void PerlModGenerator::generate() void generatePerlMod() { - PerlModGenerator pmg; + PerlModGenerator pmg(Config_getBool("PERLMOD_PRETTY")); pmg.generate(); } |