Doxygen
Loading...
Searching...
No Matches
PageDefImpl Class Referencefinal
Inheritance diagram for PageDefImpl:
Collaboration diagram for PageDefImpl:

Public Member Functions

 PageDefImpl (const DString &f, int l, const DString &n, const DString &d, const DString &t)
 ~PageDefImpl () override
void setFileName (const DString &name) override
void setLocalToc (const LocalToc &tl) override
void setShowLineNo (bool) override
DefType definitionType () const override
CodeSymbolType codeSymbolType () const override
bool isLinkableInProject () const override
bool isLinkable () const override
DString getOutputFileBase () const override
DString anchor () const override
void findSectionsInDocumentation () override
DString title () const override
DString titleAsText () const override
const GroupDefgetGroupDef () const override
const PageLinkedRefMapgetSubPages () const override
void addInnerCompound (Definition *d) override
bool visibleInIndex () const override
bool documentedPage () const override
bool hasSubPages () const override
bool hasParentPage () const override
bool hasTitle () const override
LocalToc localToc () const override
void setPageScope (Definition *d) override
DefinitiongetPageScope () const override
DString displayName (bool=true) const override
bool showLineNo () const override
void setTitle (const DString &title) override
void writeDocumentation (OutputList &ol) override
void writeTagFile (TextStream &) override
void setNestingLevel (int l) override
void writePageDocumentation (OutputList &ol) const override
void addSectionsToIndex () override
void writePageNavigation (OutputList &ol) const override
void addListReferences () override
void addRequirementReferences () override
Public Member Functions inherited from DefinitionMixin< PageDef >
 DefinitionMixin (const DString &defFileName, int defLine, size_t defColumn, const DString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=true)
DefinitionMixinoperator= (const DefinitionMixin &other)
 ~DefinitionMixin () override=default
bool isAlias () const override
const DStringname () const override
bool isAnonymous () const override
const DStringlocalName () const override
DString qualifiedName () const override
DString symbolName () const override
DString getSourceFileBase () const override
DString getSourceAnchor () const override
DString documentation () const override
int docLine () const override
DString docFile () const override
DString briefDescription (bool abbreviate=false) const override
DString briefDescriptionAsTooltip () const override
int briefLine () const override
DString inbodyDocumentation () const override
DString inbodyFile () const override
int inbodyLine () const override
DString briefFile () const override
DString getDefFileName () const override
DString getDefFileExtension () const override
int getDefLine () const override
size_t getDefColumn () const override
bool hasDocumentation () const override
bool hasUserDocumentation () const override
bool isVisibleInProject () const override
bool isVisible () const override
bool isHidden () const override
bool isArtificial () const override
bool isExported () const override
DString getReference () const override
bool isReference () const override
DString externalReference (const DString &relPath) const override
int getStartDefLine () const override
int getStartBodyLine () const override
int getEndBodyLine () const override
const FileDefgetBodyDef () const override
SrcLangExt getLanguage () const override
const GroupListpartOfGroups () const override
bool isLinkableViaGroup () const override
const RefItemVectorxrefListItems () const override
const RequirementRefsrequirementReferences () const override
const DefinitionfindInnerCompound (const DString &name) const override
DefinitiongetOuterScope () const override
const MemberVectorgetReferencesMembers () const override
const MemberVectorgetReferencedByMembers () const override
bool hasSections () const override
bool hasSources () const override
bool hasBriefDescription () const override
DString id () const override
const SectionRefsgetSectionRefs () const override
void setName (const DString &name) override
void setId (const DString &name) override
void setDefFile (const DString &df, int defLine, size_t defColumn) override
void setDocumentation (const DString &doc, const DString &docFile, int docLine, bool stripWhiteSpace=true) override
void setBriefDescription (const DString &brief, const DString &briefFile, int briefLine) override
void setInbodyDocumentation (const DString &doc, const DString &docFile, int docLine) override
void setReference (const DString &r) override
void addSectionsToDefinition (const std::vector< const SectionInfo * > &anchorList) override
void setBodySegment (int defLine, int bls, int ble) override
void setBodyDef (const FileDef *fd) override
void addSourceReferencedBy (MemberDef *md, const DString &sourceRefName) override
void addSourceReferences (MemberDef *md, const DString &sourceRefName) override
void setRefItems (const RefItemVector &sli) override
void setRequirementReferences (const RequirementRefs &rqli) override
void mergeRefItems (Definition *def) override
void mergeReferences (const Definition *other) override
void mergeReferencedBy (const Definition *other) override
void setOuterScope (Definition *def) override
void setHidden (bool b) override
void setArtificial (bool b) override
void setExported (bool b) override
void setLanguage (SrcLangExt lang) override
void writeSourceDef (OutputList &ol) const override
void writeInlineCode (OutputList &ol, const DString &scopeName) const override
bool hasSourceRefs () const override
bool hasSourceReffedBy () const override
void writeSourceRefs (OutputList &ol, const DString &scopeName) const override
void writeSourceReffedBy (OutputList &ol, const DString &scopeName) const override
bool hasRequirementRefs () const override
void writeRequirementRefs (OutputList &ol) const override
void makePartOfGroup (GroupDef *gd) override
void writeNavigationPath (OutputList &ol) const override
DString navigationPathAsString () const override
void writeQuickMemberLinks (OutputList &ol, const MemberDef *md) const override
void writeSummaryLinks (OutputList &ol) const override
DString pathFragment () const override
void writeDocAnchorsToTagFile (TextStream &fs) const override
void setLocalName (const DString &name) override
void writeToc (OutputList &ol, const LocalToc &lt) const override
void computeTooltip () override
void _setSymbolName (const DString &name) override
DString _symbolName () const override

