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

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

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 QCString titleAsHtml = parseCommentAsHtml(this,nullptr,si->title(),si->fileName(),si->lineNr());
180 // determine if there is a next level inside this item, but be aware of the anchor and table section references.
181 auto it_next = std::next(it);
182 bool isDir = (it_next!=sectionRefs.end()) ? ((*it_next)->type().isSection() && (*it_next)->type().level() > nextLevel) : false;
183 Doxygen::indexList->addContentsItem(isDir, // isDir
184 title, // name
185 getReference(), // ref
186 getOutputFileBase(), // file
187 si->label(), // anchor
188 false, // separateIndex
189 true, // addToNavIndex
190 nullptr, // def
191 titleAsHtml); // nameAsHtml
192 level = nextLevel;
193 }
194 }
195 while (level>1)
196 {
198 level--;
199 }
200}
QCString getReference() const override
const SectionRefs & getSectionRefs() const override
static IndexList * indexList
Definition doxygen.h:134
void decContentsDepth()
Definition indexlist.h:113
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:116
void incContentsDepth()
Definition indexlist.h:110
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 parseCommentAsHtml(const Definition *scope, const MemberDef *member, const QCString &doc, const QCString &fileName, int lineNr)
Definition util.cpp:5927
QCString parseCommentAsText(const Definition *scope, const MemberDef *md, const QCString &doc, const QCString &fileName, int lineNr)
Definition util.cpp:5876

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

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

◆ documentedPage()

bool PageDefImpl::documentedPage ( ) const
overridevirtual

Implements PageDef.

Definition at line 445 of file pagedef.cpp.

446{
447 return // not part of a group
448 !getGroupDef() &&
449 // not an externally defined page
450 !isReference();
451}
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 202 of file pagedef.cpp.

203{
204 return getOuterScope() &&
206}
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 453 of file pagedef.cpp.

454{
455 return !m_subPages.empty();
456}

References m_subPages.

Referenced by writePageDocumentation().

◆ hasTitle()

bool PageDefImpl::hasTitle ( ) const
overridevirtual

Implements PageDef.

Definition at line 478 of file pagedef.cpp.

479{
480 return !m_title.isEmpty() && m_title.lower()!="notitle";
481}

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

464{
465 m_localToc = lt;
466}

References m_localToc.

◆ setNestingLevel()

void PageDefImpl::setNestingLevel ( int l)
overridevirtual

Implements PageDef.

Definition at line 458 of file pagedef.cpp.

459{
460 m_nestingLevel = l;
461}

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

469{
470 m_showLineNo = b;
471}

References m_showLineNo.

◆ setTitle()

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

Implements PageDef.

Definition at line 483 of file pagedef.cpp.

484{
485 m_title = title;
486}

References m_title, and title().

◆ showLineNo()

bool PageDefImpl::showLineNo ( ) const
overridevirtual

Implements PageDef.

Definition at line 473 of file pagedef.cpp.

474{
475 return m_showLineNo;
476}

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

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

