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, int 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
int 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, int 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 31 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 91 of file pagedef.cpp.

93 : DefinitionMixin(f,l,1,n)
94{
95 setDocumentation(d,f,l);
96 m_pageScope = nullptr;
98 m_fileName = ::convertNameToFile(n,false,true);
99 m_showLineNo = false;
100 setTitle(t);
101}
DefinitionMixin(const DString &defFileName, int defLine, int defColumn, const DString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=true)
virtual void setDocumentation(const DString &d, const DString &docFile, int docLine, bool stripWhiteSpace=true)=0
DString m_fileName
Definition pagedef.cpp:74
bool m_showLineNo
Definition pagedef.cpp:81
Definition * m_pageScope
Definition pagedef.cpp:78
void setTitle(const DString &title) override
Definition pagedef.cpp:498
int m_nestingLevel
Definition pagedef.cpp:79
DString convertNameToFile(const DString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3551

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 103 of file pagedef.cpp.

104{
105}

Member Function Documentation

◆ addInnerCompound()

void PageDefImpl::addInnerCompound ( Definition * d)
overridevirtual

Reimplemented from DefinitionMixin< PageDef >.

Definition at line 132 of file pagedef.cpp.

133{
134 if (def->definitionType()==Definition::TypePage)
135 {
136 PageDef *pd = toPageDef(def);
137 if (pd)
138 {
139 m_subPages.add(pd->name(),pd);
140 pd->setOuterScope(this);
141 if (this==Doxygen::mainPage.get())
142 {
144 }
145 else
146 {
148 }
149 }
150 }
151}
virtual const DString & name() const =0
virtual void setOuterScope(Definition *d)=0
static std::unique_ptr< PageDef > mainPage
Definition doxygen.h:100
bool add(const char *k, T *obj)
Definition linkedmap.h:284
virtual void setNestingLevel(int)=0
PageLinkedRefMap m_subPages
Definition pagedef.cpp:77
PageDef * toPageDef(Definition *d)
Definition pagedef.cpp:519

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 207 of file pagedef.cpp.

208{
209 DString name = getOutputFileBase();
210 if (getGroupDef())
211 {
213 }
215 theTranslator->trPage(true,true),
216 name,title(),DString(),nullptr);
217}
DString()=default
virtual const RefItemVector & xrefListItems() const =0
virtual DString getOutputFileBase() const =0
DString getOutputFileBase() const override
Definition pagedef.cpp:119
DString title() const override
Definition pagedef.cpp:48
const GroupDef * getGroupDef() const override
Definition pagedef.cpp:114
virtual DString trPage(bool first_capital, bool singular)=0
Translator * theTranslator
Definition language.cpp:71
void addRefItem(const RefItemVector &sli, const DString &key, const DString &prefix, const DString &name, const DString &title, const DString &args, const Definition *scope)
Definition util.cpp:4872

References addRefItem(), DString::DString(), 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 219 of file pagedef.cpp.

220{
222}
static RequirementManager & instance()
void addRequirementRefsForSymbol(const Definition *symbol)

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

◆ addSectionsToIndex()

void PageDefImpl::addSectionsToIndex ( )
overridevirtual

Implements PageDef.

Definition at line 153 of file pagedef.cpp.

