summaryrefslogtreecommitdiffstats
path: root/src/filedef.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-05-12 17:38:45 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-05-12 17:38:45 (GMT)
commit697375aff0beddb756025e867289213dc46ca45f (patch)
tree2f87712e9d2e8da7138ca908bf03c9937ba71bdb /src/filedef.cpp
parent62d3c6501af58ceb48ce8e56327d07ad69e79374 (diff)
downloadDoxygen-697375aff0beddb756025e867289213dc46ca45f.zip
Doxygen-697375aff0beddb756025e867289213dc46ca45f.tar.gz
Doxygen-697375aff0beddb756025e867289213dc46ca45f.tar.bz2
Release-1.2.15-20020512
Diffstat (limited to 'src/filedef.cpp')
-rw-r--r--src/filedef.cpp118
1 files changed, 61 insertions, 57 deletions
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 177cfa6..b48ba25 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -98,6 +98,57 @@ void FileDef::distributeMemberGroupDocumentation()
}
}
+void FileDef::writeDetailedDocumentation(OutputList &ol)
+{
+ if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
+ !documentation().isEmpty()
+ )
+ {
+ ol.writeRuler();
+ ol.pushGeneratorState();
+ //bool latexOn = ol.isEnabled(OutputGenerator::Latex);
+ //if (latexOn) ol.disable(OutputGenerator::Latex);
+ ol.disable(OutputGenerator::Latex);
+ ol.disable(OutputGenerator::RTF);
+ ol.writeAnchor(0,"_details");
+ //if (latexOn) ol.enable(OutputGenerator::Latex);
+ ol.popGeneratorState();
+ ol.startGroupHeader();
+ parseText(ol,theTranslator->trDetailedDescription());
+ ol.endGroupHeader();
+ if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
+ {
+ parseDoc(ol,filepath,1,0,0,briefDescription());
+ }
+ if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
+ !documentation().isEmpty())
+ {
+ ol.newParagraph();
+ }
+ if (!documentation().isEmpty())
+ {
+ //if (doc.at(dl-1)!='.' && doc.at(dl-1)!='!' && doc.at(dl-1)!='?')
+ // doc+='.';
+ parseDoc(ol,filepath,1,0,0,documentation()+"\n");
+ }
+ //printf("Writing source ref for file %s\n",name().data());
+ if (Config_getBool("SOURCE_BROWSER"))
+ {
+ ol.newParagraph();
+ QCString refText = theTranslator->trDefinedInSourceFile();
+ int fileMarkerPos = refText.find("@0");
+ if (fileMarkerPos!=-1) // should always pass this.
+ {
+ parseText(ol,refText.left(fileMarkerPos)); //text left from marker 1
+ ol.writeObjectLink(0,getSourceFileBase(),
+ 0,name());
+ parseText(ol,refText.right(
+ refText.length()-fileMarkerPos-2)); // text right from marker 2
+ }
+ }
+ }
+}
+
/*! Write the documentation page for this file to the file of output
generators \a ol.
*/
@@ -132,15 +183,13 @@ void FileDef::writeDocumentation(OutputList &ol)
}
ol.startTextBlock();
- //brief=brief.stripWhiteSpace();
- //int bl=brief.length();
- OutputList briefOutput(&ol);
- if (briefDescription())
+ if (Config_getBool("DETAILS_AT_TOP"))
+ {
+ writeDetailedDocumentation(ol);
+ }
+ else if (briefDescription())
{
- //if (brief.at(bl-1)!='.' && brief.at(bl-1)!='!' && brief.at(bl!='?'))
- // brief+='.';
- parseDoc(briefOutput,filepath,1,0,0,briefDescription());
- ol+=briefOutput;
+ parseDoc(ol,filepath,1,0,0,briefDescription());
ol.writeString(" \n");
ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(0,"_details");
@@ -198,6 +247,8 @@ void FileDef::writeDocumentation(OutputList &ol)
const char *locStr = (ii->local || isIDLorJava) ? "yes" : "no";
Doxygen::tagFile << " <includes id=\""
<< convertToXML(fd->getOutputFileBase())
+ << "\" name=\""
+ << convertToXML(fd->name())
<< "\" local=\"" << locStr << "\">"
<< convertToXML(ii->includeName)
<< "</includes>"
@@ -347,56 +398,9 @@ void FileDef::writeDocumentation(OutputList &ol)
decVarMembers.writeDeclarations(ol,0,0,this,0,theTranslator->trVariables(),0);
ol.endMemberSections();
- //doc=doc.stripWhiteSpace();
- //int bl=brief.length();
- //int dl=doc.length();
- if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
- !documentation().isEmpty()
- /* || startBodyLine!=-1 */
- )
+ if (!Config_getBool("DETAILS_AT_TOP"))
{
- ol.writeRuler();
- ol.pushGeneratorState();
- //bool latexOn = ol.isEnabled(OutputGenerator::Latex);
- //if (latexOn) ol.disable(OutputGenerator::Latex);
- ol.disable(OutputGenerator::Latex);
- ol.disable(OutputGenerator::RTF);
- ol.writeAnchor(0,"_details");
- //if (latexOn) ol.enable(OutputGenerator::Latex);
- ol.popGeneratorState();
- ol.startGroupHeader();
- parseText(ol,theTranslator->trDetailedDescription());
- ol.endGroupHeader();
- if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
- {
- ol+=briefOutput;
- }
- if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
- !documentation().isEmpty())
- {
- ol.newParagraph();
- }
- if (!documentation().isEmpty())
- {
- //if (doc.at(dl-1)!='.' && doc.at(dl-1)!='!' && doc.at(dl-1)!='?')
- // doc+='.';
- parseDoc(ol,filepath,1,0,0,documentation()+"\n");
- }
- //printf("Writing source ref for file %s\n",name().data());
- if (Config_getBool("SOURCE_BROWSER"))
- {
- ol.newParagraph();
- QCString refText = theTranslator->trDefinedInSourceFile();
- int fileMarkerPos = refText.find("@0");
- if (fileMarkerPos!=-1) // should always pass this.
- {
- parseText(ol,refText.left(fileMarkerPos)); //text left from marker 1
- ol.writeObjectLink(0,getSourceFileBase(),
- 0,name());
- parseText(ol,refText.right(
- refText.length()-fileMarkerPos-2)); // text right from marker 2
- }
- }
+ writeDetailedDocumentation(ol);
}
docDefineMembers.writeDocumentation(ol,name(),this,