239{
240 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
241 int hierarchyLevel = -1; // Pages start at the root
242 PageDef *pd = this;
243 while (pd->hasParentPage())
244 {
245 pd = (PageDef *)pd->getOuterScope();
246 ++hierarchyLevel;
247 }
248
249 //outputList->disable(OutputType::Man);
250 QCString pageName,manPageName;
251 pageName = escapeCharsInString(name(),FALSE,TRUE);
252 manPageName = escapeCharsInString(name(),TRUE,TRUE);
253
254 //printf("PageDefImpl::writeDocumentation: %s\n",getOutputFileBase().data());
255
257 //1.{
258
260 //2.{
262 startFile(ol,getOutputFileBase(),manPageName,title(),HighlightedItem::Pages,!generateTreeView,
263 QCString() /* altSidebarName */, hierarchyLevel);
264 ol.enableAll();
266 startFile(ol,getOutputFileBase(),pageName,title(),HighlightedItem::Pages,!generateTreeView,
267 QCString() /* altSidebarName */, hierarchyLevel);
269 //2.}
270
271 if (!generateTreeView)
272 {
273 if (getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX))
274 {
275 DefinitionMutable *outerScope = toDefinitionMutable(getOuterScope());
276 if (outerScope)
277 {
278 outerScope->writeNavigationPath(ol);
279 }
280 }
281 ol.endQuickIndices();
282 }
283 const SectionInfo *si=SectionManager::instance().find(name());
284
285 // save old generator state and write title only to Man generator
287 //2.{
289 ol.startTitleHead(manPageName);
290 ol.endTitleHead(manPageName, manPageName);
291 if (si)
292 {
293 ol.writeString(" - ");
294
295 if (si->title() != manPageName)
296 {
297 ol.generateDoc(docFile(),getStartBodyLine(),this,nullptr,si->title(),true,false,
298 QCString(),true,false,Config_getBool(MARKDOWN_SUPPORT),false);
299 ol.endSection(si->label(),si->type());
300 }
301 }
303 //2.}
304
306 //2.{
308 QCString title;
309 if (this == Doxygen::mainPage.get() && !hasTitle())
311 else
312 title = m_title;
313
314 if (!title.isEmpty() && !name().isEmpty() && si!=nullptr)
315 {
316 ol.startPageDoc(si->title());
319 ol.generateDoc(docFile(),getStartBodyLine(),this,nullptr,title,true,false,
320 QCString(),true,false,Config_getBool(MARKDOWN_SUPPORT),false);
322 ol.endHeaderSection();
323 }
324 else
325 {
326 ol.startPageDoc("");
327 }
329 //2.}
330
331 bool pageWithSections = hasSections();
332 ol.startContents();
333 if ((m_localToc.isHtmlEnabled() || m_localToc.isLatexEnabled() || m_localToc.isDocbookEnabled())
334 && pageWithSections)
335 {
336 writeToc(ol, m_localToc);
337 }
338
340 ol.endContents();
341 ol.endPageDoc();
342
343 if (generateTreeView && getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX))
344 {
345 endFileWithNavPath(ol,toDefinitionMutable(const_cast<Definition*>(getOuterScope())));
346 }
347 else
348 {
349 if (generateTreeView && Config_getBool(PAGE_OUTLINE_PANEL) && pageWithSections)
350 {
353 ol.writeString("</div><!-- doc-content -->\n");
355 ol.writeString("</div><!-- container -->\n");
357 endFile(ol,true);
358 }
359 else
360 {
361 endFile(ol,false,true);
362 }
363 }
364
366 //1.}
367}
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:413
void endTitleHead(const QCString &fileName, const QCString &name)
Definition outputlist.h:407
void endSection(const QCString &lab, SectionType t)
Definition outputlist.h:590
void disable(OutputType o)
void startTitleHead(const QCString &fileName)
Definition outputlist.h:405
void endContents()
Definition outputlist.h:622
void endHeaderSection()
Definition outputlist.h:469
void startHeaderSection()
Definition outputlist.h:467
void endPageDoc()
Definition outputlist.h:626
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void endQuickIndices()
Definition outputlist.h:606
void startPageDoc(const QCString &pageTitle)
Definition outputlist.h:624
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=Config_getBool(MARKDOWN_SUPPORT), bool autolinkSupport=Config_getBool(AUTOLINK_SUPPORT))
void startContents()
Definition outputlist.h:620
void enableAll()
virtual bool hasParentPage() const =0
void writePageNavigation(OutputList &ol) const override
Definition pagedef.cpp:431
void writePageDocumentation(OutputList &ol) const override
Definition pagedef.cpp:369
static SectionManager & instance()
returns a reference to the singleton
Definition section.h:178
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:3843

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

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

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

432{
433 ol.writePageOutline();
434}
void writePageOutline()
Definition outputlist.h:618

References OutputList::writePageOutline().

Referenced by writeDocumentation().

◆ writeTagFile()

void PageDefImpl::writeTagFile ( TextStream & tagFile)
overridevirtual

Implements PageDef.

Definition at line 208 of file pagedef.cpp.

209{
210 bool found = name()=="citelist";
212 {
213 if (rl->listName()==name())
214 {
215 found=TRUE;
216 break;
217 }
218 }
219 if (!found) // not one of the generated related pages
220 {
221 QCString fn = getOutputFileBase();
223 tagFile << " <compound kind=\"page\">\n";
224 tagFile << " <name>" << name() << "</name>\n";
225 tagFile << " <title>" << convertToXML(title()) << "</title>\n";
226 tagFile << " <filename>" << fn << "</filename>\n";
227 for (const auto &subPage : m_subPages)
228 {
229 QCString sfn = subPage->getOutputFileBase();
231 tagFile << " <subpage>" << sfn << "</subpage>\n";
232 }
234 tagFile << " </compound>\n";
235 }
236}
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:4425
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5412

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