154{
155 const SectionRefs &sectionRefs = getSectionRefs();
156 if (sectionRefs.empty()) return;
157 //printf("PageDefImpl::addSectionsToIndex()\n");
158 int level=1;
159 for (auto it = sectionRefs.begin(); it!=sectionRefs.end(); ++it)
160 {
161 const SectionInfo *si = *it;
162 SectionType type = si->type();
163 if (type.isSection())
164 {
165 //printf(" level=%d title=%s\n",level,qPrint(si->title));
166 int nextLevel = type.level();
167 if (nextLevel>level)
168 {
169 for (int i=level;i<nextLevel;i++)
170 {
172 }
173 }
174 else if (nextLevel<level)
175 {
176 for (int i=nextLevel;i<level;i++)
177 {
179 }
180 }
181 DString title = si->title();
182 if (title.empty()) title = si->label();
183 title = parseCommentAsText(this,nullptr,title,si->fileName(),si->lineNr());
184 DString titleAsHtml = parseCommentAsHtml(this,nullptr,si->title(),si->fileName(),si->lineNr());
185 // determine if there is a next level inside this item, but be aware of the anchor and table section references.
186 auto it_next = std::next(it);
187 bool isDir = (it_next!=sectionRefs.end()) ? ((*it_next)->type().isSection() && (*it_next)->type().level() > nextLevel) : false;
188 Doxygen::indexList->addContentsItem(isDir, // isDir
189 title, // name
190 getReference(), // ref
191 getOutputFileBase(), // file
192 si->label(), // anchor
193 false, // separateIndex
194 true, // addToNavIndex
195 nullptr, // def
196 titleAsHtml); // nameAsHtml
197 level = nextLevel;
198 }
199 }
200 while (level>1)
201 {
203 level--;
204 }
205}
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
Definition dstring.h:153
virtual const SectionRefs & getSectionRefs() const =0
returns the section dictionary, only of importance for pagedef
virtual DString getReference() const =0
static IndexList * indexList
Definition doxygen.h:132
void decContentsDepth()
Definition indexlist.h:109
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:112
void incContentsDepth()
Definition indexlist.h:106
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)
Definition util.cpp:5415
DString parseCommentAsHtml(const Definition *scope, const MemberDef *member, const DString &doc, const DString &fileName, int lineNr)
Definition util.cpp:5471

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 46 of file pagedef.cpp.

46{ return DString(); }

References DString::DString().

◆ codeSymbolType()

CodeSymbolType PageDefImpl::codeSymbolType ( ) const
inlineoverridevirtual

Used for syntax highlighting symbol class

Implements Definition.

Definition at line 42 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 41 of file pagedef.cpp.

