Doxygen
Loading...
Searching...
No Matches
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
void addListReferences () override
void addRequirementReferences () 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)
DefinitionMixinoperator= (const DefinitionMixin &other)
 ~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 RequirementRefsrequirementReferences () 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 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 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
bool hasRequirementRefs () const override
void writeRequirementRefs (OutputList &ol) 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 89 of file pagedef.cpp.

91 : DefinitionMixin(f,l,1,n), m_title(!t.isEmpty() ? t : n)
92{
93 setDocumentation(d,f,l);
94 m_pageScope = nullptr;
98}
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:79
Definition * m_pageScope
Definition pagedef.cpp:76
QCString m_title
Definition pagedef.cpp:74
int m_nestingLevel
Definition pagedef.cpp:77
QCString m_fileName
Definition pagedef.cpp:73
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:163
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3485

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

101{
102}

Member Function Documentation

◆ addInnerCompound()

void PageDefImpl::addInnerCompound ( Definition * d)
overridevirtual

Reimplemented from DefinitionMixin< PageDef >.

Definition at line 129 of file pagedef.cpp.

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

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

205{
206 QCString name = getOutputFileBase();
207 if (getGroupDef())
208 {
210 }
213 name,title(),QCString(),nullptr);
214}
virtual QCString getOutputFileBase() const =0
const RefItemVector & xrefListItems() const override
QCString getOutputFileBase() const override
Definition pagedef.cpp:116
const GroupDef * getGroupDef() const override
Definition pagedef.cpp:111
QCString title() const override
Definition pagedef.cpp:48
virtual QCString trPage(bool first_capital, bool singular)=0
Translator * theTranslator
Definition language.cpp:71
void addRefItem(const RefItemVector &sli, const QCString &key, const QCString &prefix, const QCString &name, const QCString &title, const QCString &args, const Definition *scope)
Definition util.cpp:4805

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

◆ addRequirementReferences()

void PageDefImpl::addRequirementReferences ( )
overridevirtual

Implements PageDef.

Definition at line 216 of file pagedef.cpp.

217{
219}
static RequirementManager & instance()
void addRequirementRefsForSymbol(const Definition *symbol)

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

◆ addSectionsToIndex()

void PageDefImpl::addSectionsToIndex ( )
overridevirtual

Implements PageDef.

Definition at line 150 of file pagedef.cpp.

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

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(), parseCommentAsHtml(), 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:490

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

◆ documentedPage()

bool PageDefImpl::documentedPage ( ) const
overridevirtual

Implements PageDef.

Definition at line 457 of file pagedef.cpp.

458{
459 return // not part of a group
460 !getGroupDef() &&
461 // not an externally defined page
462 !isReference();
463}
bool isReference() const override

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

◆ findSectionsInDocumentation()

void PageDefImpl::findSectionsInDocumentation ( )
overridevirtual

Implements PageDef.

Definition at line 104 of file pagedef.cpp.

105{
109}
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 111 of file pagedef.cpp.

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

References DefinitionMixin< PageDef >::partOfGroups().

Referenced by addListReferences(), 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 116 of file pagedef.cpp.

117{
118 if (getGroupDef())
119 return getGroupDef()->getOutputFileBase();
120 else
121 return m_fileName;
122}

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

222{
223 return getOuterScope() &&
225}
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 465 of file pagedef.cpp.

466{
467 return !m_subPages.empty();
468}

References m_subPages.

Referenced by writePageDocumentation().

◆ hasTitle()

bool PageDefImpl::hasTitle ( ) const
overridevirtual

Implements PageDef.

Definition at line 490 of file pagedef.cpp.

491{
492 return !m_title.isEmpty() && m_title.lower()!="notitle";
493}

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:78

References m_localToc.

◆ setFileName()

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

Implements PageDef.

Definition at line 124 of file pagedef.cpp.

125{
127}

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

◆ setLocalToc()

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

Implements PageDef.

Definition at line 475 of file pagedef.cpp.

476{
477 m_localToc = lt;
478}

References m_localToc.

◆ setNestingLevel()

void PageDefImpl::setNestingLevel ( int l)
overridevirtual

Implements PageDef.

Definition at line 470 of file pagedef.cpp.

471{
472 m_nestingLevel = l;
473}

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

