Doxygen
PageDefImpl Class Reference
Inheritance diagram for PageDefImpl:
Collaboration diagram for PageDefImpl:

Public Member Functions

 PageDefImpl (const QCString &f, int l, const QCString &n, const QCString &d, const QCString &t)
 ~PageDefImpl () override
void setFileName (const QCString &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
QCString getOutputFileBase () const override
QCString anchor () const override
void findSectionsInDocumentation () override
QCString title () 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
QCString displayName (bool=TRUE) const override
bool showLineNo () const override
void setTitle (const QCString &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
Public Member Functions inherited from DefinitionMixin< PageDef >
 DefinitionMixin (const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
 DefinitionMixin (const DefinitionMixin &other)
 DefinitionMixin (DefinitionMixin &&)=delete
DefinitionMixinoperator= (const DefinitionMixin &other)
DefinitionMixinoperator= (DefinitionMixin &&)=delete
 ~DefinitionMixin () override=default
bool isAlias () const override
const QCStringname () const override
bool isAnonymous () const override
const QCStringlocalName () const override
QCString qualifiedName () const override
QCString symbolName () const override
QCString getSourceFileBase () const override
QCString getSourceAnchor () const override
QCString documentation () const override
int docLine () const override
QCString docFile () const override
QCString briefDescription (bool abbreviate=FALSE) const override
QCString briefDescriptionAsTooltip () const override
int briefLine () const override
QCString inbodyDocumentation () const override
QCString inbodyFile () const override
int inbodyLine () const override
QCString briefFile () const override
QCString getDefFileName () const override
QCString 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
QCString getReference () const override
bool isReference () const override
QCString externalReference (const QCString &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 DefinitionfindInnerCompound (const QCString &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
QCString id () const override
const SectionRefsgetSectionRefs () const override
void setName (const QCString &name) override
void setId (const QCString &name) override
void setDefFile (const QCString &df, int defLine, int defColumn) override
void setDocumentation (const QCString &doc, const QCString &docFile, int docLine, bool stripWhiteSpace=TRUE) override
void setBriefDescription (const QCString &brief, const QCString &briefFile, int briefLine) override
void setInbodyDocumentation (const QCString &doc, const QCString &docFile, int docLine) override
void setReference (const QCString &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 QCString &sourceRefName) override
void addSourceReferences (MemberDef *md, const QCString &sourceRefName) override
void setRefItems (const RefItemVector &sli) 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 QCString &scopeName) const override
bool hasSourceRefs () const override
bool hasSourceReffedBy () const override
void writeSourceRefs (OutputList &ol, const QCString &scopeName) const override
void writeSourceReffedBy (OutputList &ol, const QCString &scopeName) const override
void makePartOfGroup (GroupDef *gd) override
void writeNavigationPath (OutputList &ol) const override
QCString navigationPathAsString () const override
void writeQuickMemberLinks (OutputList &ol, const MemberDef *md) const override
void writeSummaryLinks (OutputList &ol) const override
QCString pathFragment () const override
void writeDocAnchorsToTagFile (TextStream &fs) const override
void setLocalName (const QCString &name) override
void writeToc (OutputList &ol, const LocalToc &lt) const override
void computeTooltip () override
void _setSymbolName (const QCString &name) override
QCString _symbolName () const override

Private Attributes

QCString m_fileName
QCString m_title
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 QCString & f,
int l,
const QCString & n,
const QCString & d,
const QCString & t )

Definition at line 87 of file pagedef.cpp.

89 : DefinitionMixin(f,l,1,n), m_title(!t.isEmpty() ? t : n)
90{
91 setDocumentation(d,f,l);
92 m_pageScope = nullptr;
96}
void setDocumentation(const QCString &doc, const QCString &docFile, int docLine, bool stripWhiteSpace=TRUE) override
DefinitionMixin(const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
bool m_showLineNo
Definition pagedef.cpp:77
Definition * m_pageScope
Definition pagedef.cpp:74
QCString m_title
Definition pagedef.cpp:72
int m_nestingLevel
Definition pagedef.cpp:75
QCString m_fileName
Definition pagedef.cpp:71
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:4013

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

◆ ~PageDefImpl()

PageDefImpl::~PageDefImpl ( )
override

Definition at line 98 of file pagedef.cpp.

99{
100}

Member Function Documentation

◆ addInnerCompound()

void PageDefImpl::addInnerCompound ( Definition * d)
overridevirtual

Reimplemented from DefinitionMixin< PageDef >.

Definition at line 127 of file pagedef.cpp.

128{
129 if (def->definitionType()==Definition::TypePage)
130 {
131 PageDef *pd = toPageDef(def);
132 if (pd)
133 {
134 m_subPages.add(pd->name(),pd);
135 pd->setOuterScope(this);
136 if (this==Doxygen::mainPage.get())
137 {
139 }
140 else
141 {
143 }
144 }
145 }
146}
virtual const QCString & name() const =0
virtual void setOuterScope(Definition *d)=0
static std::unique_ptr< PageDef > mainPage
Definition doxygen.h:101
virtual void setNestingLevel(int)=0
PageLinkedRefMap m_subPages
Definition pagedef.cpp:73
PageDef * toPageDef(Definition *d)
Definition pagedef.cpp:487

References Definition::definitionType(), m_nestingLevel, m_subPages, Doxygen::mainPage, Definition::name(), PageDef::setNestingLevel(), DefinitionMutable::setOuterScope(), toPageDef(), and Definition::TypePage.

◆ addSectionsToIndex()

void PageDefImpl::addSectionsToIndex ( )
overridevirtual

Implements PageDef.

Definition at line 148 of file pagedef.cpp.

149{
150 const SectionRefs &sectionRefs = getSectionRefs();
151 if (sectionRefs.empty()) return;
152 //printf("PageDefImpl::addSectionsToIndex()\n");
153 int level=1;
154 for (auto it = sectionRefs.begin(); it!=sectionRefs.end(); ++it)
155 {
156 const SectionInfo *si = *it;
157 SectionType type = si->type();
158 if (type.isSection())
159 {
160 //printf(" level=%d title=%s\n",level,qPrint(si->title));
161 int nextLevel = type.level();
162 if (nextLevel>level)
163 {
164 for (int i=level;i<nextLevel;i++)
165 {
167 }
168 }
169 else if (nextLevel<level)
170 {
171 for (int i=nextLevel;i<level;i++)
172 {
174 }
175 }
176 QCString title = si->title();
177 if (title.isEmpty()) title = si->label();
178 title = parseCommentAsText(this,nullptr,title,si->fileName(),si->lineNr());
179 // determine if there is a next level inside this item, but be aware of the anchor and table section references.
180 auto it_next = std::next(it);
181 bool isDir = (it_next!=sectionRefs.end()) ? ((*it_next)->type().isSection() && (*it_next)->type().level() > nextLevel) : false;
183 getReference(),
185 si->label(),
186 false,
187 true);
188 level = nextLevel;
189 }
190 }
191 while (level>1)
192 {
194 level--;
195 }
196}
QCString getReference() const override
const SectionRefs & getSectionRefs() const override
static IndexList * indexList
Definition doxygen.h:134
void decContentsDepth()
Definition indexlist.h:112
void addContentsItem(bool isDir, const QCString &name, const QCString &ref, const QCString &file, const QCString &anchor, bool separateIndex=FALSE, bool addToNavIndex=FALSE, const Definition *def=nullptr)
Definition indexlist.h:115
void incContentsDepth()
Definition indexlist.h:109
QCString getOutputFileBase() const override
Definition pagedef.cpp:114
QCString title() const override
Definition pagedef.cpp:48
QCString label() const
Definition section.h:68
QCString fileName() const
Definition section.h:73
int lineNr() const
Definition section.h:72
QCString title() const
Definition section.h:69
SectionType type() const
Definition section.h:70
bool empty() const
Definition section.h:124
const_iterator end() const
Definition section.h:123
const_iterator begin() const
Definition section.h:122
constexpr bool isSection() const
Definition section.h:46
constexpr int level() const
Definition section.h:45
QCString parseCommentAsText(const Definition *scope, const MemberDef *md, const QCString &doc, const QCString &fileName, int lineNr)
Definition util.cpp:5872

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

◆ anchor()

QCString 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 QCString(); }

◆ 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()

QCString PageDefImpl::displayName ( bool includeScope = TRUE) const
inlineoverridevirtual

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

Implements Definition.

Definition at line 60 of file pagedef.cpp.

60{ return hasTitle() ? m_title : DefinitionMixin::name(); }
const QCString & name() const override
bool hasTitle() const override
Definition pagedef.cpp:475

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

◆ documentedPage()

bool PageDefImpl::documentedPage ( ) const
overridevirtual

Implements PageDef.

Definition at line 442 of file pagedef.cpp.

443{
444 return // not part of a group
445 !getGroupDef() &&
446 // not an externally defined page
447 !isReference();
448}
bool isReference() const override
const GroupDef * getGroupDef() const override
Definition pagedef.cpp:109

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

◆ findSectionsInDocumentation()

void PageDefImpl::findSectionsInDocumentation ( )
overridevirtual

Implements PageDef.

Definition at line 102 of file pagedef.cpp.

103{
107}
QCString docFile() const override
QCString briefDescription(bool abbreviate=FALSE) const override
QCString inbodyDocumentation() const override
QCString documentation() const override
void docFindSections(const QCString &input, const Definition *d, const QCString &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 109 of file pagedef.cpp.

110{
111 return !partOfGroups().empty() ? partOfGroups().front() : nullptr;
112}
const GroupList & partOfGroups() const override

References DefinitionMixin< PageDef >::partOfGroups().

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

◆ getOutputFileBase()

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

115{
116 if (getGroupDef())
117 return getGroupDef()->getOutputFileBase();
118 else
119 return m_fileName;
120}
virtual QCString getOutputFileBase() const =0

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

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

◆ getPageScope()

Definition * PageDefImpl::getPageScope ( ) const
inlineoverridevirtual

Implements PageDef.

Definition at line 59 of file pagedef.cpp.

59{ return m_pageScope; }

References m_pageScope.

◆ getSubPages()

const PageLinkedRefMap & PageDefImpl::getSubPages ( ) const
inlineoverridevirtual

Implements PageDef.

Definition at line 50 of file pagedef.cpp.

50{ return m_subPages; }

References m_subPages.

◆ hasParentPage()

bool PageDefImpl::hasParentPage ( ) const
overridevirtual

Implements PageDef.

Definition at line 198 of file pagedef.cpp.

199{
200 return getOuterScope() &&
202}
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 450 of file pagedef.cpp.

451{
452 return !m_subPages.empty();
453}

References m_subPages.

Referenced by writePageDocumentation().

◆ hasTitle()

bool PageDefImpl::hasTitle ( ) const
overridevirtual

Implements PageDef.

Definition at line 475 of file pagedef.cpp.

476{
477 return !m_title.isEmpty() && m_title.lower()!="notitle";
478}

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

57{ return m_localToc; }
LocalToc m_localToc
Definition pagedef.cpp:76

References m_localToc.

◆ setFileName()

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

Implements PageDef.

Definition at line 122 of file pagedef.cpp.

123{
125}

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

◆ setLocalToc()

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

Implements PageDef.

Definition at line 460 of file pagedef.cpp.

461{
462 m_localToc = lt;
463}

References m_localToc.

◆ setNestingLevel()

void PageDefImpl::setNestingLevel ( int l)
overridevirtual

Implements PageDef.

Definition at line 455 of file pagedef.cpp.

456{
457 m_nestingLevel = l;
458}

References m_nestingLevel.

◆ setPageScope()

void PageDefImpl::setPageScope ( Definition * d)
inlineoverridevirtual

Implements PageDef.

Definition at line 58 of file pagedef.cpp.

58{ m_pageScope = d; }

References m_pageScope.

◆ setShowLineNo()

void PageDefImpl::setShowLineNo ( bool b)
overridevirtual

Implements PageDef.

Definition at line 465 of file pagedef.cpp.

466{
467 m_showLineNo = b;
468}

References m_showLineNo.

◆ setTitle()

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

Implements PageDef.

Definition at line 480 of file pagedef.cpp.

481{
482 m_title = title;
483}

References m_title, and title().

◆ showLineNo()

bool PageDefImpl::showLineNo ( ) const
overridevirtual

Implements PageDef.

Definition at line 470 of file pagedef.cpp.

471{
472 return m_showLineNo;
473}

References m_showLineNo.

◆ title()

QCString PageDefImpl::title ( ) const
inlineoverridevirtual

Implements PageDef.

Definition at line 48 of file pagedef.cpp.

48{ return m_title; }

References m_title.

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

◆ visibleInIndex()

bool PageDefImpl::visibleInIndex ( ) const
overridevirtual

Implements PageDef.

Definition at line 433 of file pagedef.cpp.

434{
435 bool externalPages = Config_getBool(EXTERNAL_PAGES);
436 return // not part of a group
437 !getGroupDef() &&
438 // not an externally defined page
439 (!isReference() || externalPages);
440}
#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 234 of file pagedef.cpp.

235{
236 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
237 int hierarchyLevel = -1; // Pages start at the root
238 PageDef *pd = this;
239 while (pd->hasParentPage())
240 {
241 pd = (PageDef *)pd->getOuterScope();
242 ++hierarchyLevel;
243 }
244
245 //outputList->disable(OutputType::Man);
246 QCString pageName,manPageName;
247 pageName = escapeCharsInString(name(),FALSE,TRUE);
248 manPageName = escapeCharsInString(name(),TRUE,TRUE);
249
250 //printf("PageDefImpl::writeDocumentation: %s\n",getOutputFileBase().data());
251
253 //1.{
254
256 //2.{
258 startFile(ol,getOutputFileBase(),manPageName,title(),HighlightedItem::Pages,!generateTreeView,
259 QCString() /* altSidebarName */, hierarchyLevel);
260 ol.enableAll();
262 startFile(ol,getOutputFileBase(),pageName,title(),HighlightedItem::Pages,!generateTreeView,
263 QCString() /* altSidebarName */, hierarchyLevel);
265 //2.}
266
267 if (!generateTreeView)
268 {
269 if (getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX))
270 {
271 DefinitionMutable *outerScope = toDefinitionMutable(getOuterScope());
272 if (outerScope)
273 {
274 outerScope->writeNavigationPath(ol);
275 }
276 }
277 ol.endQuickIndices();
278 }
279 const SectionInfo *si=SectionManager::instance().find(name());
280
281 // save old generator state and write title only to Man generator
283 //2.{
285 ol.startTitleHead(manPageName);
286 ol.endTitleHead(manPageName, manPageName);
287 if (si)
288 {
289 ol.writeString(" - ");
290
291 if (si->title() != manPageName)
292 {
293 ol.generateDoc(docFile(),getStartBodyLine(),this,nullptr,si->title(),TRUE,FALSE,
294 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
295 ol.endSection(si->label(),si->type());
296 }
297 }
299 //2.}
300
302 //2.{
304 QCString title;
305 if (this == Doxygen::mainPage.get() && !hasTitle())
307 else
308 title = m_title;
309
310 if (!title.isEmpty() && !name().isEmpty() && si!=nullptr)
311 {
312 ol.startPageDoc(si->title());
313 //ol.startSection(si->label,si->title,si->type);
316 ol.parseText(title);
318 ol.endHeaderSection();
319
320 /*ol.generateDoc(docFile(),getStartBodyLine(),this,nullptr,si->title(),TRUE,FALSE,
321 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));*/
322 }
323 else
324 ol.startPageDoc("");
326 //2.}
327
328 bool pageWithSections = hasSections();
329 ol.startContents();
330 if ((m_localToc.isHtmlEnabled() || m_localToc.isLatexEnabled() || m_localToc.isDocbookEnabled())
331 && pageWithSections)
332 {
333 writeToc(ol, m_localToc);
334 }
335
337 ol.endContents();
338 ol.endPageDoc();
339
340 if (generateTreeView && getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX))
341 {
342 endFileWithNavPath(ol,toDefinitionMutable(const_cast<Definition*>(getOuterScope())));
343 }
344 else
345 {
346 if (generateTreeView && Config_getBool(PAGE_OUTLINE_PANEL) && pageWithSections)
347 {
350 ol.writeString("</div><!-- doc-content -->\n");
352 ol.writeString("</div><!-- container -->\n");
354 endFile(ol,true);
355 }
356 else
357 {
358 endFile(ol,false,true);
359 }
360 }
361
363 //1.}
364}
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:121
const T * find(const std::string &key) const
Definition linkedmap.h:47
void writeString(const QCString &text)
Definition outputlist.h:412
void endTitleHead(const QCString &fileName, const QCString &name)
Definition outputlist.h:406
void endSection(const QCString &lab, SectionType t)
Definition outputlist.h:589
void disable(OutputType o)
void startTitleHead(const QCString &fileName)
Definition outputlist.h:404
void endContents()
Definition outputlist.h:621
void endHeaderSection()
Definition outputlist.h:468
void startHeaderSection()
Definition outputlist.h:466
void endPageDoc()
Definition outputlist.h:625
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void endQuickIndices()
Definition outputlist.h:605
void startPageDoc(const QCString &pageTitle)
Definition outputlist.h:623
void startContents()
Definition outputlist.h:619
void enableAll()
void parseText(const QCString &textStr)
virtual bool hasParentPage() const =0
void writePageNavigation(OutputList &ol) const override
Definition pagedef.cpp:428
void writePageDocumentation(OutputList &ol) const override
Definition pagedef.cpp:366
static SectionManager & instance()
returns a reference to the singleton
Definition section.h:175
virtual QCString trMainPage()=0
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const QCString &navPath)
Definition index.cpp:427
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel, const QCString &allMembersFile)
Definition index.cpp:401
void endFileWithNavPath(OutputList &ol, const DefinitionMutable *d, bool showPageNavigation)
Definition index.cpp:448
Translator * theTranslator
Definition language.cpp:71
QCString escapeCharsInString(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3839

References Config_getBool, OutputList::disable(), OutputList::disableAllBut(), DefinitionMixin< PageDef >::docFile(), OutputList::enableAll(), OutputList::endContents(), endFile(), endFileWithNavPath(), OutputList::endHeaderSection(), OutputList::endPageDoc(), OutputList::endQuickIndices(), OutputList::endSection(), OutputList::endTitleHead(), escapeCharsInString(), FALSE, 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(), SectionInfo::label(), m_localToc, m_title, Doxygen::mainPage, Man, DefinitionMixin< PageDef >::name(), Pages, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startContents(), startFile(), OutputList::startHeaderSection(), OutputList::startPageDoc(), OutputList::startTitleHead(), theTranslator, title(), SectionInfo::title(), Definition::toDefinitionMutable, TRUE, 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 366 of file pagedef.cpp.

367{
368 ol.startTextBlock();
369 QCString docStr = (briefDescription().isEmpty()?"":briefDescription()+"\n\n")+documentation()+inbodyDocumentation();
371 {
374 ol.writeString(" - ");
376 }
378 ol.generateDoc(
379 docFile(), // fileName
380 docLine(), // startLine
381 this, // context
382 nullptr, // memberdef
383 docStr, // docStr
384 true, // index words
385 false, // not an example
386 QCString(), // exampleName
387 false, // singleLine
388 false, // linkFromIndex
389 TRUE // markdown support
390 );
391 ol.enableAll();
393 ol.generateDoc(
394 docFile(), // fileName
395 docLine(), // startLine
396 this, // context
397 nullptr, // memberdef
398 docStr, // docStr
399 false, // index words
400 false, // not an example
401 QCString(), // exampleName
402 false, // singleLine
403 false, // linkFromIndex
404 TRUE // markdown support
405 );
407 ol.endTextBlock();
408
409 if (hasSubPages())
410 {
411 // for printed documentation we write subpages as section's of the
412 // parent page.
414 ol.disableAll();
418
419 for (const auto &subPage : m_subPages)
420 {
421 ol.writePageLink(subPage->getOutputFileBase(), FALSE);
422 }
423
425 }
426}
bool hasBriefDescription() const override
int docLine() const override
void endTextBlock(bool paraBreak=FALSE)
Definition outputlist.h:673
void enable(OutputType o)
void startTextBlock(bool dense=FALSE)
Definition outputlist.h:671
void disableAll()
void writePageLink(const QCString &name, bool first)
Definition outputlist.h:390
bool hasSubPages() const override
Definition pagedef.cpp:450

References DefinitionMixin< PageDef >::briefDescription(), OutputList::disable(), OutputList::disableAll(), OutputList::disableAllBut(), Docbook, DefinitionMixin< PageDef >::docFile(), DefinitionMixin< PageDef >::docLine(), DefinitionMixin< PageDef >::documentation(), OutputList::enable(), OutputList::enableAll(), OutputList::endTextBlock(), FALSE, OutputList::generateDoc(), DefinitionMixin< PageDef >::hasBriefDescription(), hasSubPages(), Html, DefinitionMixin< PageDef >::inbodyDocumentation(), SectionManager::instance(), QCString::isEmpty(), Latex, m_subPages, Man, DefinitionMixin< PageDef >::name(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), RTF, OutputList::startTextBlock(), TRUE, OutputList::writePageLink(), and OutputList::writeString().

Referenced by writeDocumentation().

◆ writePageNavigation()

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

Reimplemented from DefinitionMixin< PageDef >.

Definition at line 428 of file pagedef.cpp.

429{
430 ol.writePageOutline();
431}
void writePageOutline()
Definition outputlist.h:617

References OutputList::writePageOutline().

Referenced by writeDocumentation().

◆ writeTagFile()

void PageDefImpl::writeTagFile ( TextStream & tagFile)
overridevirtual

Implements PageDef.

Definition at line 204 of file pagedef.cpp.

205{
206 bool found = name()=="citelist";
208 {
209 if (rl->listName()==name())
210 {
211 found=TRUE;
212 break;
213 }
214 }
215 if (!found) // not one of the generated related pages
216 {
217 QCString fn = getOutputFileBase();
219 tagFile << " <compound kind=\"page\">\n";
220 tagFile << " <name>" << name() << "</name>\n";
221 tagFile << " <title>" << convertToXML(title()) << "</title>\n";
222 tagFile << " <filename>" << fn << "</filename>\n";
223 for (const auto &subPage : m_subPages)
224 {
225 QCString sfn = subPage->getOutputFileBase();
227 tagFile << " <subpage>" << sfn << "</subpage>\n";
228 }
230 tagFile << " </compound>\n";
231 }
232}
void writeDocAnchorsToTagFile(TextStream &fs) const override
std::unique_ptr< RefList > Ptr
Definition linkedmap.h:38
static RefListManager & instance()
Definition reflist.h:121
bool found
Definition util.cpp:984
QCString convertToXML(const QCString &s, bool keepEntities)
Definition util.cpp:4421
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5408

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

Member Data Documentation

◆ m_fileName

QCString PageDefImpl::m_fileName
private

Definition at line 71 of file pagedef.cpp.

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

◆ m_localToc

LocalToc PageDefImpl::m_localToc
private

Definition at line 76 of file pagedef.cpp.

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

◆ m_nestingLevel

int PageDefImpl::m_nestingLevel
private

Definition at line 75 of file pagedef.cpp.

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

◆ m_pageScope

Definition* PageDefImpl::m_pageScope
private

Definition at line 74 of file pagedef.cpp.

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

◆ m_showLineNo

bool PageDefImpl::m_showLineNo
private

Definition at line 77 of file pagedef.cpp.

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

◆ m_subPages

PageLinkedRefMap PageDefImpl::m_subPages
private

◆ m_title

QCString PageDefImpl::m_title
private

Definition at line 72 of file pagedef.cpp.

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


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