Private Attributes

DString m_fileName
DString m_title
DString m_titleAsText
PageLinkedRefMap m_subPages
Definitionm_pageScope
int m_nestingLevel
LocalToc m_localToc
bool m_showLineNo

Additional Inherited Members

Public Types inherited from Definition
enum  DefType {
  TypeClass = 0 , TypeFile = 1 , TypeNamespace = 2 , TypeModule = 3 ,
  TypeMember = 4 , TypeGroup = 5 , TypePackage = 6 , TypePage = 7 ,
  TypeDir = 8 , TypeConcept = 9
}

Detailed Description

Definition at line 36 of file pagedef.cpp.

Constructor & Destructor Documentation

◆ PageDefImpl()

PageDefImpl::PageDefImpl ( const DString & f,
int l,
const DString & n,
const DString & d,
const DString & t )

Definition at line 96 of file pagedef.cpp.

98 : DefinitionMixin(f,l,1,n)
99{
100 setDocumentation(d,f,l);
101 m_pageScope = nullptr;
102 m_nestingLevel = 0;
103 m_fileName = ::convertNameToFile(n,false,true);
104 m_showLineNo = false;
105 setTitle(t);
106}
void setDocumentation(const DString &doc, const DString &docFile, int docLine, bool stripWhiteSpace=true) override
DefinitionMixin(const DString &defFileName, int defLine, size_t defColumn, const DString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=true)
DString m_fileName
Definition pagedef.cpp:79
bool m_showLineNo
Definition pagedef.cpp:86
Definition * m_pageScope
Definition pagedef.cpp:83
void setTitle(const DString &title) override
Definition pagedef.cpp:503
int m_nestingLevel
Definition pagedef.cpp:84
DString convertNameToFile(const DString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:2863

References convertNameToFile(), DefinitionMixin< PageDef >::DefinitionMixin(), m_fileName, m_nestingLevel, m_pageScope, m_showLineNo, DefinitionMixin< PageDef >::setDocumentation(), and setTitle().

◆ ~PageDefImpl()

PageDefImpl::~PageDefImpl ( )
override

Definition at line 108 of file pagedef.cpp.

109{
110}

Member Function Documentation

◆ addInnerCompound()

void PageDefImpl::addInnerCompound ( Definition * d)
overridevirtual

Reimplemented from DefinitionMixin< PageDef >.

Definition at line 137 of file pagedef.cpp.

138{
139 if (def->definitionType()==Definition::TypePage)
140 {
141 PageDef *pd = toPageDef(def);
142 if (pd)
143 {
144 m_subPages.add(pd->name(),pd);
145 pd->setOuterScope(this);
146 if (this==Doxygen::mainPage.get())
147 {
149 }
150 else
151 {
153 }
154 }
155 }
156}
virtual const DString & name() const =0
virtual void setOuterScope(Definition *d)=0
static std::unique_ptr< PageDef > mainPage
Definition doxygen.h:93
bool add(const char *k, T *obj)
Definition linkedmap.h:284
virtual void setNestingLevel(int)=0
PageLinkedRefMap m_subPages
Definition pagedef.cpp:82
PageDef * toPageDef(Definition *d)
Definition pagedef.cpp:656

References LinkedRefMap< T, Hash, KeyEqual, Map >::add(), Definition::definitionType(), m_nestingLevel, m_subPages, Doxygen::mainPage, Definition::name(), PageDef::setNestingLevel(), DefinitionMutable::setOuterScope(), toPageDef(), and Definition::TypePage.

◆ addListReferences()

void PageDefImpl::addListReferences ( )
overridevirtual

Implements PageDef.

Definition at line 212 of file pagedef.cpp.

213{
214 DString name = getOutputFileBase();
215 if (getGroupDef())
216 {
218 }
220 theTranslator->trPage(true,true),
221 name,title(),DString(),nullptr);
222}
virtual DString getOutputFileBase() const =0
const RefItemVector & xrefListItems() const override
DString getOutputFileBase() const override
Definition pagedef.cpp:124
DString title() const override
Definition pagedef.cpp:53
const GroupDef * getGroupDef() const override
Definition pagedef.cpp:119
virtual DString trPage(bool first_capital, bool singular)=0
Translator * theTranslator
Definition language.cpp:76
void addRefItem(const RefItemVector &sli, const DString &key, const DString &prefix, const DString &name, const DString &title, const DString &args, const Definition *scope)
Definition reflist.h:134