481{
482 m_showLineNo = b;
483}

References m_showLineNo.

◆ setTitle()

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

Implements PageDef.

Definition at line 495 of file pagedef.cpp.

496{
497 m_title = title;
498}

References m_title, and title().

◆ showLineNo()

bool PageDefImpl::showLineNo ( ) const
overridevirtual

Implements PageDef.

Definition at line 485 of file pagedef.cpp.

486{
487 return m_showLineNo;
488}

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 addListReferences(), addSectionsToIndex(), setTitle(), writeDocumentation(), and writeTagFile().

◆ visibleInIndex()

bool PageDefImpl::visibleInIndex ( ) const
overridevirtual

Implements PageDef.

Definition at line 448 of file pagedef.cpp.

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

258{
259 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
260 int hierarchyLevel = -1; // Pages start at the root
261 PageDef *pd = this;
262 while (pd && pd->hasParentPage())
263 {
264 pd = dynamic_cast<PageDef *>(pd->getOuterScope());
265 ++hierarchyLevel;
266 }
267
268 //outputList->disable(OutputType::Man);
269 QCString pageName,manPageName;
270 pageName = escapeCharsInString(name(),FALSE,TRUE);
271 manPageName = escapeCharsInString(name(),TRUE,TRUE);
272
273 //printf("PageDefImpl::writeDocumentation: %s\n",getOutputFileBase().data());
274
276 //1.{
277
279 //2.{
281 startFile(ol,getOutputFileBase(),false,manPageName,title(),HighlightedItem::Pages,!generateTreeView,
282 QCString() /* altSidebarName */, hierarchyLevel);
283 ol.enableAll();
285 startFile(ol,getOutputFileBase(),false,pageName,title(),HighlightedItem::Pages,!generateTreeView,
286 QCString() /* altSidebarName */, hierarchyLevel);
288 //2.}
289
290 if (!generateTreeView)
291 {
292 if (getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX))
293 {
294 DefinitionMutable *outerScope = toDefinitionMutable(getOuterScope());
295 if (outerScope)
296 {
297 outerScope->writeNavigationPath(ol);
298 }
299 }
300 ol.endQuickIndices();
301 }
302 const SectionInfo *si=SectionManager::instance().find(name());
303
304 // save old generator state and write title only to Man generator
306 //2.{
308 ol.startTitleHead(manPageName);
309 ol.endTitleHead(manPageName, manPageName);
310 if (si)
311 {
312 ol.writeString(" - ");
313
314 if (si->title() != manPageName)
315 {
316 ol.generateDoc(docFile(),
318 this,
319 nullptr,
320 si->title(),
321 DocOptions()
322 .setSingleLine(true)
323 .setAutolinkSupport(false));
324 ol.endSection(si->label(),si->type());
325 }
326 }
328 //2.}
329
331 //2.{
333 QCString title;
334 if (this == Doxygen::mainPage.get() && !hasTitle())
336 else
337 title = m_title;
338
339 if (!title.isEmpty() && !name().isEmpty() && si!=nullptr)
340 {
341 ol.startPageDoc(si->title());
344 ol.generateDoc(docFile(),
346 this,
347 nullptr,
348 title,
349 DocOptions()
350 .setIndexWords(true)
351 .setSingleLine(true)
352 .setAutolinkSupport(false));
354 ol.endHeaderSection();
355 }
356 else
357 {
358 ol.startPageDoc("");
359 }
361 //2.}
362
363 bool pageWithSections = hasSections();
364 ol.startContents();
365 if ((m_localToc.isHtmlEnabled() || m_localToc.isLatexEnabled() || m_localToc.isDocbookEnabled())
366 && pageWithSections)
367 {
368 writeToc(ol, m_localToc);
369 }
370
372 ol.endContents();
373 ol.endPageDoc();
374
375 if (generateTreeView && getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX))
376 {
377 endFileWithNavPath(ol,toDefinitionMutable(const_cast<Definition*>(getOuterScope())));
378 }
379 else
380 {
381 if (generateTreeView && Config_getBool(PAGE_OUTLINE_PANEL) && pageWithSections)
382 {
385 ol.writeString("</div><!-- doc-content -->\n");
387 ol.writeString("</div><!-- container -->\n");
389 endFile(ol,true);
390 }
391 else
392 {
393 endFile(ol,false,true);
394 }
395 }
396
398 //1.}
399}
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:120
const T * find(const std::string &key) const
Definition linkedmap.h:47
void writeString(const QCString &text)
Definition outputlist.h:411
void endTitleHead(const QCString &fileName, const QCString &name)
Definition outputlist.h:405
void endSection(const QCString &lab, SectionType t)
Definition outputlist.h:588
void disable(OutputType o)
void startTitleHead(const QCString &fileName)
Definition outputlist.h:403
void endContents()
Definition outputlist.h:620
void endHeaderSection()
Definition outputlist.h:467
void startHeaderSection()
Definition outputlist.h:465
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, const DocOptions &options)
void endPageDoc()
Definition outputlist.h:624
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void endQuickIndices()
Definition outputlist.h:604
void startPageDoc(const QCString &pageTitle)
Definition outputlist.h:622
void startContents()
Definition outputlist.h:618
void enableAll()
virtual bool hasParentPage() const =0
void writePageNavigation(OutputList &ol) const override
Definition pagedef.cpp:443
void writePageDocumentation(OutputList &ol) const override
Definition pagedef.cpp:401
static SectionManager & instance()
returns a reference to the singleton
Definition section.h:179
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, bool isSource, 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
QCString escapeCharsInString(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3310

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

402{
403 ol.startTextBlock();
404 QCString docStr = (briefDescription().isEmpty()?"":briefDescription()+"\n\n")+documentation()+inbodyDocumentation();
406 {
409 ol.writeString(" - ");
411 }
412 ol.generateDoc(
413 docFile(), // fileName
414 docLine(), // startLine
415 this, // context
416 nullptr, // memberdef
417 docStr, // docStr
418 DocOptions()
419 .setIndexWords(true));
420 ol.endTextBlock();
421
422 if (hasSubPages())
423 {
424 // for printed documentation we write subpages as section's of the
425 // parent page.
427 ol.disableAll();
431
432 for (const auto &subPage : m_subPages)
433 {
434 ol.writePageLink(subPage->getOutputFileBase(), FALSE);
435 }
436
438 }
439
441}
bool hasBriefDescription() const override
bool hasRequirementRefs() const override
void writeRequirementRefs(OutputList &ol) const override
int docLine() const override
void endTextBlock(bool paraBreak=FALSE)
Definition outputlist.h:672
void enable(OutputType o)
void startTextBlock(bool dense=FALSE)
Definition outputlist.h:670
void disableAll()
void writePageLink(const QCString &name, bool first)
Definition outputlist.h:389
bool hasSubPages() const override
Definition pagedef.cpp:465

References DefinitionMixin< PageDef >::briefDescription(), OutputList::disableAll(), OutputList::disableAllBut(), Docbook, DefinitionMixin< PageDef >::docFile(), DefinitionMixin< PageDef >::docLine(), DefinitionMixin< PageDef >::documentation(), OutputList::enable(), OutputList::endTextBlock(), FALSE, OutputList::generateDoc(), DefinitionMixin< PageDef >::hasBriefDescription(), DefinitionMixin< PageDef >::hasRequirementRefs(), hasSubPages(), DefinitionMixin< PageDef >::inbodyDocumentation(), SectionManager::instance(), QCString::isEmpty(), 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 443 of file pagedef.cpp.

444{
445 ol.writePageOutline();
446}
void writePageOutline()
Definition outputlist.h:616

References OutputList::writePageOutline().

Referenced by writeDocumentation().

◆ writeTagFile()

void PageDefImpl::writeTagFile ( TextStream & tagFile)
overridevirtual

Implements PageDef.

Definition at line 227 of file pagedef.cpp.

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

References addHtmlExtensionIfMissing(), convertToXML(), 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 73 of file pagedef.cpp.

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

◆ m_localToc

LocalToc PageDefImpl::m_localToc
private

Definition at line 78 of file pagedef.cpp.

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

◆ m_nestingLevel

int PageDefImpl::m_nestingLevel
private

Definition at line 77 of file pagedef.cpp.

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

◆ m_pageScope

Definition* PageDefImpl::m_pageScope
private

Definition at line 76 of file pagedef.cpp.

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

◆ m_showLineNo

bool PageDefImpl::m_showLineNo
private

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

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


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