diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2005-03-15 19:18:42 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2005-03-15 19:18:42 (GMT) |
commit | b91d710ef9e95feffbb1c97d3fc7695157e0731e (patch) | |
tree | 504aa22719248b74962bee0517b645cfabab52d2 /src/pagedef.cpp | |
parent | 42eb3f9c14016086a2d2b18951585816eaf7bcab (diff) | |
download | Doxygen-b91d710ef9e95feffbb1c97d3fc7695157e0731e.zip Doxygen-b91d710ef9e95feffbb1c97d3fc7695157e0731e.tar.gz Doxygen-b91d710ef9e95feffbb1c97d3fc7695157e0731e.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; + } + } +} + + |