References addRefItem(), getGroupDef(), Definition::getOutputFileBase(), getOutputFileBase(), DefinitionMixin< PageDef >::name(), theTranslator, title(), Translator::trPage(), and DefinitionMixin< PageDef >::xrefListItems().

◆ addRequirementReferences()

void PageDefImpl::addRequirementReferences ( )
overridevirtual

Implements PageDef.

Definition at line 224 of file pagedef.cpp.

225{
227}
static RequirementManager & instance()
void addRequirementRefsForSymbol(const Definition *symbol)

References RequirementManager::addRequirementRefsForSymbol(), and RequirementManager::instance().

◆ addSectionsToIndex()

void PageDefImpl::addSectionsToIndex ( )
overridevirtual

Implements PageDef.

Definition at line 158 of file pagedef.cpp.

159{
160 const SectionRefs &sectionRefs = getSectionRefs();
161 if (sectionRefs.empty()) return;
162 //printf("PageDefImpl::addSectionsToIndex()\n");
163 int level=1;
164 for (auto it = sectionRefs.begin(); it!=sectionRefs.end(); ++it)
165 {
166 const SectionInfo *si = *it;
167 SectionType type = si->type();
168 if (type.isSection())
169 {
170 //printf(" level=%d title=%s\n",level,qPrint(si->title));
171 int nextLevel = type.level();
172 if (nextLevel>level)
173 {
174 for (int i=level;i<nextLevel;i++)
175 {
177 }
178 }
179 else if (nextLevel<level)
180 {
181 for (int i=nextLevel;i<level;i++)
182 {
184 }
185 }
186 DString title = si->title();
187 if (title.empty()) title = si->label();
188 title = parseCommentAsText(this,nullptr,title,si->fileName(),si->lineNr());
189 DString titleAsHtml = parseCommentAsHtml(this,nullptr,si->title(),si->fileName(),si->lineNr());
190 // determine if there is a next level inside this item, but be aware of the anchor and table section references.
191 auto it_next = std::next(it);
192 bool isDir = (it_next!=sectionRefs.end()) ? ((*it_next)->type().isSection() && (*it_next)->type().level() > nextLevel) : false;
193 Doxygen::indexList->addContentsItem(isDir, // isDir
194 title, // name
195 getReference(), // ref
196 getOutputFileBase(), // file
197 si->label(), // anchor
198 false, // separateIndex
199 true, // addToNavIndex
200 nullptr, // def
201 titleAsHtml); // nameAsHtml
202 level = nextLevel;
203 }
204 }
205 while (level>1)
206 {
208 level--;
209 }
210}
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
Definition dstring.h:148
DString getReference() const override
const SectionRefs & getSectionRefs() const override
static IndexList * indexList
Definition doxygen.h:125
void decContentsDepth()
Definition indexlist.h:110
void addContentsItem(bool isDir, const DString &name, const DString &ref, const DString &file, const DString &anchor, bool separateIndex=false, bool addToNavIndex=false, const Definition *def=nullptr, const DString &nameAsHtml=DString())
Definition indexlist.h:113
void incContentsDepth()
Definition indexlist.h:107
DString fileName() const
Definition section.h:74
int lineNr() const
Definition section.h:73
SectionType type() const
Definition section.h:71
DString title() const
Definition section.h:70
DString label() const
Definition section.h:69
bool empty() const
Definition section.h:125
const_iterator end() const
Definition section.h:124
const_iterator begin() const
Definition section.h:123
constexpr bool isSection() const
Definition section.h:47
constexpr int level() const
Definition section.h:46
DString parseCommentAsText(const Definition *scope, const MemberDef *md, const DString &doc, const DString &fileName, int lineNr)
DString parseCommentAsHtml(const Definition *scope, const MemberDef *member, const DString &doc, const DString &fileName, int lineNr)

