Doxygen
Loading...
Searching...
No Matches
pagedef.cpp
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Copyright (C) 1997-2015 by Dimitri van Heesch.
4 *
5 * Permission to use, copy, modify, and distribute this software and its
6 * documentation under the terms of the GNU General Public License is hereby
7 * granted. No representations are made about the suitability of this software
8 * for any purpose. It is provided "as is" without express or implied warranty.
9 * See the GNU General Public License for more details.
10 *
11 * Documents produced by Doxygen are derivative works derived from the
12 * input used in their production; they are not affected by this license.
13 *
14 */
15
16// own header
17#include "pagedef.h"
18
19// other includes
20#include "config.h"
21#include "definitionimpl.h"
22#include "docparser.h"
23#include "doxygen.h"
24#include "entry.h"
25#include "groupdef.h"
26#include "indexlist.h"
27#include "language.h"
28#include "message.h"
29#include "namespacedef.h"
30#include "outputlist.h"
31#include "reflist.h"
32#include "util.h"
33
34//------------------------------------------------------------------------------------------
35
36class PageDefImpl final : public DefinitionMixin<PageDef>
37{
38 public:
39 PageDefImpl(const DString &f,int l,const DString &n,const DString &d,const DString &t);
40 ~PageDefImpl() override;
42
43 void setFileName(const DString &name) override;
44 void setLocalToc(const LocalToc &tl) override;
45 void setShowLineNo(bool) override;
46 DefType definitionType() const override { return TypePage; }
48 bool isLinkableInProject() const override { return /*hasDocumentation() &&*/ !isReference(); }
49 bool isLinkable() const override { return isLinkableInProject() || isReference(); }
50 DString getOutputFileBase() const override;
51 DString anchor() const override { return DString(); }
52 void findSectionsInDocumentation() override;
53 DString title() const override { return m_title; }
54 DString titleAsText() const override;
55 const GroupDef * getGroupDef() const override;
56 const PageLinkedRefMap &getSubPages() const override { return m_subPages; }
57 void addInnerCompound(Definition *d) override;
58 bool visibleInIndex() const override;
59 bool documentedPage() const override;
60 bool hasSubPages() const override;
61 bool hasParentPage() const override;
62 bool hasTitle() const override;
63 LocalToc localToc() const override { return m_localToc; }
64 void setPageScope(Definition *d) override { m_pageScope = d; }
65 Definition *getPageScope() const override { return m_pageScope; }
66 DString displayName(bool=true) const override { return hasTitle() ? m_title : DefinitionMixin::name(); }
67 bool showLineNo() const override;
68 void setTitle(const DString &title) override;
69 void writeDocumentation(OutputList &ol) override;
70 void writeTagFile(TextStream &) override;
71 void setNestingLevel(int l) override;
72 void writePageDocumentation(OutputList &ol) const override;
73 void addSectionsToIndex() override;
74 void writePageNavigation(OutputList &ol) const override;
75 void addListReferences() override;
76 void addRequirementReferences() override;
77
78 private:
82 PageLinkedRefMap m_subPages; // list of pages in the group
87};
88
89std::unique_ptr<PageDef> createPageDef(const DString &f,int l,const DString &n,const DString &d,const DString &t)
90{
91 return std::make_unique<PageDefImpl>(f,l,n,d,t);
92}
93
94//------------------------------------------------------------------------------------------
95
97 const DString &d,const DString &t)
98 : DefinitionMixin(f,l,1,n)
99{
100 setDocumentation(d,f,l);
101 m_pageScope = nullptr;
102 m_nestingLevel = 0;
103 m_fileName = ::convertNameToFile(n,false,true);
104 m_showLineNo = false;
105 setTitle(t);
106}
107
111
118
120{
121 return !partOfGroups().empty() ? partOfGroups().front() : nullptr;
122}
123
125{
126 if (getGroupDef())
127 return getGroupDef()->getOutputFileBase();
128 else
129 return m_fileName;
130}
131
136
138{
140 {
141 PageDef *pd = toPageDef(def);
142 if (pd)
143 {
144 m_subPages.add(pd->name(),pd);
145 pd->setOuterScope(this);
146 if (this==Doxygen::mainPage.get())
147 {
149 }
150 else
151 {
153 }
154 }
155 }
156}
157
159{
160 const SectionRefs &sectionRefs = getSectionRefs();
161 if (sectionRefs.empty()) return;
162 //printf("PageDefImpl::addSectionsToIndex()\n");
163 int level=1;
164 for (auto it = sectionRefs.begin(); it!=sectionRefs.end(); ++it)
165 {
166 const SectionInfo *si = *it;
167 SectionType type = si->type();
168 if (type.isSection())
169 {
170 //printf(" level=%d title=%s\n",level,qPrint(si->title));
171 int nextLevel = type.level();
172 if (nextLevel>level)
173 {
174 for (int i=level;i<nextLevel;i++)
175 {
177 }
178 }
179 else if (nextLevel<level)
180 {
181 for (int i=nextLevel;i<level;i++)
182 {
184 }
185 }
186 DString title = si->title();
187 if (title.empty()) title = si->label();
188 title = parseCommentAsText(this,nullptr,title,si->fileName(),si->lineNr());
189 DString titleAsHtml = parseCommentAsHtml(this,nullptr,si->title(),si->fileName(),si->lineNr());
190 // determine if there is a next level inside this item, but be aware of the anchor and table section references.
191 auto it_next = std::next(it);
192 bool isDir = (it_next!=sectionRefs.end()) ? ((*it_next)->type().isSection() && (*it_next)->type().level() > nextLevel) : false;
193 Doxygen::indexList->addContentsItem(isDir, // isDir
194 title, // name
195 getReference(), // ref
196 getOutputFileBase(), // file
197 si->label(), // anchor
198 false, // separateIndex
199 true, // addToNavIndex
200 nullptr, // def
201 titleAsHtml); // nameAsHtml
202 level = nextLevel;
203 }
204 }
205 while (level>1)
206 {
208 level--;
209 }
210}
211
213{
215 if (getGroupDef())
216 {
218 }
220 theTranslator->trPage(true,true),
221 name,title(),DString(),nullptr);
222}
223
228
234
236{
237 bool found = name()=="citelist" || name()=="requirements";
239 {
240 if (rl->listName()==name())
241 {
242 found=true;
243 break;
244 }
245 }
246 if (!found) // not one of the generated related pages
247 {
250 tagFile << " <compound kind=\"page\">\n";
251 tagFile << " <name>" << name() << "</name>\n";
252 tagFile << " <title>" << convertToXML(title()) << "</title>\n";
253 tagFile << " <filename>" << fn << "</filename>\n";
254 for (const auto &subPage : m_subPages)
255 {
256 DString sfn = subPage->getOutputFileBase();
258 tagFile << " <subpage>" << sfn << "</subpage>\n";
259 }
261 tagFile << " </compound>\n";
262 }
263}
264
266{
267 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
268 int hierarchyLevel = -1; // Pages start at the root
269 PageDef *pd = this;
270 while (pd && pd->hasParentPage())
271 {
272 pd = dynamic_cast<PageDef *>(pd->getOuterScope());
273 ++hierarchyLevel;
274 }
275
276 //outputList->disable(OutputType::Man);
277 DString pageName,manPageName;
278 pageName = escapeCharsInString(name(),false,true);
279 manPageName = escapeCharsInString(name(),true,true);
280
281 //printf("PageDefImpl::writeDocumentation: %s\n",getOutputFileBase().data());
282
284 //1.{
285
287 //2.{
289 startFile(ol,getOutputFileBase(),false,manPageName,titleAsText(),HighlightedItem::Pages,!generateTreeView,
290 DString() /* altSidebarName */, hierarchyLevel);
291 ol.enableAll();
293 startFile(ol,getOutputFileBase(),false,pageName,titleAsText(),HighlightedItem::Pages,!generateTreeView,
294 DString() /* altSidebarName */, hierarchyLevel);
296 //2.}
297
298 if (!generateTreeView)
299 {
300 if (getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX))
301 {
303 if (outerScope)
304 {
305 outerScope->writeNavigationPath(ol);
306 }
307 }
308 ol.endQuickIndices();
309 }
311
312 // save old generator state and write title only to Man generator
314 //2.{
316 ol.startTitleHead(manPageName);
317 ol.endTitleHead(manPageName, manPageName);
318 if (si)
319 {
320 ol.writeString(" - ");
321
322 if (si->title() != manPageName)
323 {
324 ol.generateDoc(docFile(),
326 this,
327 nullptr,
328 si->title(),
329 DocOptions()
330 .setSingleLine(true)
331 .setAutolinkSupport(false));
332 ol.endSection(si->label(),si->type());
333 }
334 }
336 //2.}
337
339 //2.{
342 if (this == Doxygen::mainPage.get() && !hasTitle())
344 else
345 title = m_title;
346
347 if (!title.empty() && !name().empty() && si!=nullptr)
348 {
349 ol.startPageDoc(si->title());
352 ol.generateDoc(docFile(),
354 this,
355 nullptr,
356 title,
357 DocOptions()
358 .setIndexWords(true)
359 .setSingleLine(true)
360 .setAutolinkSupport(false));
362 ol.endHeaderSection();
363 }
364 else
365 {
366 ol.startPageDoc("");
367 }
369 //2.}
370
371 bool pageWithSections = hasSections();
372 ol.startContents();
374 && pageWithSections)
375 {
376 writeToc(ol, m_localToc);
377 }
378
380 ol.endContents();
381 ol.endPageDoc();
382
383 if (generateTreeView && getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX))
384 {
386 }
387 else
388 {
389 if (generateTreeView && Config_getBool(PAGE_OUTLINE_PANEL) && pageWithSections)
390 {
393 ol.writeString("</div><!-- doc-content -->\n");
395 ol.writeString("</div><!-- container -->\n");
397 endFile(ol,true);
398 }
399 else
400 {
401 endFile(ol,false,true);
402 }
403 }
404
406 //1.}
407}
408
410{
411 ol.startTextBlock();
414 {
417 ol.writeString(" - ");
419 }
420 ol.generateDoc(
421 docFile(), // fileName
422 docLine(), // startLine
423 this, // context
424 nullptr, // memberdef
425 docStr, // docStr
426 DocOptions()
427 .setIndexWords(true));
428 ol.endTextBlock();
429
430 if (hasSubPages())
431 {
432 // for printed documentation we write subpages as section's of the
433 // parent page.
435 ol.disableAll();
439
440 for (const auto &subPage : m_subPages)
441 {
442 ol.writePageLink(subPage->getOutputFileBase(), false);
443 }
444
446 }
447
449}
450
455
457{
458 bool externalPages = Config_getBool(EXTERNAL_PAGES);
459 return // not part of a group
460 !getGroupDef() &&
461 // not an externally defined page
462 (!isReference() || externalPages);
463}
464
466{
467 return // not part of a group
468 !getGroupDef() &&
469 // not an externally defined page
470 !isReference();
471}
472
474{
475 return !m_subPages.empty();
476}
477
479{
480 m_nestingLevel = l;
481}
482
484{
485 m_localToc = lt;
486}
487
489{
490 m_showLineNo = b;
491}
492
494{
495 return m_showLineNo;
496}
497
499{
500 return !m_title.empty() && m_title.lower()!="notitle";
501}
502
504{
505 if (!title.empty())
506 {
507 m_title = title;
509 }
510 else
511 {
512 m_title = name();
514 }
515}
516
518{
519 return m_titleAsText;
520}
521
522// ----------------------
523
524PageDef *addRelatedPage(const DString &name,const DString &ptitle,
525 const DString &doc,
526 const DString &fileName,
527 int docLine,
528 int startLine,
529 const RefItemVector &sli,
530 GroupDef *gd,
531 const TagInfo *tagInfo,
532 bool xref,
533 SrcLangExt lang
534 )
535{
536 PageDef *pd=nullptr;
537 //printf("addRelatedPage(name=%s gd=%p)\n",qPrint(name),gd);
538 DString title=ptitle.stripWhiteSpace();
539 bool newPage = true;
540 if ((pd=Doxygen::pageLinkedMap->find(name)) && !pd->isReference())
541 {
542 if (!xref && !title.empty() && pd->title()!=pd->name() && pd->title()!=title)
543 {
544 warn(fileName,startLine,"multiple use of page label '{}' with different titles, (other occurrence: {}, line: {})",
545 name,pd->docFile(),pd->getStartBodyLine());
546 }
547 if (!title.empty() && pd->title()==pd->name()) // pd has no real title yet
548 {
549 pd->setTitle(title);
551 if (si)
552 {
553 si->setTitle(title);
554 }
555 }
556 // append documentation block to the page.
557 pd->setDocumentation(doc,fileName,docLine);
558 //printf("Adding page docs '%s' pi=%p name=%s\n",qPrint(doc),pd,name);
559 // append (x)refitems to the page.
560 pd->setRefItems(sli);
561 newPage = false;
562 }
563
564 if (newPage) // new page
565 {
566 DString baseName=name;
567 if (baseName.endsWith(".tex"))
568 baseName=baseName.left(baseName.length()-4);
570 baseName=baseName.left(baseName.length()-Doxygen::htmlFileExtension.length());
571
572 //printf("Appending page '%s'\n",qPrint(baseName));
573 if (pd) // replace existing page
574 {
575 pd->setDocumentation(doc,fileName,docLine);
576 pd->setFileName(::convertNameToFile(baseName,false,true));
577 pd->setShowLineNo(false);
578 pd->setNestingLevel(0);
579 pd->setPageScope(nullptr);
580 pd->setTitle(title);
581 pd->setReference(DString());
582 }
583 else // newPage
584 {
585 pd = Doxygen::pageLinkedMap->add(baseName,
586 createPageDef(fileName,docLine,baseName,doc,title));
587 }
588 pd->setBodySegment(startLine,startLine,-1);
589
590 pd->setRefItems(sli);
591 pd->setLanguage(lang);
592
593 if (tagInfo)
594 {
595 pd->setReference(tagInfo->tagName);
596 pd->setFileName(tagInfo->fileName);
597 }
598
599 if (gd) gd->addPage(pd);
600
601 if (pd->hasTitle())
602 {
603 //outputList->writeTitle(pi->name,pi->title);
604
605 // a page name is a label as well!
606 DString file;
607 DString orgFile;
608 int line = -1;
609 if (gd)
610 {
611 file=gd->getOutputFileBase();
612 orgFile=gd->getOutputFileBase();
613 }
614 else
615 {
616 file=pd->getOutputFileBase();
617 orgFile=pd->docFile();
618 line = pd->getStartBodyLine();
619 }
620 const SectionInfo *si = SectionManager::instance().find(pd->name());
621 if (si)
622 {
623 if (!si->ref().empty()) // we are from a tag file
624 {
626 file,-1,pd->title(),SectionType::Page,0,pd->getReference());
627 }
628 else if (si->lineNr() != -1)
629 {
630 warn(orgFile,line,"multiple use of section label '{}', (first occurrence: {}, line {})",pd->name(),si->fileName(),si->lineNr());
631 }
632 else
633 {
634 warn(orgFile,line,"multiple use of section label '{}', (first occurrence: {})",pd->name(),si->fileName());
635 }
636 }
637 else
638 {
640 file,-1,pd->title(),SectionType::Page,0,pd->getReference());
641 //printf("si->label='%s' si->definition=%s si->fileName='%s'\n",
642 // qPrint(si->label),si->definition?si->definition->name().data():"<none>",
643 // qPrint(si->fileName));
644 //printf(" SectionInfo: sec=%p sec->fileName=%s\n",si,qPrint(si->fileName));
645 //printf("Adding section key=%s si->fileName=%s\n",qPrint(pageName),qPrint(si->fileName));
646 }
647 }
648 }
649 return pd;
650}
651
652
653
654// --- Cast functions
655
657{
658 return (d && typeid(*d) == typeid(PageDefImpl)) ? static_cast<PageDef*>(d) : nullptr;
659}
660
662{
663 return (d && typeid(*d) == typeid(PageDefImpl)) ? static_cast<const PageDef*>(d) : nullptr;
664}
665
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition dstring.h:84
DString lower() const
Definition dstring.h:326
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
Definition dstring.h:148
DString right(size_t len) const
Definition dstring.h:311
DString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition dstring.h:337
DString left(size_t len) const
Definition dstring.h:306
bool endsWith(const char *s) const
Definition dstring.h:617
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition dstring.h:151
The common base class of all entity definitions found in the sources.
Definition definition.h:77
virtual DefType definitionType() const =0
virtual const DString & name() const =0
virtual DString getReference() const =0
virtual Definition * getOuterScope() const =0
virtual DString docFile() const =0
virtual int getStartBodyLine() const =0
virtual bool isReference() const =0
virtual DString getOutputFileBase() const =0
friend DefinitionMutable * toDefinitionMutable(Definition *)
bool isReference() const override
DString docFile() const override
bool hasBriefDescription() const override
bool hasRequirementRefs() const override
DString briefDescription(bool abbreviate=false) const override
const DString & name() const override
DString getReference() const override
void writeRequirementRefs(OutputList &ol) const override
const RefItemVector & xrefListItems() const override
Definition * getOuterScope() const override
void setDocumentation(const DString &doc, const DString &docFile, int docLine, bool stripWhiteSpace=true) override
DString documentation() const override
const GroupList & partOfGroups() const override
DefinitionMixin(const DString &defFileName, int defLine, size_t defColumn, const DString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=true)
DString inbodyDocumentation() const override
int getStartBodyLine() const override
void writeToc(OutputList &ol, const LocalToc &lt) const override
bool hasSections() const override
int docLine() const override
const SectionRefs & getSectionRefs() const override
void writeDocAnchorsToTagFile(TextStream &fs) const override
virtual void setBodySegment(int defLine, int bls, int ble)=0
virtual void setReference(const DString &r)=0
virtual void setDocumentation(const DString &d, const DString &docFile, int docLine, bool stripWhiteSpace=true)=0
virtual void setLanguage(SrcLangExt lang)=0
virtual void setOuterScope(Definition *d)=0
virtual void writeNavigationPath(OutputList &ol) const =0
virtual void setRefItems(const RefItemVector &sli)=0
static std::unique_ptr< PageDef > mainPage
Definition doxygen.h:93
static NamespaceDefMutable * globalScope
Definition doxygen.h:114
static IndexList * indexList
Definition doxygen.h:125
static PageLinkedMap * pageLinkedMap
Definition doxygen.h:92
static DString htmlFileExtension
Definition doxygen.h:115
A model of a group of symbols.
Definition groupdef.h:48
virtual void addPage(PageDef *def)=0
void decContentsDepth()
Definition indexlist.h:110
void addContentsItem(bool isDir, const DString &name, const DString &ref, const DString &file, const DString &anchor, bool separateIndex=false, bool addToNavIndex=false, const Definition *def=nullptr, const DString &nameAsHtml=DString())
Definition indexlist.h:113
void incContentsDepth()
Definition indexlist.h:107
std::unique_ptr< RefList > Ptr
Definition linkedmap.h:38
T * add(const char *k, Args &&... args)
Definition linkedmap.h:90
const T * find(const std::string &key) const
Definition linkedmap.h:47
bool add(const char *k, T *obj)
Definition linkedmap.h:284
bool empty() const
Definition linkedmap.h:374
constexpr bool isDocbookEnabled() const noexcept
Definition types.h:657
constexpr bool isLatexEnabled() const noexcept
Definition types.h:655
constexpr bool isHtmlEnabled() const noexcept
Definition types.h:654
Class representing a list of output generators that are written to in parallel.
Definition outputlist.h:311
void startTitleHead(const DString &fileName)
Definition outputlist.h:399
void endTitleHead(const DString &fileName, const DString &name)
Definition outputlist.h:401
void disable(OutputType o)
void writePageLink(const DString &name, bool first)
Definition outputlist.h:385
void enable(OutputType o)
void endContents()
Definition outputlist.h:616
void endHeaderSection()
Definition outputlist.h:463
void endTextBlock(bool paraBreak=false)
Definition outputlist.h:668
void startHeaderSection()
Definition outputlist.h:461
void endPageDoc()
Definition outputlist.h:620
void writeString(const DString &text)
Definition outputlist.h:407
void endSection(const DString &lab, SectionType t)
Definition outputlist.h:584
void disableAll()
void pushGeneratorState()
void disableAllBut(OutputType o)
void startTextBlock(bool dense=false)
Definition outputlist.h:666
void popGeneratorState()
void startPageDoc(const DString &pageTitle)
Definition outputlist.h:618
void endQuickIndices()
Definition outputlist.h:600
void writePageOutline()
Definition outputlist.h:612
void generateDoc(const DString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const DString &docStr, const DocOptions &options)
void startContents()
Definition outputlist.h:614
void enableAll()
A model of a page symbol.
Definition pagedef.h:27
virtual void setTitle(const DString &title)=0
virtual bool hasParentPage() const =0
virtual void setNestingLevel(int)=0
virtual bool hasTitle() const =0
virtual void setFileName(const DString &name)=0
virtual void setShowLineNo(bool)=0
virtual DString title() const =0
virtual void setPageScope(Definition *)=0
bool hasTitle() const override
Definition pagedef.cpp:498
void setNestingLevel(int l) override
Definition pagedef.cpp:478
void writeDocumentation(OutputList &ol) override
Definition pagedef.cpp:265
bool hasParentPage() const override
Definition pagedef.cpp:229
DString m_fileName
Definition pagedef.cpp:79
bool documentedPage() const override
Definition pagedef.cpp:465
LocalToc localToc() const override
Definition pagedef.cpp:63
DString getOutputFileBase() const override
Definition pagedef.cpp:124
void addListReferences() override
Definition pagedef.cpp:212
DString m_title
Definition pagedef.cpp:80
void addInnerCompound(Definition *d) override
Definition pagedef.cpp:137
void setFileName(const DString &name) override
Definition pagedef.cpp:132
DString displayName(bool=true) const override
Definition pagedef.cpp:66
~PageDefImpl() override
Definition pagedef.cpp:108
bool m_showLineNo
Definition pagedef.cpp:86
Definition * m_pageScope
Definition pagedef.cpp:83
LocalToc m_localToc
Definition pagedef.cpp:85
void addRequirementReferences() override
Definition pagedef.cpp:224
DString title() const override
Definition pagedef.cpp:53
void writeTagFile(TextStream &) override
Definition pagedef.cpp:235
void setTitle(const DString &title) override
Definition pagedef.cpp:503
PageDefImpl(const DString &f, int l, const DString &n, const DString &d, const DString &t)
Definition pagedef.cpp:96
bool showLineNo() const override
Definition pagedef.cpp:493
void findSectionsInDocumentation() override
Definition pagedef.cpp:112
void writePageNavigation(OutputList &ol) const override
Definition pagedef.cpp:451
DefType definitionType() const override
Definition pagedef.cpp:46
bool isLinkable() const override
Definition pagedef.cpp:49
bool isLinkableInProject() const override
Definition pagedef.cpp:48
void setShowLineNo(bool) override
Definition pagedef.cpp:488
const PageLinkedRefMap & getSubPages() const override
Definition pagedef.cpp:56
int m_nestingLevel
Definition pagedef.cpp:84
DString m_titleAsText
Definition pagedef.cpp:81
CodeSymbolType codeSymbolType() const override
Definition pagedef.cpp:47
DString titleAsText() const override
Definition pagedef.cpp:517
const GroupDef * getGroupDef() const override
Definition pagedef.cpp:119
bool visibleInIndex() const override
Definition pagedef.cpp:456
void writePageDocumentation(OutputList &ol) const override
Definition pagedef.cpp:409
void addSectionsToIndex() override
Definition pagedef.cpp:158
DString anchor() const override
Definition pagedef.cpp:51
void setLocalToc(const LocalToc &tl) override
Definition pagedef.cpp:483
void setPageScope(Definition *d) override
Definition pagedef.cpp:64
PageLinkedRefMap m_subPages
Definition pagedef.cpp:82
bool hasSubPages() const override
Definition pagedef.cpp:473
Definition * getPageScope() const override
Definition pagedef.cpp:65
static RefListManager & instance()
Definition reflist.h:120
static RequirementManager & instance()
void addRequirementRefsForSymbol(const Definition *symbol)
class that provide information about a section.
Definition section.h:58
void setTitle(const DString &t)
Definition section.h:84
DString fileName() const
Definition section.h:74
int lineNr() const
Definition section.h:73
SectionType type() const
Definition section.h:71
DString title() const
Definition section.h:70
DString ref() const
Definition section.h:72
DString label() const
Definition section.h:69
SectionInfo * replace(const DString &label, const DString &fileName, int lineNr, const DString &title, SectionType type, int level, const DString &ref=DString())
Definition section.h:157
SectionInfo * add(const SectionInfo &si)
Definition section.h:139
static SectionManager & instance()
returns a reference to the singleton
Definition section.h:179
class that represents a list of constant references to sections.
Definition section.h:103
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
static constexpr int Page
Definition section.h:31
This struct is used to capture the tag file information for an Entry.
Definition entry.h:101
DString tagName
Definition entry.h:103
DString fileName
Definition entry.h:104
Text streaming class that buffers data.
Definition textstream.h:36
virtual DString trPage(bool first_capital, bool singular)=0
virtual DString trMainPage()=0
#define Config_getBool(name)
Definition config.h:33
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition construct.h:37
DString parseCommentAsText(const Definition *scope, const MemberDef *md, const DString &doc, const DString &fileName, int lineNr)
DString parseCommentAsHtml(const Definition *scope, const MemberDef *member, const DString &doc, const DString &fileName, int lineNr)
void docFindSections(const DString &input, const Definition *d, const DString &fileName)
void endFileWithNavPath(OutputList &ol, const DefinitionMutable *d, bool showPageNavigation)
Definition index.cpp:452
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const DString &navPath)
Definition index.cpp:431
void startFile(OutputList &ol, const DString &name, bool isSource, const DString &manName, const DString &title, HighlightedItem hli, bool additionalIndices, const DString &altSidebarName, int hierarchyLevel, const DString &allMembersFile)
Definition index.cpp:405
Translator * theTranslator
Definition language.cpp:76
#define warn(file, line, fmt,...)
Definition message.h:97
PageDef * addRelatedPage(const DString &name, const DString &ptitle, const DString &doc, const DString &fileName, int docLine, int startLine, const RefItemVector &sli, GroupDef *gd, const TagInfo *tagInfo, bool xref, SrcLangExt lang)
Definition pagedef.cpp:524
PageDef * toPageDef(Definition *d)
Definition pagedef.cpp:656
std::unique_ptr< PageDef > createPageDef(const DString &f, int l, const DString &n, const DString &d, const DString &t)
Definition pagedef.cpp:89
void addRefItem(const RefItemVector &sli, const DString &key, const DString &prefix, const DString &name, const DString &title, const DString &args, const Definition *scope)
Definition reflist.h:134
std::vector< RefItem * > RefItemVector
Definition reflist.h:132
Helper class to pass options when calling OutputList::generateDoc().
Definition docoptions.h:24
CodeSymbolType
Definition types.h:481
SrcLangExt
Definition types.h:207
DString convertNameToFile(const DString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:2863
void addHtmlExtensionIfMissing(DString &fName)
Definition util.cpp:3931
DString convertToXML(const DString &s, bool keepEntities, const bool citeEntry)
Definition util.cpp:3232
DString escapeCharsInString(const DString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:2688
A bunch of utility functions.