Doxygen
Loading...
Searching...
No Matches
conceptdef.cpp
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Copyright (C) 1997-2021 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#include "conceptdef.h"
17#include "definitionimpl.h"
18#include "util.h"
19#include "config.h"
20#include "doxygen.h"
21#include "language.h"
22#include "outputlist.h"
23#include "searchindex.h"
24#include "message.h"
25#include "parserintf.h"
26#include "layout.h"
27#include "namespacedef.h"
28
29//------------------------------------------------------------------------------------
30
31class ConceptDefImpl : public DefinitionMixin<ConceptDefMutable>
32{
33 public:
34 ConceptDefImpl(const QCString &fileName,int startLine,int startColumn,
35 const QCString &name,const QCString &tagRef=QCString(),const QCString &tagFile=QCString());
36 ~ConceptDefImpl() override;
38
39 //---------- ConceptDef
40 DefType definitionType() const override;
42 QCString getOutputFileBase() const override;
43 bool hasDetailedDescription() const override;
44 QCString displayName(bool includeScope=true) const override;
45 const IncludeInfo *includeInfo() const override;
46 ArgumentList getTemplateParameterList() const override;
47 QCString anchor() const override;
48 bool isLinkableInProject() const override;
49 bool isLinkable() const override;
50 QCString initializer() const override;
51 void writeDeclarationLink(OutputList &ol,bool &found,
52 const QCString &header,bool localNames) const override;
53 const NamespaceDef *getNamespaceDef() const override;
54 const FileDef *getFileDef() const override;
55 const ModuleDef *getModuleDef() const override;
56 QCString title() const override;
57 int groupId() const override;
58
59 //---------- ConceptDefMutable
60 void setIncludeFile(FileDef *fd,const QCString &incName,bool local,bool force) override;
61 void setTemplateArguments(const ArgumentList &al) override;
62 void setNamespace(NamespaceDef *nd) override;
63 void setFileDef(FileDef *fd) override;
64 void setModuleDef(ModuleDef *mod) override;
65 void writeTagFile(TextStream &) override;
66 void writeDocumentation(OutputList &) override;
67 void setInitializer(const QCString &init) override;
68 void findSectionsInDocumentation() override;
69 void setGroupId(int id) override;
70
71 //---------- Helpers
72 void writeBriefDescription(OutputList &) const;
73 void writeAuthorSection(OutputList &ol) const;
74 void writeIncludeFiles(OutputList &ol) const;
75 void writeDetailedDescription(OutputList &ol,const QCString &title) const;
76 void writeDefinition(OutputList &ol,const QCString &title) const;
77 void addConceptAttributes(OutputList &ol) const;
78
79 private:
80 QCString m_fileName;
81 std::unique_ptr<IncludeInfo> m_incInfo;
82 NamespaceDef *m_nspace = nullptr;
83 FileDef *m_fileDef = nullptr;
84 ModuleDef *m_moduleDef = nullptr;
85 ArgumentList m_tArgList;
86 QCString m_initializer;
87 int m_groupId = -1;
88};
89
90std::unique_ptr<ConceptDef> createConceptDef(
91 const QCString &fileName,int startLine,int startColumn,
92 const QCString &name, const QCString &tagRef,const QCString &tagFile)
93{
94 return std::make_unique<ConceptDefImpl>(fileName,startLine,startColumn,name,tagRef,tagFile);
95}
96
97//------------------------------------------------------------------------------------
98
99class ConceptDefAliasImpl : public DefinitionAliasMixin<ConceptDef>
100{
101 public:
102 ConceptDefAliasImpl(const Definition *newScope,const ConceptDef *cd)
103 : DefinitionAliasMixin(newScope,cd) { init(); }
104 ~ConceptDefAliasImpl() override { deinit(); }
106
107 const ConceptDef *getCdAlias() const { return toConceptDef(getAlias()); }
108
109 DefType definitionType() const override { return TypeConcept; }
111 { return getCdAlias()->codeSymbolType(); }
112 QCString getOutputFileBase() const override
113 { return getCdAlias()->getOutputFileBase(); }
114 QCString getReference() const override
115 { return getCdAlias()->getReference(); }
116 bool isReference() const override
117 { return getCdAlias()->isReference(); }
118 bool hasDetailedDescription() const override
119 { return getCdAlias()->hasDetailedDescription(); }
120 QCString displayName(bool includeScope=true) const override
121 { return getCdAlias()->displayName(includeScope); }
122 const IncludeInfo *includeInfo() const override
123 { return getCdAlias()->includeInfo(); }
124 ArgumentList getTemplateParameterList() const override
125 { return getCdAlias()->getTemplateParameterList(); }
126 QCString anchor() const override
127 { return getCdAlias()->anchor(); }
128 bool isLinkableInProject() const override
129 { return getCdAlias()->isLinkableInProject(); }
130 bool isLinkable() const override
131 { return getCdAlias()->isLinkable(); }
132 QCString initializer() const override
133 { return getCdAlias()->initializer(); }
134 const NamespaceDef *getNamespaceDef() const override
135 { return getCdAlias()->getNamespaceDef(); }
136 const FileDef *getFileDef() const override
137 { return getCdAlias()->getFileDef(); }
138 const ModuleDef *getModuleDef() const override
139 { return getCdAlias()->getModuleDef(); }
140 QCString title() const override
141 { return getCdAlias()->title(); }
142 void writeDeclarationLink(OutputList &ol,bool &found,
143 const QCString &header,bool localNames) const override
144 { getCdAlias()->writeDeclarationLink(ol,found,header,localNames); }
145 int groupId() const override
146 { return getCdAlias()->groupId(); }
147};
148
149std::unique_ptr<ConceptDef> createConceptDefAlias(const Definition *newScope,const ConceptDef *cd)
150{
151 return std::make_unique<ConceptDefAliasImpl>(newScope,cd);
152}
153
154//------------------------------------------------------------------------------------
155
156ConceptDefImpl::ConceptDefImpl(const QCString &fileName,int startLine,int startColumn,
157 const QCString &name,const QCString &tagRef,const QCString &tagFile) : DefinitionMixin(fileName,startLine,startColumn,name)
158{
159 if (!tagFile.isEmpty())
160 {
161 if (!tagRef.isEmpty())
162 {
163 m_fileName = stripExtension(tagFile);
164 }
165 else
166 {
167 m_fileName = convertNameToFile(stripExtension(tagFile));
168 }
169 }
170 else
171 {
172 m_fileName = convertNameToFile(QCString("concept")+name);
173 }
174 setReference(tagRef);
175}
176
180
185
190
192{
193 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
194 bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
195 return ((!briefDescription().isEmpty() && repeatBrief) ||
196 !documentation().isEmpty() ||
197 (sourceBrowser && getStartBodyLine()!=-1 && getBodyDef()));
198}
199
201{
202 return "";
203}
204
205QCString ConceptDefImpl::displayName(bool includeScope) const
206{
207 return includeScope ? name() : localName();
208}
209
211{
212 return m_incInfo.get();
213}
214
219
221{
222 bool hideUndoc = Config_getBool(HIDE_UNDOC_CLASSES);
223 return (hasDocumentation() || !hideUndoc) && /* documented */
224 !isHidden() && /* not hidden */
225 !isReference(); /* not an external reference */
226}
227
229{
230 return isLinkableInProject() || isReference();
231}
232
233void ConceptDefImpl::setIncludeFile(FileDef *fd,const QCString &incName,bool local,bool force)
234{
235 if (!m_incInfo) m_incInfo = std::make_unique<IncludeInfo>();
236 if ((!incName.isEmpty() && m_incInfo->includeName.isEmpty()) ||
237 (fd!=nullptr && m_incInfo->fileDef==nullptr)
238 )
239 {
240 m_incInfo->fileDef = fd;
241 m_incInfo->includeName = incName;
243 }
244 if (force && !incName.isEmpty())
245 {
246 m_incInfo->includeName = incName;
248 }
249}
250
255
260
262{
263 return m_nspace;
264}
265
267{
268 m_fileDef=fd;
269}
270
275
277{
278 return m_fileDef;
279}
280
282{
283 return m_moduleDef;
284}
285
290
292{
293 return m_groupId;
294}
295
297{
298 m_groupId = id;
299}
300
302{
303 tagFile << " <compound kind=\"concept\">\n";
304 tagFile << " <name>" << convertToXML(name()) << "</name>\n";
305 QCString fn = getOutputFileBase();
307 tagFile << " <filename>" << convertToXML(fn) << "</filename>\n";
308 QCString idStr = id();
309 if (!idStr.isEmpty())
310 {
311 tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>\n";
312 }
314 tagFile << " </compound>\n";
315}
316
318{
320 {
321 auto parser { createDocParser() };
322 auto ast { validatingParseDoc(
323 *parser.get(),briefFile(),briefLine(),this,nullptr,
325 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
326 if (!ast->isEmpty())
327 {
328 ol.startParagraph();
331 ol.writeString(" - ");
333 ol.writeDoc(ast.get(),this,nullptr);
336 ol.writeString(" \n");
338
340 {
342 ol.startTextLink(getOutputFileBase(),"details");
344 ol.endTextLink();
345 }
347 ol.endParagraph();
348 }
349 }
350 ol.writeSynopsis();
351}
352
354{
355 if (m_incInfo)
356 {
357 QCString nm=m_incInfo->includeName.isEmpty() ?
358 (m_incInfo->fileDef ?
359 m_incInfo->fileDef->docName() : QCString()
360 ) :
361 m_incInfo->includeName;
362 if (!nm.isEmpty())
363 {
364 ol.startParagraph();
365 ol.startTypewriter();
370 ol.docify(nm);
373 if (m_incInfo->fileDef)
374 {
375 ol.writeObjectLink(QCString(),m_incInfo->fileDef->includeName(),QCString(),nm);
376 }
377 else
378 {
379 ol.docify(nm);
380 }
383 ol.endTypewriter();
384 ol.endParagraph();
385 }
386 }
387}
388
390{
391 TextStream t;
392 t << "template<";
393 bool first=true;
394 for (const auto &a : al)
395 {
396 if (!first) t << ", ";
397 t << a.type;
398 if (!a.name.isEmpty())
399 {
400 t << " " << a.name;
401 }
402 if (a.defval.length()!=0)
403 {
404 t << " " << a.defval;
405 }
406 first=false;
407 }
408 t << ">";
409 return t.str();
410}
411
413{
414 m_initializer = templateSpec(m_tArgList)+"\nconcept "+name()+" = "+init;
415}
416
421
423{
424 ol.startGroupHeader();
425 ol.parseText(title);
426 ol.endGroupHeader();
427
428 auto intf = Doxygen::parserManager->getCodeParser(".cpp");
429 intf->resetCodeParserState();
430 auto &codeOL = ol.codeGenerators();
431 codeOL.startCodeFragment("DoxyCode");
432 QCString scopeName;
434 TextStream conceptDef;
435 conceptDef << m_initializer;
436 intf->parseCode(codeOL,scopeName,conceptDef.str(),SrcLangExt::Cpp,Config_getBool(STRIP_CODE_COMMENTS),false,QCString(),
437 m_fileDef, -1,-1,true,nullptr,false,this);
438 codeOL.endCodeFragment("DoxyCode");
439}
440
442{
443 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
445 {
448 ol.writeRuler();
450
453 ol.writeAnchor(QCString(),"details");
455
456 ol.startGroupHeader();
457 ol.parseText(title);
458 ol.endGroupHeader();
459
460 ol.startTextBlock();
461 // repeat brief description
462 if (!briefDescription().isEmpty() && repeatBrief)
463 {
465 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
466 }
467 if (!briefDescription().isEmpty() && repeatBrief &&
468 !documentation().isEmpty())
469 {
472 ol.writeString("\n\n");
474 }
475
476 // write documentation
477 if (!documentation().isEmpty())
478 {
479 ol.generateDoc(docFile(),docLine(),this,nullptr,documentation(),TRUE,FALSE,
480 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
481 }
482
483 writeSourceDef(ol);
484 ol.endTextBlock();
485 }
486}
487
489{
490 // write Author section (Man only)
493 ol.startGroupHeader();
495 ol.endGroupHeader();
498}
499
501{
502 if (isExported())
503 {
506 ol.startLabels();
507 ol.writeLabel("export",false);
508 ol.endLabels();
510 }
511}
512
514{
515 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
516 QCString pageTitle = theTranslator->trConceptReference(displayName());
517 startFile(ol,getOutputFileBase(),name(),pageTitle,HighlightedItem::ConceptVisible,!generateTreeView);
518
519 // ---- navigation part
520 if (!generateTreeView)
521 {
523 {
525 }
526 ol.endQuickIndices();
527 }
528
529 // ---- title part
530 startTitle(ol,getOutputFileBase(),this);
531 ol.parseText(pageTitle);
533 addGroupListToTitle(ol,this);
535
536 // ---- contents part
537
538 ol.startContents();
539
540 //---------------------------------------- start flexible part -------------------------------
541
542 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Concept))
543 {
544 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
545 switch (lde->kind())
546 {
547 case LayoutDocEntry::BriefDesc:
549 break;
550 case LayoutDocEntry::ConceptDefinition:
551 if (ls) writeDefinition(ol,ls->title(getLanguage()));
552 break;
553 case LayoutDocEntry::DetailedDesc:
554 if (ls) writeDetailedDescription(ol,ls->title(getLanguage()));
555 break;
556 case LayoutDocEntry::AuthorSection:
558 break;
559 case LayoutDocEntry::ClassIncludes:
561 break;
562 case LayoutDocEntry::MemberDeclStart:
563 case LayoutDocEntry::NamespaceClasses:
564 case LayoutDocEntry::NamespaceInterfaces:
565 case LayoutDocEntry::NamespaceStructs:
566 case LayoutDocEntry::NamespaceExceptions:
567 case LayoutDocEntry::NamespaceConcepts:
568 case LayoutDocEntry::NamespaceNestedNamespaces:
569 case LayoutDocEntry::NamespaceNestedConstantGroups:
570 case LayoutDocEntry::MemberGroups:
571 case LayoutDocEntry::MemberDecl:
572 case LayoutDocEntry::MemberDeclEnd:
573 case LayoutDocEntry::MemberDefStart:
574 case LayoutDocEntry::NamespaceInlineClasses:
575 case LayoutDocEntry::MemberDef:
576 case LayoutDocEntry::MemberDefEnd:
577 case LayoutDocEntry::ClassInheritanceGraph:
578 case LayoutDocEntry::ClassNestedClasses:
579 case LayoutDocEntry::ClassCollaborationGraph:
580 case LayoutDocEntry::ClassAllMembersLink:
581 case LayoutDocEntry::ClassUsedFiles:
582 case LayoutDocEntry::ClassInlineClasses:
583 case LayoutDocEntry::FileClasses:
584 case LayoutDocEntry::FileConcepts:
585 case LayoutDocEntry::FileInterfaces:
586 case LayoutDocEntry::FileStructs:
587 case LayoutDocEntry::FileExceptions:
588 case LayoutDocEntry::FileNamespaces:
589 case LayoutDocEntry::FileConstantGroups:
590 case LayoutDocEntry::FileIncludes:
591 case LayoutDocEntry::FileIncludeGraph:
592 case LayoutDocEntry::FileIncludedByGraph:
593 case LayoutDocEntry::FileInlineClasses:
594 case LayoutDocEntry::FileSourceLink:
595 case LayoutDocEntry::GroupClasses:
596 case LayoutDocEntry::GroupConcepts:
597 case LayoutDocEntry::GroupModules:
598 case LayoutDocEntry::GroupInlineClasses:
599 case LayoutDocEntry::GroupNamespaces:
600 case LayoutDocEntry::GroupDirs:
601 case LayoutDocEntry::GroupNestedGroups:
602 case LayoutDocEntry::GroupFiles:
603 case LayoutDocEntry::GroupGraph:
604 case LayoutDocEntry::GroupPageDocs:
605 case LayoutDocEntry::ModuleExports:
606 case LayoutDocEntry::ModuleClasses:
607 case LayoutDocEntry::ModuleConcepts:
608 case LayoutDocEntry::ModuleUsedFiles:
609 case LayoutDocEntry::DirSubDirs:
610 case LayoutDocEntry::DirFiles:
611 case LayoutDocEntry::DirGraph:
612 err("Internal inconsistency: member %d should not be part of "
613 "LayoutDocManager::Concept entry list\n",lde->kind());
614 break;
615 }
616 }
617
618 //---------------------------------------- end flexible part -------------------------------
619
620 ol.endContents();
621
622 endFileWithNavPath(ol,this);
623}
624
625void ConceptDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const QCString &header,bool localNames) const
626{
627 if (isLinkable())
628 {
629 if (!found) // first concept
630 {
631 ol.startMemberHeader("concepts");
632 if (!header.isEmpty())
633 {
634 ol.parseText(header);
635 }
636 else
637 {
638 theTranslator->trConcept(true,false);
639 }
640 ol.endMemberHeader();
641 ol.startMemberList();
642 found=TRUE;
643 }
646 ol.writeString("concept ");
647 QCString cname = displayName(!localNames);
649 if (isLinkable())
650 {
653 anchor(),
654 cname
655 );
656 }
657 else
658 {
659 ol.startBold();
660 ol.docify(cname);
661 ol.endBold();
662 }
664 // add the brief description if available
665 if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
666 {
667 auto parser { createDocParser() };
668 auto ast { validatingParseDoc(
669 *parser.get(),briefFile(),briefLine(),this,nullptr,
671 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
672 if (!ast->isEmpty())
673 {
675 ol.writeDoc(ast.get(),this,nullptr);
677 }
678 }
679 ol.endMemberDeclaration(anchor(),QCString());
680 }
681}
682
689
690//------------------------------------------------------------------------------------
691
693{
694 bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
695 for (const auto &cd : *this)
696 {
697 bool isLink = cd->isLinkable();
698 if (isLink || !hideUndocClasses)
699 {
700 return true;
701 }
702 }
703 return false;
704}
705
706void ConceptLinkedRefMap::writeDeclaration(OutputList &ol,const QCString &header,bool localNames) const
707{
708 bool found=FALSE;
709 for (const auto &cd : *this)
710 {
711 cd->writeDeclarationLink(ol,found,header,localNames);
712 }
713 if (found) ol.endMemberList();
714}
715
716//------------------------------------------------------------------------------------
717
718// --- Cast functions
719//
721{
722 if (d && (typeid(*d)==typeid(ConceptDefImpl) || typeid(*d)==typeid(ConceptDefAliasImpl)))
723 {
724 return static_cast<ConceptDef*>(d);
725 }
726 else
727 {
728 return nullptr;
729 }
730}
731
733{
734 Definition *d = toDefinition(md);
735 if (d && typeid(*d)==typeid(ConceptDefImpl))
736 {
737 return static_cast<ConceptDef*>(d);
738 }
739 else
740 {
741 return nullptr;
742 }
743}
744
746{
747 if (d && (typeid(*d)==typeid(ConceptDefImpl) || typeid(*d)==typeid(ConceptDefAliasImpl)))
748 {
749 return static_cast<const ConceptDef*>(d);
750 }
751 else
752 {
753 return nullptr;
754 }
755}
756
758{
759 if (d && typeid(*d)==typeid(ConceptDefImpl))
760 {
761 return static_cast<ConceptDefMutable*>(d);
762 }
763 else
764 {
765 return nullptr;
766 }
767}
768
769// -- helpers
770
772{
773 if (n.isEmpty()) return nullptr;
774 return Doxygen::conceptLinkedMap->find(n);
775}
776
778{
779 ConceptDef *cd=nullptr;
780 while (d && d!=Doxygen::globalScope)
781 {
782 cd = getConcept(d->name()+"::"+name);
783 if (cd) return cd;
784 d = d->getOuterScope();
785 }
786 cd = getConcept(name);
787 return cd;
788}
789
790
This class represents an function or template argument list.
Definition arguments.h:60
DefType definitionType() const override
QCString getOutputFileBase() const override
QCString anchor() const override
const NamespaceDef * getNamespaceDef() const override
const ModuleDef * getModuleDef() const override
bool isLinkable() const override
int groupId() const override
bool isLinkableInProject() const override
QCString displayName(bool includeScope=true) const override
QCString initializer() const override
const IncludeInfo * includeInfo() const override
bool hasDetailedDescription() const override
CodeSymbolType codeSymbolType() const override
~ConceptDefAliasImpl() override
ArgumentList getTemplateParameterList() const override
void writeDeclarationLink(OutputList &ol, bool &found, const QCString &header, bool localNames) const override
const FileDef * getFileDef() const override
const ConceptDef * getCdAlias() const
ConceptDefAliasImpl(const Definition *newScope, const ConceptDef *cd)
QCString title() const override
QCString getReference() const override
bool isReference() const override
virtual QCString initializer() const =0
virtual ArgumentList getTemplateParameterList() const =0
virtual const IncludeInfo * includeInfo() const =0
virtual void writeDeclarationLink(OutputList &ol, bool &found, const QCString &header, bool localNames) const =0
virtual const NamespaceDef * getNamespaceDef() const =0
virtual const ModuleDef * getModuleDef() const =0
virtual QCString title() const =0
virtual bool hasDetailedDescription() const =0
virtual int groupId() const =0
virtual const FileDef * getFileDef() const =0
QCString getOutputFileBase() const override
const NamespaceDef * getNamespaceDef() const override
void writeIncludeFiles(OutputList &ol) const
void addConceptAttributes(OutputList &ol) const
QCString initializer() const override
~ConceptDefImpl() override
std::unique_ptr< IncludeInfo > m_incInfo
QCString m_initializer
QCString m_fileName
const FileDef * getFileDef() const override
ModuleDef * m_moduleDef
int groupId() const override
ArgumentList getTemplateParameterList() const override
NamespaceDef * m_nspace
QCString anchor() const override
void writeDeclarationLink(OutputList &ol, bool &found, const QCString &header, bool localNames) const override
void setTemplateArguments(const ArgumentList &al) override
void writeBriefDescription(OutputList &) const
void writeDocumentation(OutputList &) override
void writeDetailedDescription(OutputList &ol, const QCString &title) const
void setInitializer(const QCString &init) override
bool isLinkableInProject() const override
void findSectionsInDocumentation() override
bool hasDetailedDescription() const override
ConceptDefImpl(const QCString &fileName, int startLine, int startColumn, const QCString &name, const QCString &tagRef=QCString(), const QCString &tagFile=QCString())
QCString displayName(bool includeScope=true) const override
FileDef * m_fileDef
const IncludeInfo * includeInfo() const override
void writeDefinition(OutputList &ol, const QCString &title) const
void writeTagFile(TextStream &) override
bool isLinkable() const override
void setModuleDef(ModuleDef *mod) override
void setNamespace(NamespaceDef *nd) override
DefType definitionType() const override
void setIncludeFile(FileDef *fd, const QCString &incName, bool local, bool force) override
void setGroupId(int id) override
void setFileDef(FileDef *fd) override
ArgumentList m_tArgList
void writeAuthorSection(OutputList &ol) const
const ModuleDef * getModuleDef() const override
CodeSymbolType codeSymbolType() const override
QCString title() const override
void writeDeclaration(OutputList &ol, const QCString &header, bool localNames) const
bool declVisible() const
const Definition * getAlias() const
DefinitionAliasMixin(const Definition *scope, const Definition *alias)
The common base class of all entity definitions found in the sources.
Definition definition.h:76
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual bool isLinkable() const =0
virtual QCString anchor() const =0
virtual QCString id() const =0
virtual bool isLinkableInProject() const =0
virtual QCString getReference() const =0
virtual QCString displayName(bool includeScope=TRUE) const =0
virtual QCString briefFile() const =0
virtual CodeSymbolType codeSymbolType() const =0
virtual QCString getOutputFileBase() const =0
virtual Definition * getOuterScope() const =0
virtual bool isReference() const =0
virtual const QCString & name() const =0
const QCString & name() const override
void writeSourceDef(OutputList &ol) const override
void writeNavigationPath(OutputList &ol) const override
bool hasBriefDescription() const override
QCString docFile() const override
QCString briefFile() const override
QCString briefDescription(bool abbreviate=FALSE) const override
Definition * getOuterScope() const override
QCString getReference() const override
DefinitionMixin(const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
const QCString & localName() const override
const FileDef * getBodyDef() const override
QCString inbodyDocumentation() const override
QCString documentation() const override
void writeDocAnchorsToTagFile(TextStream &fs) const override
static ConceptLinkedMap * conceptLinkedMap
Definition doxygen.h:98
static ParserManager * parserManager
Definition doxygen.h:131
static NamespaceDefMutable * globalScope
Definition doxygen.h:121
A model of a file symbol.
Definition filedef.h:99
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1423
An abstract interface of a namespace symbol.
void startCodeFragment(const QCString &style)
Definition outputlist.h:278
Class representing a list of output generators that are written to in parallel.
Definition outputlist.h:314
void endTextBlock(bool paraBreak=FALSE)
Definition outputlist.h:671
void writeString(const QCString &text)
Definition outputlist.h:412
void startGroupHeader(int extraLevels=0)
Definition outputlist.h:454
void startMemberDeclaration()
Definition outputlist.h:570
void disable(OutputType o)
void writeRuler()
Definition outputlist.h:522
const OutputCodeList & codeGenerators() const
Definition outputlist.h:357
void enable(OutputType o)
void endContents()
Definition outputlist.h:619
void endMemberDescription()
Definition outputlist.h:568
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
Definition outputlist.h:440
void writeDoc(const IDocNodeAST *ast, const Definition *ctx, const MemberDef *md)
Definition outputlist.h:384
void startMemberDescription(const QCString &anchor, const QCString &inheritId=QCString(), bool typ=false)
Definition outputlist.h:566
void docify(const QCString &s)
Definition outputlist.h:438
void startParagraph(const QCString &classDef=QCString())
Definition outputlist.h:408
void startTextBlock(bool dense=FALSE)
Definition outputlist.h:669
void endParagraph()
Definition outputlist.h:410
void startMemberList()
Definition outputlist.h:482
void endTextLink()
Definition outputlist.h:445
void startBold()
Definition outputlist.h:562
void endMemberItem(OutputGenerator::MemberItemType type)
Definition outputlist.h:496
void endMemberList()
Definition outputlist.h:484
void writeSynopsis()
Definition outputlist.h:593
void startTypewriter()
Definition outputlist.h:450
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
void pushGeneratorState()
void insertMemberAlign(bool templ=FALSE)
Definition outputlist.h:518
void disableAllBut(OutputType o)
void popGeneratorState()
void writeAnchor(const QCString &fileName, const QCString &name)
Definition outputlist.h:524
void endBold()
Definition outputlist.h:564
void endGroupHeader(int extraLevels=0)
Definition outputlist.h:456
void endLabels()
Definition outputlist.h:741
void endQuickIndices()
Definition outputlist.h:605
void writeLabel(const QCString &l, bool isLast)
Definition outputlist.h:739
void startLabels()
Definition outputlist.h:737
void startContents()
Definition outputlist.h:617
void endMemberDeclaration(const QCString &anchor, const QCString &inheritId)
Definition outputlist.h:572
void endMemberHeader()
Definition outputlist.h:472
void startMemberItem(const QCString &anchor, OutputGenerator::MemberItemType type, const QCString &id=QCString())
Definition outputlist.h:494
void endTypewriter()
Definition outputlist.h:452
void parseText(const QCString &textStr)
void startTextLink(const QCString &file, const QCString &anchor)
Definition outputlist.h:443
void startMemberHeader(const QCString &anchor, int typ=2)
Definition outputlist.h:470
std::unique_ptr< CodeParserInterface > getCodeParser(const QCString &extension)
Gets the interface to the parser associated with a given extension.
Definition parserintf.h:218
This is an alternative implementation of QCString.
Definition qcstring.h:101
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
Text streaming class that buffers data.
Definition textstream.h:36
std::string str() const
Return the contents of the buffer as a std::string object.
Definition textstream.h:229
virtual QCString trConcept(bool first_capital, bool singular)=0
virtual QCString trMore()=0
virtual QCString trGeneratedAutomatically(const QCString &s)=0
virtual QCString trAuthor(bool first_capital, bool singular)=0
virtual QCString trConceptReference(const QCString &conceptName)=0
ConceptDefMutable * toConceptDefMutable(Definition *d)
ConceptDef * getResolvedConcept(const Definition *d, const QCString &name)
ConceptDef * toConceptDef(Definition *d)
static QCString templateSpec(const ArgumentList &al)
ConceptDef * getConcept(const QCString &n)
std::unique_ptr< ConceptDef > createConceptDefAlias(const Definition *newScope, const ConceptDef *cd)
std::unique_ptr< ConceptDef > createConceptDef(const QCString &fileName, int startLine, int startColumn, const QCString &name, const QCString &tagRef, const QCString &tagFile)
#define Config_getBool(name)
Definition config.h:33
#define Config_getString(name)
Definition config.h:32
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition construct.h:37
Definition * toDefinition(DefinitionMutable *dm)
void docFindSections(const QCString &input, const Definition *d, const QCString &fileName)
IDocParserPtr createDocParser()
factory function to create a parser
Definition docparser.cpp:54
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
static void writeTagFile()
QCString includeClose(SrcLangExt lang, IncludeKind kind)
Definition filedef.cpp:86
QCString includeStatement(SrcLangExt lang, IncludeKind kind)
Definition filedef.cpp:56
QCString includeOpen(SrcLangExt lang, IncludeKind kind)
Definition filedef.cpp:73
@ IncludeLocal
Definition filedef.h:50
@ IncludeSystem
Definition filedef.h:49
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
Definition index.cpp:386
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition index.cpp:395
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel)
Definition index.cpp:402
void endFileWithNavPath(OutputList &ol, const Definition *d)
Definition index.cpp:441
Translator * theTranslator
Definition language.cpp:71
#define err(fmt,...)
Definition message.h:84
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
Web server based search engine.
Class representing the data associated with a #include statement.
Definition filedef.h:75
QCString title(SrcLangExt lang) const
Definition layout.cpp:1526
CodeSymbolType
Definition types.h:319
void addGroupListToTitle(OutputList &ol, const Definition *d)
Definition util.cpp:5233
bool found
Definition util.cpp:984
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3858
QCString convertToXML(const QCString &s, bool keepEntities)
Definition util.cpp:4266
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5243
A bunch of utility functions.