References IndexList::addContentsItem(), SectionRefs::begin(), IndexList::decContentsDepth(), DString::empty(), SectionRefs::empty(), SectionRefs::end(), SectionInfo::fileName(), getOutputFileBase(), DefinitionMixin< PageDef >::getReference(), DefinitionMixin< PageDef >::getSectionRefs(), IndexList::incContentsDepth(), Doxygen::indexList, SectionType::isSection(), SectionInfo::label(), SectionType::level(), SectionInfo::lineNr(), parseCommentAsHtml(), parseCommentAsText(), title(), SectionInfo::title(), and SectionInfo::type().

◆ anchor()

DString PageDefImpl::anchor ( ) const
inlineoverridevirtual

Returns the anchor within a page where this item can be found

Implements Definition.

Definition at line 51 of file pagedef.cpp.

51{ return DString(); }

◆ codeSymbolType()

CodeSymbolType PageDefImpl::codeSymbolType ( ) const
inlineoverridevirtual

Used for syntax highlighting symbol class

Implements Definition.

Definition at line 47 of file pagedef.cpp.

References Default.

◆ definitionType()

DefType PageDefImpl::definitionType ( ) const
inlineoverridevirtual

Use this for dynamic inspection of the type of the derived class

Implements Definition.

Definition at line 46 of file pagedef.cpp.

46{ return TypePage; }

References Definition::TypePage.

◆ displayName()

DString PageDefImpl::displayName ( bool includeScope = true) const
inlineoverridevirtual

Returns the name of the definition as it appears in the output

Implements Definition.

Definition at line 66 of file pagedef.cpp.

66{ return hasTitle() ? m_title : DefinitionMixin::name(); }
const DString & name() const override
bool hasTitle() const override
Definition pagedef.cpp:498
DString m_title
Definition pagedef.cpp:80

References hasTitle(), m_title, and DefinitionMixin< Base >::name().

◆ documentedPage()

bool PageDefImpl::documentedPage ( ) const
overridevirtual

Implements PageDef.

Definition at line 465 of file pagedef.cpp.

466{
467 return // not part of a group
468 !getGroupDef() &&
469 // not an externally defined page
470 !isReference();
471}
bool isReference() const override

References getGroupDef(), and DefinitionMixin< PageDef >::isReference().

◆ findSectionsInDocumentation()

void PageDefImpl::findSectionsInDocumentation ( )
overridevirtual

Implements PageDef.

Definition at line 112 of file pagedef.cpp.

113{
117}
DString docFile() const override
DString briefDescription(bool abbreviate=false) const override
DString documentation() const override
DString inbodyDocumentation() const override
void docFindSections(const DString &input, const Definition *d, const DString &fileName)

References DefinitionMixin< PageDef >::briefDescription(), DefinitionMixin< PageDef >::docFile(), docFindSections(), DefinitionMixin< PageDef >::documentation(), and DefinitionMixin< PageDef >::inbodyDocumentation().

◆ getGroupDef()

const GroupDef * PageDefImpl::getGroupDef ( ) const
overridevirtual

Implements PageDef.

Definition at line 119 of file pagedef.cpp.

120{
121 return !partOfGroups().empty() ? partOfGroups().front() : nullptr;
122}
const GroupList & partOfGroups() const override

References DefinitionMixin< PageDef >::partOfGroups().

Referenced by addListReferences(), documentedPage(), getOutputFileBase(), and visibleInIndex().

◆ getOutputFileBase()

DString PageDefImpl::getOutputFileBase ( ) const
overridevirtual

Returns the base file name (without extension) of this definition. as it is referenced to/written to disk.

Implements Definition.

Definition at line 124 of file pagedef.cpp.

125{
126 if (getGroupDef())
127 return getGroupDef()->getOutputFileBase();
128 else
129 return m_fileName;
130}

References getGroupDef(), Definition::getOutputFileBase(), and m_fileName.

Referenced by addListReferences(), addSectionsToIndex(), writeDocumentation(), and writeTagFile().

◆ getPageScope()

Definition * PageDefImpl::getPageScope ( ) const
inlineoverridevirtual

Implements PageDef.

Definition at line 65 of file pagedef.cpp.

65{ return m_pageScope; }

References m_pageScope.

◆ getSubPages()

const PageLinkedRefMap & PageDefImpl::getSubPages ( ) const
inlineoverridevirtual

Implements PageDef.

Definition at line 56 of file pagedef.cpp.

56{ return m_subPages; }

References m_subPages.

◆ hasParentPage()

bool PageDefImpl::hasParentPage ( ) const
overridevirtual

Implements PageDef.

Definition at line 229 of file pagedef.cpp.

230{
231 return getOuterScope() &&
233}
virtual DefType definitionType() const =0
Definition * getOuterScope() const override

References Definition::definitionType(), DefinitionMixin< PageDef >::getOuterScope(), and Definition::TypePage.