41{ 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 61 of file pagedef.cpp.

61{ return hasTitle() ? m_title : DefinitionMixin::name(); }
const DString & name() const override
bool hasTitle() const override
Definition pagedef.cpp:493
DString m_title
Definition pagedef.cpp:75

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

◆ documentedPage()

bool PageDefImpl::documentedPage ( ) const
overridevirtual

Implements PageDef.

Definition at line 460 of file pagedef.cpp.

461{
462 return // not part of a group
463 !getGroupDef() &&
464 // not an externally defined page
465 !isReference();
466}
virtual bool isReference() const =0

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

◆ findSectionsInDocumentation()

void PageDefImpl::findSectionsInDocumentation ( )
overridevirtual

Implements PageDef.

Definition at line 107 of file pagedef.cpp.

108{
112}
virtual DString briefDescription(bool abbreviate=false) const =0
virtual DString documentation() const =0
virtual DString inbodyDocumentation() const =0
virtual DString docFile() const =0
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 114 of file pagedef.cpp.

115{
116 return !partOfGroups().empty() ? partOfGroups().front() : nullptr;
117}
virtual const GroupList & partOfGroups() const =0

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 119 of file pagedef.cpp.

120{
121 if (getGroupDef())
122 return getGroupDef()->getOutputFileBase();
123 else
124 return m_fileName;
125}

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 60 of file pagedef.cpp.

60{ return m_pageScope; }

References m_pageScope.

◆ getSubPages()

const PageLinkedRefMap & PageDefImpl::getSubPages ( ) const
inlineoverridevirtual

Implements PageDef.

Definition at line 51 of file pagedef.cpp.

51{ return m_subPages; }

References m_subPages.

◆ hasParentPage()

bool PageDefImpl::hasParentPage ( ) const
overridevirtual

Implements PageDef.

Definition at line 224 of file pagedef.cpp.

225{
226 return getOuterScope() &&
228}
virtual DefType definitionType() const =0
virtual Definition * getOuterScope() const =0

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

◆ hasSubPages()

bool PageDefImpl::hasSubPages ( ) const
overridevirtual

Implements PageDef.

Definition at line 468 of file pagedef.cpp.

469{
470 return !m_subPages.empty();
471}
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 493 of file pagedef.cpp.

494{
495 return !m_title.empty() && m_title.lower()!="notitle";
496}
DString lower() const
Definition dstring.h:331

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 44 of file pagedef.cpp.

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

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 43 of file pagedef.cpp.

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

References DefinitionMixin< PageDef >::isReference().

Referenced by isLinkable().

◆ localToc()

LocalToc PageDefImpl::localToc ( ) const
inlineoverridevirtual

Implements PageDef.

Definition at line 58 of file pagedef.cpp.

58{ return m_localToc; }
LocalToc m_localToc
Definition pagedef.cpp:80

References m_localToc.

◆ setFileName()

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

Implements PageDef.

Definition at line 127 of file pagedef.cpp.

128{
130}

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

◆ setLocalToc()

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

Implements PageDef.

Definition at line 478 of file pagedef.cpp.

479{
480 m_localToc = lt;
481}

References m_localToc.

◆ setNestingLevel()

void PageDefImpl::setNestingLevel ( int l)
overridevirtual

Implements PageDef.

Definition at line 473 of file pagedef.cpp.

474{
475 m_nestingLevel = l;
476}

References m_nestingLevel.

◆ setPageScope()

void PageDefImpl::setPageScope ( Definition * d)
inlineoverridevirtual

Implements PageDef.

Definition at line 59 of file pagedef.cpp.

59{ m_pageScope = d; }

References m_pageScope.

◆ setShowLineNo()

void PageDefImpl::setShowLineNo ( bool b)
overridevirtual

Implements PageDef.

Definition at line 483 of file pagedef.cpp.

484{
485 m_showLineNo = b;
486}

References m_showLineNo.

◆ setTitle()

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

Implements PageDef.

Definition at line 498 of file pagedef.cpp.

499{
500 if (!title.empty())
501 {
502 m_title = title;
504 }
505 else
506 {
507 m_title = name();
509 }
510}
virtual int docLine() const =0
DString m_titleAsText
Definition pagedef.cpp:76

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 488 of file pagedef.cpp.

489{
490 return m_showLineNo;
491}

References m_showLineNo.

◆ title()

DString PageDefImpl::title ( ) const
inlineoverridevirtual

Implements PageDef.

Definition at line 48 of file pagedef.cpp.

48{ 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 512 of file pagedef.cpp.

513{
514 return m_titleAsText;
515}

References m_titleAsText.

Referenced by writeDocumentation().

◆ visibleInIndex()

bool PageDefImpl::visibleInIndex ( ) const
overridevirtual

Implements PageDef.

Definition at line 451 of file pagedef.cpp.

452{
453 bool externalPages = Config_getBool(EXTERNAL_PAGES);
454 return // not part of a group
455 !getGroupDef() &&
456 // not an externally defined page
457 (!isReference() || externalPages);
458}
#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 260 of file pagedef.cpp.

261{
262 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
263 int hierarchyLevel = -1; // Pages start at the root
264 PageDef *pd = this;
265 while (pd && pd->hasParentPage())
266 {
267 pd = dynamic_cast<PageDef *>(pd->getOuterScope());
268 ++hierarchyLevel;
269 }
270
271 //outputList->disable(OutputType::Man);
272 DString pageName,manPageName;
273 pageName = escapeCharsInString(name(),false,true);
274 manPageName = escapeCharsInString(name(),true,true);
275
276 //printf("PageDefImpl::writeDocumentation: %s\n",getOutputFileBase().data());
277
279 //1.{
280
282 //2.{
284 startFile(ol,getOutputFileBase(),false,manPageName,titleAsText(),HighlightedItem::Pages,!generateTreeView,
285 DString() /* altSidebarName */, hierarchyLevel);
286 ol.enableAll();
288 startFile(ol,getOutputFileBase(),false,pageName,titleAsText(),HighlightedItem::Pages,!generateTreeView,
289 DString() /* altSidebarName */, hierarchyLevel);
291 //2.}
292
293 if (!generateTreeView)
294 {
295 if (getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX))
296 {
297 DefinitionMutable *outerScope = toDefinitionMutable(getOuterScope());
298 if (outerScope)
299 {
300 outerScope->writeNavigationPath(ol);
301 }
302 }
303 ol.endQuickIndices();
304 }
305 const SectionInfo *si=SectionManager::instance().find(name());
306
307 // save old generator state and write title only to Man generator
309 //2.{
311 ol.startTitleHead(manPageName);
312 ol.endTitleHead(manPageName, manPageName);
313 if (si)
314 {
315 ol.writeString(" - ");
316
317 if (si->title() != manPageName)
318 {
319 ol.generateDoc(docFile(),
321 this,
322 nullptr,
323 si->title(),
324 DocOptions()
325 .setSingleLine(true)
326 .setAutolinkSupport(false));
327 ol.endSection(si->label(),si->type());
328 }
329 }
331 //2.}
332
334 //2.{
336 DString title;
337 if (this == Doxygen::mainPage.get() && !hasTitle())
339 else
340 title = m_title;
341
342 if (!title.empty() && !name().empty() && si!=nullptr)
343 {
344 ol.startPageDoc(si->title());
347 ol.generateDoc(docFile(),
349 this,
350 nullptr,
351 title,
352 DocOptions()
353 .setIndexWords(true)
354 .setSingleLine(true)
355 .setAutolinkSupport(false));
357 ol.endHeaderSection();
358 }
359 else
360 {
361 ol.startPageDoc("");
362 }
364 //2.}
365
366 bool pageWithSections = hasSections();
367 ol.startContents();
369 && pageWithSections)
370 {
371 writeToc(ol, m_localToc);
372 }
373
375 ol.endContents();
376 ol.endPageDoc();
377
378 if (generateTreeView && getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX))
379 {
380 endFileWithNavPath(ol,toDefinitionMutable(const_cast<Definition*>(getOuterScope())));
381 }
382 else
383 {
384 if (generateTreeView && Config_getBool(PAGE_OUTLINE_PANEL) && pageWithSections)
385 {
388 ol.writeString("</div><!-- doc-content -->\n");
390 ol.writeString("</div><!-- container -->\n");
392 endFile(ol,true);
393 }
394 else
395 {
396 endFile(ol,false,true);
397 }
398 }
399
401 //1.}
402}
virtual bool hasSections() const =0
virtual int getStartBodyLine() const =0
friend DefinitionMutable * toDefinitionMutable(Definition *)
virtual void writeToc(OutputList &ol, const LocalToc &lt) const =0
virtual void writeNavigationPath(OutputList &ol) const =0
static NamespaceDefMutable * globalScope
Definition doxygen.h:121
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:403
void endTitleHead(const DString &fileName, const DString &name)
Definition outputlist.h:405
void disable(OutputType o)
void endContents()
Definition outputlist.h:620
void endHeaderSection()
Definition outputlist.h:467
void startHeaderSection()
Definition outputlist.h:465
void endPageDoc()
Definition outputlist.h:624
void writeString(const DString &text)
Definition outputlist.h:411
void endSection(const DString &lab, SectionType t)
Definition outputlist.h:588
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void startPageDoc(const DString &pageTitle)
Definition outputlist.h:622
void endQuickIndices()
Definition outputlist.h:604
void generateDoc(const DString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const DString &docStr, const DocOptions &options)
void startContents()
Definition outputlist.h:618
void enableAll()
virtual bool hasParentPage() const =0
void writePageNavigation(OutputList &ol) const override
Definition pagedef.cpp:446
DString titleAsText() const override
Definition pagedef.cpp:512
void writePageDocumentation(OutputList &ol) const override
Definition pagedef.cpp:404
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:450
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const DString &navPath)
Definition index.cpp:429
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:403
DString escapeCharsInString(const DString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3376

References Config_getBool, OutputList::disable(), OutputList::disableAllBut(), DefinitionMixin< PageDef >::docFile(), DString::DString(), 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 404 of file pagedef.cpp.

405{
406 ol.startTextBlock();
407 DString docStr = (briefDescription().empty()?"":briefDescription()+"\n\n")+documentation()+inbodyDocumentation();
409 {
412 ol.writeString(" - ");
414 }
415 ol.generateDoc(
416 docFile(), // fileName
417 docLine(), // startLine
418 this, // context
419 nullptr, // memberdef
420 docStr, // docStr
421 DocOptions()
422 .setIndexWords(true));
423 ol.endTextBlock();
424
425 if (hasSubPages())
426 {
427 // for printed documentation we write subpages as section's of the
428 // parent page.
430 ol.disableAll();
434
435 for (const auto &subPage : m_subPages)
436 {
437 ol.writePageLink(subPage->getOutputFileBase(), false);
438 }
439
441 }
442
444}
virtual bool hasBriefDescription() const =0
returns true if this class has a brief description
virtual bool hasRequirementRefs() const =0
virtual void writeRequirementRefs(OutputList &ol) const =0
void writePageLink(const DString &name, bool first)
Definition outputlist.h:389
void enable(OutputType o)
void endTextBlock(bool paraBreak=false)
Definition outputlist.h:672
void disableAll()
void startTextBlock(bool dense=false)
Definition outputlist.h:670
bool hasSubPages() const override
Definition pagedef.cpp:468

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 446 of file pagedef.cpp.

447{
448 ol.writePageOutline();
449}
void writePageOutline()
Definition outputlist.h:616

References OutputList::writePageOutline().

Referenced by writeDocumentation().

◆ writeTagFile()

void PageDefImpl::writeTagFile ( TextStream & tagFile)
overridevirtual

Implements PageDef.

Definition at line 230 of file pagedef.cpp.

231{
232 bool found = name()=="citelist" || name()=="requirements";
234 {
235 if (rl->listName()==name())
236 {
237 found=true;
238 break;
239 }
240 }
241 if (!found) // not one of the generated related pages
242 {
243 DString fn = getOutputFileBase();
245 tagFile << " <compound kind=\"page\">\n";
246 tagFile << " <name>" << name() << "</name>\n";
247 tagFile << " <title>" << convertToXML(title()) << "</title>\n";
248 tagFile << " <filename>" << fn << "</filename>\n";
249 for (const auto &subPage : m_subPages)
250 {
251 DString sfn = subPage->getOutputFileBase();
253 tagFile << " <subpage>" << sfn << "</subpage>\n";
254 }
256 tagFile << " </compound>\n";
257 }
258}
virtual void writeDocAnchorsToTagFile(TextStream &) const =0
std::unique_ptr< RefList > Ptr
Definition linkedmap.h:38
static RefListManager & instance()
Definition reflist.h:121
void addHtmlExtensionIfMissing(DString &fName)
Definition util.cpp:4969
DString convertToXML(const DString &s, bool keepEntities, const bool citeEntry)
Definition util.cpp:3956

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 74 of file pagedef.cpp.

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

◆ m_localToc

LocalToc PageDefImpl::m_localToc
private

Definition at line 80 of file pagedef.cpp.

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

◆ m_nestingLevel

int PageDefImpl::m_nestingLevel
private

Definition at line 79 of file pagedef.cpp.

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

◆ m_pageScope

Definition* PageDefImpl::m_pageScope
private

Definition at line 78 of file pagedef.cpp.

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

◆ m_showLineNo

bool PageDefImpl::m_showLineNo
private

Definition at line 81 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 75 of file pagedef.cpp.

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

◆ m_titleAsText

DString PageDefImpl::m_titleAsText
private

Definition at line 76 of file pagedef.cpp.

Referenced by setTitle(), and titleAsText().


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