diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2005-03-15 19:18:42 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2005-03-15 19:18:42 (GMT) |
commit | 2fcc16df64d2af93fc0bb01617f8531116118e8d (patch) | |
tree | 504aa22719248b74962bee0517b645cfabab52d2 /src/pagedef.cpp | |
parent | 5a6400835bc92fb56ef65126785cbe75f092f2d1 (diff) | |
download | Doxygen-2fcc16df64d2af93fc0bb01617f8531116118e8d.zip Doxygen-2fcc16df64d2af93fc0bb01617f8531116118e8d.tar.gz Doxygen-2fcc16df64d2af93fc0bb01617f8531116118e8d.tar.bz2 |
Release-1.4.1-20050315
Diffstat (limited to 'src/pagedef.cpp')
-rw-r--r-- | src/pagedef.cpp | 87 |
1 files changed, 86 insertions, 1 deletions
diff --git a/src/pagedef.cpp b/src/pagedef.cpp index 36b63a0..b54a937 100644 --- a/src/pagedef.cpp +++ b/src/pagedef.cpp @@ -1,6 +1,10 @@ #include "pagedef.h" #include "groupdef.h" #include "docparser.h" +#include "config.h" +#include "util.h" +#include "outputlist.h" +#include "doxygen.h" PageDef::PageDef(const char *f,int l,const char *n, @@ -8,11 +12,12 @@ PageDef::PageDef(const char *f,int l,const char *n, : Definition(f,l,n), m_title(t) { setDocumentation(d,f,l); - + subPageDict = new PageSDict(7); } PageDef::~PageDef() { + delete subPageDict; } void PageDef::findSectionsInDocumentation() @@ -33,3 +38,83 @@ QCString PageDef::getOutputFileBase() const return m_fileName; } +void PageDef::addInnerCompound(Definition *def) +{ + if (def->definitionType()==Definition::TypePage) + { + PageDef *pd = (PageDef*)def; + subPageDict->append(pd->name(),pd); + def->setOuterScope(this); + } +} + +void PageDef::writeDocumentation(OutputList &ol) +{ + //outputList->disable(OutputGenerator::Man); + QCString pageName; + if (Config_getBool("CASE_SENSE_NAMES")) + pageName=name(); + else + pageName=name().lower(); + + startFile(ol,pageName,pageName,title()); + + if (getOuterScope()!=Doxygen::globalScope) + { + getOuterScope()->writeNavigationPath(ol); + } + + // save old generator state and write title only to Man generator + ol.pushGeneratorState(); + ol.disableAllBut(OutputGenerator::Man); + ol.startTitleHead(pageName); + ol.endTitleHead(pageName, pageName); + ol.popGeneratorState(); + + SectionInfo *si=0; + if (!title().isEmpty() && !name().isEmpty() && + (si=Doxygen::sectionDict.find(pageName))!=0) + { + ol.startSection(si->label,si->title,si->type); + ol.docify(si->title); + ol.endSection(si->label,si->type); + } + ol.startTextBlock(); + ol.parseDoc(docFile(), // fileName + docLine(), // startLine + this, // context + 0, // memberdef + documentation(), // docStr + TRUE, // index words + FALSE // not an example + ); + ol.endTextBlock(); + endFile(ol); + //outputList->enable(OutputGenerator::Man); + + if (!Config_getString("GENERATE_TAGFILE").isEmpty()) + { + bool found=FALSE; + QDictIterator<RefList> rli(*Doxygen::xrefLists); + RefList *rl; + for (rli.toFirst();(rl=rli.current());++rli) + { + if (rl->listName()==name()) + { + found=TRUE; + break; + } + } + if (!found) // not one of the generated related pages + { + Doxygen::tagFile << " <compound kind=\"page\">" << endl; + Doxygen::tagFile << " <name>" << name() << "</name>" << endl; + Doxygen::tagFile << " <title>" << convertToXML(title()) << "</title>" << endl; + Doxygen::tagFile << " <filename>" << getOutputFileBase() << "</filename>" << endl; + writeDocAnchorsToTagFile(); + Doxygen::tagFile << " </compound>" << endl; + } + } +} + + |