◆ hasSubPages()

bool PageDefImpl::hasSubPages ( ) const
overridevirtual

Implements PageDef.

Definition at line 473 of file pagedef.cpp.

474{
475 return !m_subPages.empty();
476}
bool empty() const
Definition linkedmap.h:374

References LinkedRefMap< T, Hash, KeyEqual, Map >::empty(), and m_subPages.

Referenced by writePageDocumentation().

◆ hasTitle()

bool PageDefImpl::hasTitle ( ) const
overridevirtual

Implements PageDef.

Definition at line 498 of file pagedef.cpp.

499{
500 return !m_title.empty() && m_title.lower()!="notitle";
501}
DString lower() const
Definition dstring.h:326

References DString::empty(), DString::lower(), and m_title.

Referenced by displayName(), and writeDocumentation().

◆ isLinkable()

bool PageDefImpl::isLinkable ( ) const
inlineoverridevirtual

Returns true iff it is possible to link to this item. This can be a link to another project imported via a tag file.

Implements Definition.

Definition at line 49 of file pagedef.cpp.

49{ return isLinkableInProject() || isReference(); }
bool isLinkableInProject() const override
Definition pagedef.cpp:48

References isLinkableInProject(), and DefinitionMixin< PageDef >::isReference().

◆ isLinkableInProject()

bool PageDefImpl::isLinkableInProject ( ) const
inlineoverridevirtual

Returns true iff it is possible to link to this item within this project.

Implements Definition.

Definition at line 48 of file pagedef.cpp.

48{ return /*hasDocumentation() &&*/ !isReference(); }

References DefinitionMixin< PageDef >::isReference().

Referenced by isLinkable().

◆ localToc()

LocalToc PageDefImpl::localToc ( ) const
inlineoverridevirtual

Implements PageDef.

Definition at line 63 of file pagedef.cpp.

63{ return m_localToc; }
LocalToc m_localToc
Definition pagedef.cpp:85

References m_localToc.

◆ setFileName()

void PageDefImpl::setFileName ( const DString & name)
overridevirtual

Implements PageDef.

Definition at line 132 of file pagedef.cpp.

133{
135}

References m_fileName, and DefinitionMixin< PageDef >::name().

◆ setLocalToc()

void PageDefImpl::setLocalToc ( const LocalToc & tl)
overridevirtual

Implements PageDef.

Definition at line 483 of file pagedef.cpp.

484{
485 m_localToc = lt;
486}

References m_localToc.

◆ setNestingLevel()

void PageDefImpl::setNestingLevel ( int l)
overridevirtual

Implements PageDef.

Definition at line 478 of file pagedef.cpp.

479{
480 m_nestingLevel = l;
481}

References m_nestingLevel.

◆ setPageScope()

void PageDefImpl::setPageScope ( Definition * d)
inlineoverridevirtual

Implements PageDef.

Definition at line 64 of file pagedef.cpp.

64{ m_pageScope = d; }

References m_pageScope.

◆ setShowLineNo()

void PageDefImpl::setShowLineNo ( bool b)
overridevirtual

Implements PageDef.

Definition at line 488 of file pagedef.cpp.

489{
490 m_showLineNo = b;
491}

References m_showLineNo.

◆ setTitle()

void PageDefImpl::setTitle ( const DString & title)
overridevirtual

Implements PageDef.

Definition at line 503 of file pagedef.cpp.

504{
505 if (!title.empty())
506 {
507 m_title = title;
509 }
510 else
511 {
512 m_title = name();
514 }
515}
int docLine() const override
DString m_titleAsText
Definition pagedef.cpp:81

References DefinitionMixin< PageDef >::docFile(), DefinitionMixin< PageDef >::docLine(), DString::empty(), m_title, m_titleAsText, DefinitionMixin< PageDef >::name(), parseCommentAsText(), and title().

Referenced by PageDefImpl().

◆ showLineNo()

bool PageDefImpl::showLineNo ( ) const
overridevirtual

Implements PageDef.

Definition at line 493 of file pagedef.cpp.

494{
495 return m_showLineNo;
496}

References m_showLineNo.

◆ title()

DString PageDefImpl::title ( ) const
inlineoverridevirtual

Implements PageDef.

Definition at line 53 of file pagedef.cpp.

53{ return m_title; }

References m_title.

Referenced by addListReferences(), addSectionsToIndex(), setTitle(), writeDocumentation(), and writeTagFile().

◆ titleAsText()

DString PageDefImpl::titleAsText ( ) const
overridevirtual

Implements PageDef.

Definition at line 517 of file pagedef.cpp.

518{
519 return m_titleAsText;
520}

References m_titleAsText.

Referenced by writeDocumentation().

◆ visibleInIndex()

bool PageDefImpl::visibleInIndex ( ) const
overridevirtual

Implements PageDef.

Definition at line 456 of file pagedef.cpp.

457{
458 bool externalPages = Config_getBool(EXTERNAL_PAGES);
459 return // not part of a group
460 !getGroupDef() &&
461 // not an externally defined page
462 (!isReference() || externalPages);
463}
#define Config_getBool(name)
Definition config.h:33

References Config_getBool, getGroupDef(), and DefinitionMixin< PageDef >::isReference().

◆ writeDocumentation()

void PageDefImpl::writeDocumentation ( OutputList & ol)
overridevirtual

Implements PageDef.

Definition at line 265 of file pagedef.cpp.

266{
267 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
268 int hierarchyLevel = -1; // Pages start at the root
269 PageDef *pd = this;
270 while (pd && pd->hasParentPage())
271 {
272 pd = dynamic_cast<PageDef *>(pd->getOuterScope());
273 ++hierarchyLevel;
274 }
275
276 //outputList->disable(OutputType::Man);
277 DString pageName,manPageName;
278 pageName = escapeCharsInString(name(),false,true);
279 manPageName = escapeCharsInString(name(),true,true);
280
281 //printf("PageDefImpl::writeDocumentation: %s\n",getOutputFileBase().data());
282
284 //1.{
285
287 //2.{
289 startFile(ol,getOutputFileBase(),false,manPageName,titleAsText(),HighlightedItem::Pages,!generateTreeView,
290 DString() /* altSidebarName */, hierarchyLevel);
291 ol.enableAll();
293 startFile(ol,getOutputFileBase(),false,pageName,titleAsText(),HighlightedItem::Pages,!generateTreeView,
294 DString() /* altSidebarName */, hierarchyLevel);
296 //2.}
297
298 if (!generateTreeView)
299 {
300 if (getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX))
301 {
302 DefinitionMutable *outerScope = toDefinitionMutable(getOuterScope());
303 if (outerScope)
304 {
305 outerScope->writeNavigationPath(ol);
306 }
307 }
308 ol.endQuickIndices();
309 }
310 const SectionInfo *si=SectionManager::instance().find(name());
311
312 // save old generator state and write title only to Man generator
314 //2.{
316 ol.startTitleHead(manPageName);
317 ol.endTitleHead(manPageName, manPageName);
318 if (si)
319 {
320 ol.writeString(" - ");
321
322 if (si->title() != manPageName)
323 {
324 ol.generateDoc(docFile(),
326 this,
327 nullptr,
328 si->title(),
329 DocOptions()
330 .setSingleLine(true)
331 .setAutolinkSupport(false));
332 ol.endSection(si->label(),si->type());
333 }
334 }
336 //2.}
337
339 //2.{
341 DString title;
342 if (this == Doxygen::mainPage.get() && !hasTitle())
344 else
345 title = m_title;
346
347 if (!title.empty() && !name().empty() && si!=nullptr)
348 {
349 ol.startPageDoc(si->title());
352 ol.generateDoc(docFile(),
354 this,
355 nullptr,
356 title,
357 DocOptions()
358 .setIndexWords(true)
359 .setSingleLine(true)
360 .setAutolinkSupport(false));
362 ol.endHeaderSection();
363 }
364 else
365 {
366 ol.startPageDoc("");
367 }
369 //2.}
370
371 bool pageWithSections = hasSections();
372 ol.startContents();
374 && pageWithSections)
375 {
376 writeToc(ol, m_localToc);
377 }
378
380 ol.endContents();
381 ol.endPageDoc();
382
383 if (generateTreeView && getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX))
384 {
385 endFileWithNavPath(ol,toDefinitionMutable(const_cast<Definition*>(getOuterScope())));
386 }
387 else
388 {
389 if (generateTreeView && Config_getBool(PAGE_OUTLINE_PANEL) && pageWithSections)
390 {
393 ol.writeString("</div><!-- doc-content -->\n");
395 ol.writeString("</div><!-- container -->\n");
397 endFile(ol,true);
398 }
399 else
400 {
401 endFile(ol,false,true);
402 }
403 }
404
406 //1.}
407}
virtual Definition * getOuterScope() const =0
friend DefinitionMutable * toDefinitionMutable(Definition *)
int getStartBodyLine() const override
void writeToc(OutputList &ol, const LocalToc &lt) const override
bool hasSections() const override
virtual void writeNavigationPath(OutputList &ol) const =0
static NamespaceDefMutable * globalScope
Definition doxygen.h:114
const T * find(const std::string &key) const
Definition linkedmap.h:47
constexpr bool isDocbookEnabled() const noexcept
Definition types.h:657
constexpr bool isLatexEnabled() const noexcept
Definition types.h:655
constexpr bool isHtmlEnabled() const noexcept
Definition types.h:654
void startTitleHead(const DString &fileName)
Definition outputlist.h:399
void endTitleHead(const DString &fileName, const DString &name)
Definition outputlist.h:401
void disable(OutputType o)
void endContents()
Definition outputlist.h:616
void endHeaderSection()
Definition outputlist.h:463
void startHeaderSection()
Definition outputlist.h:461
void endPageDoc()
Definition outputlist.h:620
void writeString(const DString &text)
Definition outputlist.h:407
void endSection(const DString &lab, SectionType t)
Definition outputlist.h:584
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void startPageDoc(const DString &pageTitle)
Definition outputlist.h:618
void endQuickIndices()
Definition outputlist.h:600
void generateDoc(const DString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const DString &docStr, const DocOptions &options)
void startContents()
Definition outputlist.h:614
void enableAll()
virtual bool hasParentPage() const =0
void writePageNavigation(OutputList &ol) const override
Definition pagedef.cpp:451
DString titleAsText() const override
Definition pagedef.cpp:517
void writePageDocumentation(OutputList &ol) const override
Definition pagedef.cpp:409
static SectionManager & instance()
returns a reference to the singleton
Definition section.h:179
virtual DString trMainPage()=0
void endFileWithNavPath(OutputList &ol, const DefinitionMutable *d, bool showPageNavigation)
Definition index.cpp:452
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const DString &navPath)
Definition index.cpp:431
void startFile(OutputList &ol, const DString &name, bool isSource, const DString &manName, const DString &title, HighlightedItem hli, bool additionalIndices, const DString &altSidebarName, int hierarchyLevel, const DString &allMembersFile)
Definition index.cpp:405
DString escapeCharsInString(const DString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:2688

References Config_getBool, OutputList::disable(), OutputList::disableAllBut(), DefinitionMixin< PageDef >::docFile(), DString::empty(), OutputList::enableAll(), OutputList::endContents(), endFile(), endFileWithNavPath(), OutputList::endHeaderSection(), OutputList::endPageDoc(), OutputList::endQuickIndices(), OutputList::endSection(), OutputList::endTitleHead(), escapeCharsInString(), LinkedMap< T, Hash, KeyEqual, Map >::find(), OutputList::generateDoc(), Definition::getOuterScope(), DefinitionMixin< PageDef >::getOuterScope(), getOutputFileBase(), DefinitionMixin< PageDef >::getStartBodyLine(), Doxygen::globalScope, PageDef::hasParentPage(), DefinitionMixin< PageDef >::hasSections(), hasTitle(), Html, SectionManager::instance(), LocalToc::isDocbookEnabled(), LocalToc::isHtmlEnabled(), LocalToc::isLatexEnabled(), SectionInfo::label(), m_localToc, m_title, Doxygen::mainPage, Man, DefinitionMixin< PageDef >::name(), Pages, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startContents(), startFile(), OutputList::startHeaderSection(), OutputList::startPageDoc(), OutputList::startTitleHead(), theTranslator, title(), SectionInfo::title(), titleAsText(), Definition::toDefinitionMutable, Translator::trMainPage(), SectionInfo::type(), DefinitionMutable::writeNavigationPath(), writePageDocumentation(), writePageNavigation(), OutputList::writeString(), and DefinitionMixin< PageDef >::writeToc().

◆ writePageDocumentation()

void PageDefImpl::writePageDocumentation ( OutputList & ol) const
overridevirtual

Implements PageDef.

Definition at line 409 of file pagedef.cpp.

410{
411 ol.startTextBlock();
412 DString docStr = (briefDescription().empty()?"":briefDescription()+"\n\n")+documentation()+inbodyDocumentation();
414 {
417 ol.writeString(" - ");
419 }
420 ol.generateDoc(
421 docFile(), // fileName
422 docLine(), // startLine
423 this, // context
424 nullptr, // memberdef
425 docStr, // docStr
426 DocOptions()
427 .setIndexWords(true));
428 ol.endTextBlock();
429
430 if (hasSubPages())
431 {
432 // for printed documentation we write subpages as section's of the
433 // parent page.
435 ol.disableAll();
439
440 for (const auto &subPage : m_subPages)
441 {
442 ol.writePageLink(subPage->getOutputFileBase(), false);
443 }
444
446 }
447
449}
bool hasBriefDescription() const override
bool hasRequirementRefs() const override
void writeRequirementRefs(OutputList &ol) const override
void writePageLink(const DString &name, bool first)
Definition outputlist.h:385
void enable(OutputType o)
void endTextBlock(bool paraBreak=false)
Definition outputlist.h:668
void disableAll()
void startTextBlock(bool dense=false)
Definition outputlist.h:666
bool hasSubPages() const override
Definition pagedef.cpp:473

References DefinitionMixin< PageDef >::briefDescription(), OutputList::disableAll(), OutputList::disableAllBut(), Docbook, DefinitionMixin< PageDef >::docFile(), DefinitionMixin< PageDef >::docLine(), DefinitionMixin< PageDef >::documentation(), DString::empty(), OutputList::enable(), OutputList::endTextBlock(), OutputList::generateDoc(), DefinitionMixin< PageDef >::hasBriefDescription(), DefinitionMixin< PageDef >::hasRequirementRefs(), hasSubPages(), DefinitionMixin< PageDef >::inbodyDocumentation(), SectionManager::instance(), Latex, m_subPages, Man, DefinitionMixin< PageDef >::name(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), RTF, OutputList::startTextBlock(), OutputList::writePageLink(), DefinitionMixin< PageDef >::writeRequirementRefs(), and OutputList::writeString().

Referenced by writeDocumentation().

◆ writePageNavigation()

void PageDefImpl::writePageNavigation ( OutputList & ol) const
overridevirtual

Reimplemented from DefinitionMixin< PageDef >.

Definition at line 451 of file pagedef.cpp.

452{
453 ol.writePageOutline();
454}
void writePageOutline()
Definition outputlist.h:612

References OutputList::writePageOutline().

Referenced by writeDocumentation().

◆ writeTagFile()

void PageDefImpl::writeTagFile ( TextStream & tagFile)
overridevirtual

Implements PageDef.

Definition at line 235 of file pagedef.cpp.

236{
237 bool found = name()=="citelist" || name()=="requirements";
239 {
240 if (rl->listName()==name())
241 {
242 found=true;
243 break;
244 }
245 }
246 if (!found) // not one of the generated related pages
247 {
248 DString fn = getOutputFileBase();
250 tagFile << " <compound kind=\"page\">\n";
251 tagFile << " <name>" << name() << "</name>\n";
252 tagFile << " <title>" << convertToXML(title()) << "</title>\n";
253 tagFile << " <filename>" << fn << "</filename>\n";
254 for (const auto &subPage : m_subPages)
255 {
256 DString sfn = subPage->getOutputFileBase();
258 tagFile << " <subpage>" << sfn << "</subpage>\n";
259 }
261 tagFile << " </compound>\n";
262 }
263}
void writeDocAnchorsToTagFile(TextStream &fs) const override
std::unique_ptr< RefList > Ptr
Definition linkedmap.h:38
static RefListManager & instance()
Definition reflist.h:120
void addHtmlExtensionIfMissing(DString &fName)
Definition util.cpp:3931
DString convertToXML(const DString &s, bool keepEntities, const bool citeEntry)
Definition util.cpp:3232

References addHtmlExtensionIfMissing(), convertToXML(), getOutputFileBase(), RefListManager::instance(), m_subPages, DefinitionMixin< PageDef >::name(), title(), and DefinitionMixin< PageDef >::writeDocAnchorsToTagFile().

Member Data Documentation

◆ m_fileName

DString PageDefImpl::m_fileName
private

Definition at line 79 of file pagedef.cpp.

Referenced by getOutputFileBase(), PageDefImpl(), and setFileName().

◆ m_localToc

LocalToc PageDefImpl::m_localToc
private

Definition at line 85 of file pagedef.cpp.

Referenced by localToc(), setLocalToc(), and writeDocumentation().

◆ m_nestingLevel

int PageDefImpl::m_nestingLevel
private

Definition at line 84 of file pagedef.cpp.

Referenced by addInnerCompound(), PageDefImpl(), and setNestingLevel().

◆ m_pageScope

Definition* PageDefImpl::m_pageScope
private

Definition at line 83 of file pagedef.cpp.

Referenced by getPageScope(), PageDefImpl(), and setPageScope().

◆ m_showLineNo

bool PageDefImpl::m_showLineNo
private

Definition at line 86 of file pagedef.cpp.

Referenced by PageDefImpl(), setShowLineNo(), and showLineNo().

◆ m_subPages

PageLinkedRefMap PageDefImpl::m_subPages
private

◆ m_title

DString PageDefImpl::m_title
private

Definition at line 80 of file pagedef.cpp.

Referenced by displayName(), hasTitle(), setTitle(), title(), and writeDocumentation().

◆ m_titleAsText

DString PageDefImpl::m_titleAsText
private

Definition at line 81 of file pagedef.cpp.

Referenced by setTitle(), and titleAsText().


The documentation for this class was generated from the following file: