Doxygen
Loading...
Searching...
No Matches
namespacedef.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#include "namespacedef.h"
17#include "outputlist.h"
18#include "util.h"
19#include "language.h"
20#include "classdef.h"
21#include "classlist.h"
22#include "memberlist.h"
23#include "doxygen.h"
24#include "message.h"
25#include "docparser.h"
26#include "searchindex.h"
27#include "vhdldocgen.h"
28#include "layout.h"
29#include "membergroup.h"
30#include "config.h"
31#include "definitionimpl.h"
32#include "membername.h"
33#include "conceptdef.h"
34
35//------------------------------------------------------------------
36static QCString makeDisplayName(const NamespaceDef *nd,bool includeScope)
37{
38 QCString result=includeScope ? nd->name() : nd->localName();
39 SrcLangExt lang = nd->getLanguage();
41 if (sep!="::")
42 {
43 result = substitute(result,"::",sep);
44 }
45 if (nd->isAnonymous())
46 {
47 result = removeAnonymousScopes(result);
48 }
49 //printf("makeDisplayName() %s->%s lang=%d\n",qPrint(name()),qPrint(result),lang);
50 return result;
51}
52//------------------------------------------------------------------
53
54class NamespaceDefImpl : public DefinitionMixin<NamespaceDefMutable>
55{
56 public:
57 NamespaceDefImpl(const QCString &defFileName,int defLine,int defColumn,
58 const QCString &name,const QCString &ref=QCString(),
59 const QCString &refFile=QCString(),const QCString &type=QCString(),
60 bool isPublished=false);
61 ~NamespaceDefImpl() override;
63
64 DefType definitionType() const override { return TypeNamespace; }
66 { return getLanguage()==SrcLangExt::Java ? CodeSymbolType::Package : CodeSymbolType::Namespace; }
67 QCString getOutputFileBase() const override;
68 QCString anchor() const override { return QCString(); }
69 void insertUsedFile(FileDef *fd) override;
70 void writeDocumentation(OutputList &ol) override;
71 void writeMemberPages(OutputList &ol) override;
72 void writeQuickMemberLinks(OutputList &ol,const MemberDef *currentMd) const override;
73 void writeTagFile(TextStream &) override;
74 void insertClass(ClassDef *cd) override;
75 void insertConcept(ConceptDef *cd) override;
76 void insertNamespace(NamespaceDef *nd) override;
77 void insertMember(MemberDef *md) override;
78 void computeAnchors() override;
79 void countMembers() override;
80 int numDocMembers() const override;
81 void addUsingDirective(NamespaceDef *nd) override;
83 void addUsingDeclaration(const Definition *cd) override;
85 void combineUsingRelations(NamespaceDefSet &visitedNamespace) override;
86 QCString displayName(bool=TRUE) const override;
87 void setInline(bool isInline) override { m_inline = isInline; }
88 bool isConstantGroup() const override { return CONSTANT_GROUP == m_type; }
89 bool isModule() const override { return NAMESPACE == m_type || MODULE == m_type; }
90 bool isLibrary() const override { return LIBRARY == m_type; }
91 bool isInline() const override { return m_inline; }
92 bool isLinkableInProject() const override;
93 bool isLinkable() const override;
94 bool isVisibleInHierarchy() const override;
95 bool hasDetailedDescription() const override;
96 void addMembersToMemberGroup() override;
98 void findSectionsInDocumentation() override;
99 void sortMemberLists() override;
100 const Definition *findInnerCompound(const QCString &name) const override;
101 void addInnerCompound(Definition *d) override;
102 void addListReferences() override;
103 void addRequirementReferences() override;
104 void setFileName(const QCString &fn) override;
105 bool subGrouping() const override { return m_subGrouping; }
106 MemberList *getMemberList(MemberListType lt) const override;
107 const MemberLists &getMemberLists() const override { return m_memberLists; }
108 const MemberDef *getMemberByName(const QCString &) const override;
109 const MemberGroupList &getMemberGroups() const override { return m_memberGroups; }
110 ClassLinkedRefMap getClasses() const override { return m_classes; }
111 ClassLinkedRefMap getInterfaces() const override { return m_interfaces; }
112 ClassLinkedRefMap getStructs() const override { return m_structs; }
113 ClassLinkedRefMap getExceptions() const override { return m_exceptions; }
115 ConceptLinkedRefMap getConcepts() const override { return m_concepts; }
116 void setName(const QCString &name) override;
117
118 QCString title() const override;
119 QCString compoundTypeString() const override;
120
121 void setMetaData(const QCString &m) override;
122 int countVisibleMembers() const override;
123 void writeSummaryLinks(OutputList &ol) const override;
124 void writePageNavigation(OutputList &ol) const override;
125
126 private:
135 void writeConcepts(OutputList &ol,const QCString &title);
144 void setFileNameLocal(const QCString &fn);
145
147 bool isConstantGroup=false);
148 void updateLocalName();
149
152
156
166 bool m_subGrouping = false;
168 bool m_isPublished = false;
170 bool m_inline = false;
171};
172
173std::unique_ptr<NamespaceDef> createNamespaceDef(const QCString &defFileName,int defLine,int defColumn,
174 const QCString &name,const QCString &ref,
175 const QCString &refFile,const QCString &type,
176 bool isPublished)
177{
178 //printf("createNamespaceDef(%s)\n",qPrint(name));
179 return std::make_unique<NamespaceDefImpl>(defFileName,defLine,defColumn,name,ref,refFile,type,isPublished);
180}
181
182//------------------------------------------------------------------
183
184class NamespaceDefAliasImpl : public DefinitionAliasMixin<NamespaceDef>
185{
186 public:
188 : DefinitionAliasMixin(newScope,nd) { init(); }
191
192 DefType definitionType() const override { return TypeNamespace; }
193
194 const NamespaceDef *getNSAlias() const { return toNamespaceDef(getAlias()); }
195
196 // ---- getters
198 { return getNSAlias()->codeSymbolType(); }
200 { return getNSAlias()->getOutputFileBase(); }
201 QCString anchor() const override
202 { return getNSAlias()->anchor(); }
203 int numDocMembers() const override
204 { return getNSAlias()->numDocMembers(); }
206 { return getNSAlias()->getUsedNamespaces(); }
209 QCString displayName(bool b=TRUE) const override
210 { return makeDisplayName(this,b); }
211 const QCString &localName() const override
212 { return getNSAlias()->localName(); }
213 bool isConstantGroup() const override
214 { return getNSAlias()->isConstantGroup(); }
215 bool isModule() const override
216 { return getNSAlias()->isModule(); }
217 bool isLibrary() const override
218 { return getNSAlias()->isLibrary(); }
219 bool isInline() const override
220 { return getNSAlias()->isInline(); }
221 bool isLinkableInProject() const override
222 { return getNSAlias()->isLinkableInProject(); }
223 bool isLinkable() const override
224 { return getNSAlias()->isLinkable(); }
225 bool isVisibleInHierarchy() const override
226 { return getNSAlias()->isVisibleInHierarchy(); }
227 bool hasDetailedDescription() const override
228 { return getNSAlias()->hasDetailedDescription(); }
229 const Definition *findInnerCompound(const QCString &name) const override
230 { return getNSAlias()->findInnerCompound(name); }
231 bool subGrouping() const override
232 { return getNSAlias()->subGrouping(); }
234 { return getNSAlias()->getMemberList(lt); }
235 const MemberLists &getMemberLists() const override
236 { return getNSAlias()->getMemberLists(); }
237 const MemberDef *getMemberByName(const QCString &name) const override
238 { return getNSAlias()->getMemberByName(name); }
239 const MemberGroupList &getMemberGroups() const override
240 { return getNSAlias()->getMemberGroups(); }
242 { return getNSAlias()->getClasses(); }
244 { return getNSAlias()->getInterfaces(); }
246 { return getNSAlias()->getStructs(); }
248 { return getNSAlias()->getExceptions(); }
250 { return getNSAlias()->getNamespaces(); }
252 { return getNSAlias()->getConcepts(); }
253 QCString title() const override
254 { return getNSAlias()->title(); }
256 { return getNSAlias()->compoundTypeString(); }
257 int countVisibleMembers() const override
258 { return getNSAlias()->countVisibleMembers(); }
259};
260
261std::unique_ptr<NamespaceDef> createNamespaceDefAlias(const Definition *newScope,const NamespaceDef *nd)
262{
263 auto alnd = std::make_unique<NamespaceDefAliasImpl>(newScope,nd);
264 //printf("alnd name=%s localName=%s qualifiedName=%s displayName()=%s\n",
265 // qPrint(alnd->name()),qPrint(alnd->localName()),qPrint(alnd->qualifiedName()),
266 // qPrint(alnd->displayName()));
267 return alnd;
268}
269
270//------------------------------------------------------------------
271
273 const QCString &name,const QCString &lref,
274 const QCString &fName, const QCString &type,
275 bool isPublished) :
276 DefinitionMixin(df,dl,dc,name)
277 ,m_isPublished(isPublished)
278{
279 if (!fName.isEmpty())
280 {
281 if (!lref.isEmpty())
282 {
283 fileName = stripExtension(fName);
284 }
285 else
286 {
287 fileName = convertNameToFile(stripExtension(fName));
288 }
289 }
290 else
291 {
292 setFileNameLocal(name);
293 }
294 setReference(lref);
295 m_inline=FALSE;
296 m_subGrouping=Config_getBool(SUBGROUPING);
297 if (type=="module")
298 {
299 m_type = MODULE;
300 }
301 else if (type=="constants")
302 {
303 m_type = CONSTANT_GROUP;
304 }
305 else if (type=="library")
306 {
307 m_type = LIBRARY;
308 }
309 else
310 {
311 m_type = NAMESPACE;
312 }
313
314 updateLocalName();
315}
316
318{
319 QCString locName=name();
320 int i=locName.findRev("::");
321 if (i!=-1)
322 {
323 locName=locName.mid(i+2);
324 }
325 setLocalName(locName);
326}
327
333
337
339{
340 if (isReference())
341 {
342 fileName = "namespace"+fn;
343 }
344 else
345 {
346 fileName = convertNameToFile("namespace"+fn);
347 }
348}
349
351{
353}
354
356{
357 for (const auto &mg : m_memberGroups)
358 {
359 mg->distributeMemberGroupDocumentation();
360 }
361}
362
364{
368 for (const auto &mg : m_memberGroups)
369 {
370 mg->findSectionsInDocumentation(this);
371 }
372 for (auto &ml : m_memberLists)
373 {
374 if (ml->listType().isDeclaration())
375 {
376 ml->findSectionsInDocumentation(this);
377 }
378 }
379}
380
382{
383 if (fd==nullptr) return;
384 auto it = std::find(files.begin(),files.end(),fd);
385 if (it==files.end())
386 {
387 files.push_back(fd);
388 }
389}
390
392{
393 //printf("%s:NamespaceDefImpl::addInnerCompound(%s)\n",qPrint(name()),qPrint(d->name()));
394 m_innerCompounds.add(d->localName(),d);
396 {
398 }
400 {
402 }
404 {
406 }
407}
408
410{
412
413 if (Config_getBool(OPTIMIZE_OUTPUT_SLICE))
414 {
416 {
417 d = &m_interfaces;
418 }
419 else if (cd->compoundType()==ClassDef::Struct)
420 {
421 d = &m_structs;
422 }
423 else if (cd->compoundType()==ClassDef::Exception)
424 {
425 d = &m_exceptions;
426 }
427 }
428
429 d->add(cd->name(),cd);
430}
431
433{
434 m_concepts.add(cd->name(),cd);
435}
436
441
442
444{
445 for (auto &ml : m_memberLists)
446 {
447 if (ml->listType().isDeclaration())
448 {
450 }
451 }
452
453 // add members inside sections to their groups
454 for (const auto &mg : m_memberGroups)
455 {
456 if (mg->allMembersInSameSection() && m_subGrouping)
457 {
458 //printf("----> addToDeclarationSection(%s)\n",qPrint(mg->header()));
459 mg->addToDeclarationSection();
460 }
461 }
462}
463
465{
466 //printf("%s::insertMember(%s) isInline=%d hasDocs=%d\n",qPrint(name()),qPrint(md->name()),
467 // isInline(),hasDocumentation());
468 if (md->isHidden()) return;
470
471 // if this is an inline namespace that is not documented, then insert the
472 // member in the parent scope instead
473 if (isInline() && !hasDocumentation())
474 {
475 Definition *outerScope = getOuterScope();
476 if (outerScope)
477 {
478 if (outerScope->definitionType()==Definition::TypeNamespace)
479 {
481 if (nd && nd!=Doxygen::globalScope)
482 {
483 nd->insertMember(md);
484 if (mdm)
485 {
486 mdm->setNamespace(nd);
487 }
488 }
489 }
490 else if (outerScope->definitionType()==Definition::TypeFile)
491 {
492 FileDef *fd = toFileDef(outerScope);
493 fd->insertMember(md);
494 if (mdm)
495 {
496 mdm->setFileDef(fd);
497 mdm->setOuterScope(fd);
498 }
499 }
500 }
501 }
502 else // member is a non-inline namespace or a documented inline namespace
503 {
504 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
505 if (allMemberList==nullptr)
506 {
507 m_memberLists.emplace_back(std::make_unique<MemberList>(MemberListType::AllMembersList(),MemberListContainer::Namespace));
508 allMemberList = m_memberLists.back().get();
509 }
510 allMemberList->push_back(md);
511 //printf("%s::m_allMembersDict->append(%s)\n",qPrint(name()),qPrint(md->localName()));
512 m_allMembers.add(md->localName(),md);
513 switch(md->memberType())
514 {
516 addMemberToList(MemberListType::DecVarMembers(),md);
517 addMemberToList(MemberListType::DocVarMembers(),md);
518 break;
520 addMemberToList(MemberListType::DecFuncMembers(),md);
521 addMemberToList(MemberListType::DocFuncMembers(),md);
522 break;
524 addMemberToList(MemberListType::DecTypedefMembers(),md);
525 addMemberToList(MemberListType::DocTypedefMembers(),md);
526 break;
528 addMemberToList(MemberListType::DecSequenceMembers(),md);
529 addMemberToList(MemberListType::DocSequenceMembers(),md);
530 break;
532 addMemberToList(MemberListType::DecDictionaryMembers(),md);
533 addMemberToList(MemberListType::DocDictionaryMembers(),md);
534 break;
536 addMemberToList(MemberListType::DecEnumMembers(),md);
537 addMemberToList(MemberListType::DocEnumMembers(),md);
538 break;
540 break;
542 addMemberToList(MemberListType::DecDefineMembers(),md);
543 addMemberToList(MemberListType::DocDefineMembers(),md);
544 break;
546 if (md->getLanguage() == SrcLangExt::Python)
547 {
548 addMemberToList(MemberListType::PropertyMembers(),md);
549 addMemberToList(MemberListType::Properties(),md);
550 break;
551 }
552 // fallthrough, explicitly no break here
553 default:
554 err("NamespaceDefImpl::insertMembers(): "
555 "member '{}' with unexpected type '{}' and class scope '{}' inserted in namespace scope '{}'!\n",
556 md->name(), md->memberTypeName(), md->getClassDef() ? md->getClassDef()->name() : "", name());
557 }
558 // if this is an inline namespace, then insert an alias of this member in the outer scope.
559 if (isInline())
560 {
561 Definition *outerScope = getOuterScope();
562 if (outerScope)
563 {
564 std::unique_ptr<MemberDef> aliasMd = createMemberDefAlias(outerScope,md);
565 if (outerScope->definitionType()==Definition::TypeNamespace)
566 {
568 if (ndm)
569 {
570 ndm->insertMember(aliasMd.get());
571 }
572 }
573 else if (outerScope->definitionType()==Definition::TypeFile)
574 {
575 toFileDef(outerScope)->insertMember(aliasMd.get());
576 }
577 if (aliasMd)
578 {
580 mn->push_back(std::move(aliasMd));
581 }
582 }
583 }
584 }
585}
586
588{
589 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
590 if (allMemberList) allMemberList->setAnchors();
591}
592
594{
595 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
596 return ((!briefDescription().isEmpty() && repeatBrief) ||
597 !documentation().isEmpty());
598}
599
601{
604 tagFile << " <compound kind=\"namespace\">\n";
605 tagFile << " <name>" << convertToXML(name()) << "</name>\n";
606 tagFile << " <filename>" << fn << "</filename>\n";
607 QCString idStr = id();
608 if (!idStr.isEmpty())
609 {
610 tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>\n";
611 }
612 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
613 {
614 switch (lde->kind())
615 {
616 case LayoutDocEntry::NamespaceNestedNamespaces:
617 {
618 for (const auto &nd : m_namespaces)
619 {
620 if (nd->isLinkableInProject())
621 {
622 tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>\n";
623 }
624 }
625 }
626 break;
627 case LayoutDocEntry::NamespaceClasses:
628 {
630 }
631 break;
632 case LayoutDocEntry::NamespaceInterfaces:
633 {
635 }
636 break;
637 case LayoutDocEntry::NamespaceStructs:
638 {
640 }
641 break;
642 case LayoutDocEntry::NamespaceExceptions:
643 {
645 }
646 break;
647 case LayoutDocEntry::NamespaceConcepts:
648 {
649 writeConceptsToTagFile(tagFile);
650 }
651 break;
652 case LayoutDocEntry::MemberDecl:
653 {
654 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
655 if (lmd)
656 {
657 MemberList * ml = getMemberList(lmd->type);
658 if (ml)
659 {
660 ml->writeTagFile(tagFile);
661 }
662 }
663 }
664 break;
665 case LayoutDocEntry::MemberGroups:
666 {
667 for (const auto &mg : m_memberGroups)
668 {
669 mg->writeTagFile(tagFile);
670 }
671 }
672 break;
673 default:
674 break;
675 }
676 }
678 tagFile << " </compound>\n";
679}
680
682{
684 {
687 ol.writeRuler();
691 ol.writeAnchor(QCString(),"details");
693 ol.startGroupHeader("details");
694 ol.parseText(title);
695 ol.endGroupHeader();
696
697 ol.startTextBlock();
698 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
699 {
701 briefLine(),
702 this,
703 nullptr,
705 DocOptions());
706 }
707 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
708 !documentation().isEmpty())
709 {
713 ol.enableAll();
716 ol.writeString("\n\n");
718 }
719 if (!documentation().isEmpty())
720 {
721 ol.generateDoc(docFile(),
722 docLine(),
723 this,
724 nullptr,
725 documentation()+"\n",
726 DocOptions()
727 .setIndexWords(true));
728 }
730 ol.endTextBlock();
731 }
732}
733
735{
737 {
738 auto parser { createDocParser() };
739 auto ast { validatingParseDoc(*parser.get(),
740 briefFile(),
741 briefLine(),
742 this,
743 nullptr,
745 DocOptions()
746 .setIndexWords(true)
747 .setSingleLine(true))
748 };
749 if (!ast->isEmpty())
750 {
751 ol.startParagraph();
754 ol.writeString(" - ");
756 ol.writeDoc(ast.get(),this,nullptr);
759 ol.writeString(" \n");
761
763 {
765 ol.startTextLink(getOutputFileBase(),"details");
766 ol.parseText(theTranslator->trMore());
767 ol.endTextLink();
768 }
770 ol.endParagraph();
771 }
772 }
773
774 // Write a summary of the Slice definition including metadata.
775 if (getLanguage() == SrcLangExt::Slice)
776 {
777 ol.startParagraph();
778 ol.startTypewriter();
779 if (!metaData.isEmpty())
780 {
781 ol.docify(metaData);
782 ol.lineBreak();
783 }
784 ol.docify("module ");
785 ol.docify(stripScope(name()));
786 ol.docify(" { ... }");
787 ol.endTypewriter();
788 ol.endParagraph();
789 }
790
791 ol.writeSynopsis();
792}
793
798
803
805{
806 if (Config_getBool(SEPARATE_MEMBER_PAGES))
807 {
810 }
811}
812
814{
815 if (Config_getBool(SEPARATE_MEMBER_PAGES))
816 {
819 }
820}
821
826
828{
829 m_concepts.writeDeclaration(ol,title,TRUE);
830}
831
833{
834 m_classes.writeDocumentation(ol,this);
835}
836
842
844{
845 /* write user defined member groups */
846 for (const auto &mg : m_memberGroups)
847 {
848 if (!mg->allMembersInSameSection() || !m_subGrouping)
849 {
850 mg->writeDeclarations(ol,nullptr,this,nullptr,nullptr,nullptr);
851 }
852 }
853}
854
856{
857 // write Author section (Man only)
860 ol.startGroupHeader();
861 ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
862 ol.endGroupHeader();
863 ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString(PROJECT_NAME)));
865}
866
868{
871 bool first=TRUE;
872 SrcLangExt lang = getLanguage();
873 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
874 {
875 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
876 if (lde->kind()==LayoutDocEntry::NamespaceClasses && m_classes.declVisible() && ls)
877 {
878 QCString label = "nested-classes";
879 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
880 first=FALSE;
881 }
882 else if (lde->kind()==LayoutDocEntry::NamespaceInterfaces && m_interfaces.declVisible() && ls)
883 {
884 QCString label = "interfaces";
885 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
886 first=FALSE;
887 }
888 else if (lde->kind()==LayoutDocEntry::NamespaceStructs && m_structs.declVisible() && ls)
889 {
890 QCString label = "structs";
891 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
892 first=FALSE;
893 }
894 else if (lde->kind()==LayoutDocEntry::NamespaceExceptions && m_exceptions.declVisible() && ls)
895 {
896 QCString label = "exceptions";
897 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
898 first=FALSE;
899 }
900 else if (lde->kind()==LayoutDocEntry::NamespaceNestedNamespaces && m_namespaces.declVisible(false) && ls)
901 {
902 QCString label = "namespaces";
903 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
904 first=FALSE;
905 }
906 else if (lde->kind()==LayoutDocEntry::NamespaceNestedConstantGroups && m_namespaces.declVisible(true) && ls)
907 {
908 QCString label = "constantgroups";
909 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
910 first=FALSE;
911 }
912 else if (lde->kind()==LayoutDocEntry::NamespaceConcepts && m_concepts.declVisible() && ls)
913 {
914 QCString label = "concepts";
915 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
916 first=FALSE;
917 }
918 else if (lde->kind()== LayoutDocEntry::MemberDecl)
919 {
920 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
921 if (lmd)
922 {
923 MemberList * ml = getMemberList(lmd->type);
924 if (ml && ml->declVisible())
925 {
926 ol.writeSummaryLink(QCString(),ml->listType().toLabel(),lmd->title(lang),first);
927 first=FALSE;
928 }
929 }
930 }
931 }
932 if (!first)
933 {
934 ol.writeString(" </div>\n");
935 }
937}
938
943
945{
946 // UNO IDL constant groups may be published
947 if (getLanguage()==SrcLangExt::IDL && isConstantGroup() && m_isPublished)
948 {
951 ol.startLabels();
952 ol.writeLabel("published",false);
953 ol.endLabels();
955 }
956 else if (isExported())
957 {
960 ol.startLabels();
961 ol.writeLabel("export",false);
962 ol.endLabels();
964 }
965}
966
968{
969 for (const auto &cd : list)
970 {
971 if (cd->isLinkableInProject())
972 {
973 tagFile << " <class kind=\"" << cd->compoundTypeString()
974 << "\">" << convertToXML(cd->name()) << "</class>\n";
975 }
976 }
977}
978
980{
981 for (const auto &cd : m_concepts)
982 {
983 if (cd->isLinkableInProject())
984 {
985 tagFile << " <concept>" << convertToXML(cd->name()) << "</concept>\n";
986 }
987 }
988}
989
991{
992 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
993 //bool outputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
994 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
995
996 QCString pageTitle = title();
997 startFile(ol,getOutputFileBase(),false,name(),pageTitle,HighlightedItem::NamespaceVisible,!generateTreeView);
998
999 if (!generateTreeView)
1000 {
1002 {
1004 }
1005 ol.endQuickIndices();
1006 }
1007
1008 startTitle(ol,getOutputFileBase(),this);
1009 ol.parseText(pageTitle);
1010 addGroupListToTitle(ol,this);
1013 ol.startContents();
1014
1015 //---------------------------------------- start flexible part -------------------------------
1016
1017 SrcLangExt lang = getLanguage();
1018 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1019 {
1020 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
1021 switch (lde->kind())
1022 {
1023 case LayoutDocEntry::BriefDesc:
1025 break;
1026 case LayoutDocEntry::MemberDeclStart:
1028 break;
1029 case LayoutDocEntry::NamespaceClasses:
1030 {
1031 if (ls) writeClassDeclarations(ol,ls->title(lang),m_classes);
1032 }
1033 break;
1034 case LayoutDocEntry::NamespaceInterfaces:
1035 {
1036 if (ls) writeClassDeclarations(ol,ls->title(lang),m_interfaces);
1037 }
1038 break;
1039 case LayoutDocEntry::NamespaceStructs:
1040 {
1041 if (ls) writeClassDeclarations(ol,ls->title(lang),m_structs);
1042 }
1043 break;
1044 case LayoutDocEntry::NamespaceExceptions:
1045 {
1046 if (ls) writeClassDeclarations(ol,ls->title(lang),m_exceptions);
1047 }
1048 break;
1049 case LayoutDocEntry::NamespaceConcepts:
1050 {
1051 if (ls) writeConcepts(ol,ls->title(lang));
1052 }
1053 break;
1054 case LayoutDocEntry::NamespaceNestedNamespaces:
1055 {
1056 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),false);
1057 }
1058 break;
1059 case LayoutDocEntry::NamespaceNestedConstantGroups:
1060 {
1061 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),true);
1062 }
1063 break;
1064 case LayoutDocEntry::MemberGroups:
1066 break;
1067 case LayoutDocEntry::MemberDecl:
1068 {
1069 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1070 if (lmd) writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
1071 }
1072 break;
1073 case LayoutDocEntry::MemberDeclEnd:
1075 break;
1076 case LayoutDocEntry::DetailedDesc:
1077 {
1078 if (ls) writeDetailedDescription(ol,ls->title(lang));
1079 }
1080 break;
1081 case LayoutDocEntry::MemberDefStart:
1083 break;
1084 case LayoutDocEntry::NamespaceInlineClasses:
1086 break;
1087 case LayoutDocEntry::MemberDef:
1088 {
1089 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1090 if (lmd) writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
1091 }
1092 break;
1093 case LayoutDocEntry::MemberDefEnd:
1095 break;
1096 case LayoutDocEntry::AuthorSection:
1098 break;
1099 case LayoutDocEntry::ClassIncludes:
1100 case LayoutDocEntry::ClassInheritanceGraph:
1101 case LayoutDocEntry::ClassNestedClasses:
1102 case LayoutDocEntry::ClassCollaborationGraph:
1103 case LayoutDocEntry::ClassAllMembersLink:
1104 case LayoutDocEntry::ClassUsedFiles:
1105 case LayoutDocEntry::ClassInlineClasses:
1106 case LayoutDocEntry::ConceptDefinition:
1107 case LayoutDocEntry::FileClasses:
1108 case LayoutDocEntry::FileConcepts:
1109 case LayoutDocEntry::FileInterfaces:
1110 case LayoutDocEntry::FileStructs:
1111 case LayoutDocEntry::FileExceptions:
1112 case LayoutDocEntry::FileNamespaces:
1113 case LayoutDocEntry::FileConstantGroups:
1114 case LayoutDocEntry::FileIncludes:
1115 case LayoutDocEntry::FileIncludeGraph:
1116 case LayoutDocEntry::FileIncludedByGraph:
1117 case LayoutDocEntry::FileSourceLink:
1118 case LayoutDocEntry::FileInlineClasses:
1119 case LayoutDocEntry::GroupClasses:
1120 case LayoutDocEntry::GroupConcepts:
1121 case LayoutDocEntry::GroupModules:
1122 case LayoutDocEntry::GroupInlineClasses:
1123 case LayoutDocEntry::GroupNamespaces:
1124 case LayoutDocEntry::GroupDirs:
1125 case LayoutDocEntry::GroupNestedGroups:
1126 case LayoutDocEntry::GroupFiles:
1127 case LayoutDocEntry::GroupGraph:
1128 case LayoutDocEntry::GroupPageDocs:
1129 case LayoutDocEntry::ModuleExports:
1130 case LayoutDocEntry::ModuleClasses:
1131 case LayoutDocEntry::ModuleConcepts:
1132 case LayoutDocEntry::ModuleUsedFiles:
1133 case LayoutDocEntry::DirSubDirs:
1134 case LayoutDocEntry::DirFiles:
1135 case LayoutDocEntry::DirGraph:
1136 err("Internal inconsistency: member '{}' should not be part of "
1137 "LayoutDocManager::Namespace entry list\n",lde->entryToString());
1138 break;
1139 }
1140 }
1141
1142 //---------------------------------------- end flexible part -------------------------------
1143
1144 ol.endContents();
1145
1146 endFileWithNavPath(ol,this);
1147
1148 if (Config_getBool(SEPARATE_MEMBER_PAGES))
1149 {
1150 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1151 if (allMemberList) allMemberList->sort();
1152 writeMemberPages(ol);
1153 }
1154}
1155
1157{
1158 ol.pushGeneratorState();
1160
1161 for (const auto &ml : m_memberLists)
1162 {
1163 if (ml->listType().isDocumentation())
1164 {
1165 ml->writeDocumentationPage(ol,displayName(),this);
1166 }
1167 }
1168 ol.popGeneratorState();
1169}
1170
1172{
1173 bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
1174
1175 ol.writeString(" <div class=\"navtab\">\n");
1176 ol.writeString(" <table>\n");
1177
1178 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1179 if (allMemberList)
1180 {
1181 for (const auto &md : *allMemberList)
1182 {
1183 if (md->getNamespaceDef()==this && md->isLinkable() && !md->isEnumValue())
1184 {
1185 if (md->isLinkableInProject())
1186 {
1187 QCString fn = md->getOutputFileBase();
1189 if (md==currentMd) // selected item => highlight
1190 {
1191 ol.writeString(" <tr><td class=\"navtabHL\">");
1192 }
1193 else
1194 {
1195 ol.writeString(" <tr><td class=\"navtab\">");
1196 }
1197 ol.writeString("<span class=\"label\"><a ");
1198 ol.writeString("href=\"");
1199 if (createSubDirs) ol.writeString("../../");
1200 ol.writeString(fn+"#"+md->anchor());
1201 ol.writeString("\">");
1202 ol.writeString(convertToHtml(md->localName()));
1203 ol.writeString("</a></span>");
1204 ol.writeString("</td></tr>\n");
1205 }
1206 }
1207 }
1208 }
1209
1210 ol.writeString(" </table>\n");
1211 ol.writeString(" </div>\n");
1212}
1213
1215{
1216 for (auto &ml : m_memberLists)
1217 {
1218 ml->countDecMembers();
1219 ml->countDocMembers();
1220 }
1221 for (const auto &mg : m_memberGroups)
1222 {
1223 mg->countDecMembers();
1224 mg->countDocMembers();
1225 }
1226}
1227
1229{
1230 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1231 return (allMemberList ? allMemberList->numDocMembers() : 0) + static_cast<int>(m_innerCompounds.size());
1232}
1233
1235{
1236 m_usingDirList.add(nd->qualifiedName(),nd);
1237 //printf("%s: NamespaceDefImpl::addUsingDirective: %s:%zu\n",qPrint(name()),qPrint(nd->qualifiedName()),m_usingDirList.size());
1238}
1239
1244
1249
1251{
1252 if (n==nullptr) return nullptr;
1253 const Definition *d = m_innerCompounds.find(n);
1254 if (d==nullptr)
1255 {
1256 if (!m_usingDirList.empty())
1257 {
1258 d = m_usingDirList.find(n);
1259 }
1260 if (d==nullptr && !m_usingDeclList.empty())
1261 {
1262 d = m_usingDeclList.find(n);
1263 }
1264 }
1265 return d;
1266}
1267
1269{
1271 qualifiedName(),
1272 getLanguage()==SrcLangExt::Fortran ?
1273 theTranslator->trModule(TRUE,TRUE) :
1274 theTranslator->trNamespace(TRUE,TRUE),
1276 QCString(),
1277 this
1278 );
1279 for (const auto &mg : m_memberGroups)
1280 {
1281 mg->addListReferences(this);
1282 }
1283 for (auto &ml : m_memberLists)
1284 {
1285 if (ml->listType().isDocumentation())
1286 {
1287 ml->addListReferences(this);
1288 }
1289 }
1290}
1291
1293{
1295 for (const auto &mg : m_memberGroups)
1296 {
1297 mg->addRequirementReferences(this);
1298 }
1299 for (auto &ml : m_memberLists)
1300 {
1301 if (ml->listType().isDocumentation())
1302 {
1303 ml->addRequirementReferences(this);
1304 }
1305 }
1306}
1307
1309{
1310 return makeDisplayName(this,includeScope);
1311}
1312
1314{
1315 if (visitedNamespaces.find(this)!=visitedNamespaces.end()) return; // already processed
1316 visitedNamespaces.insert(this);
1317
1319 for (auto &nd : usingDirList)
1320 {
1322 if (ndm)
1323 {
1324 ndm->combineUsingRelations(visitedNamespaces);
1325 }
1326 }
1327
1328 for (auto &nd : usingDirList)
1329 {
1330 // add used namespaces of namespace nd to this namespace
1331 for (const auto &und : nd->getUsedNamespaces())
1332 {
1333 addUsingDirective(und);
1334 }
1335 // add used classes of namespace nd to this namespace
1336 for (const auto &ud : nd->getUsedDefinitions())
1337 {
1339 }
1340 }
1341}
1342
1344{
1345 int count=0;
1346 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1347 {
1348 if (lde->kind()==LayoutDocEntry::MemberDef)
1349 {
1350 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1351 if (lmd)
1352 {
1353 MemberList *ml = getMemberList(lmd->type);
1354 if (ml)
1355 {
1356 for (const auto &md : *ml)
1357 {
1358 if (md->visibleInIndex())
1359 {
1360 count++;
1361 }
1362 }
1363 }
1364 }
1365 }
1366 }
1367 return count;
1368}
1369
1370
1371
1372//-------------------------------------------------------------------------------
1373
1374bool NamespaceLinkedRefMap::declVisible(bool isConstantGroup) const
1375{
1376 bool found=false;
1377 for (const auto &nd : *this)
1378 {
1379 if (nd->isLinkable() && nd->hasDocumentation())
1380 {
1381 SrcLangExt lang = nd->getLanguage();
1382 if (SrcLangExt::IDL==lang)
1383 {
1384 if (isConstantGroup == nd->isConstantGroup())
1385 {
1386 found=true;
1387 break;
1388 }
1389 }
1390 else if (!isConstantGroup) // ensure we only get extra section in IDL
1391 {
1392 if (nd->isConstantGroup())
1393 {
1394 err("Internal inconsistency: constant group but not IDL?\n");
1395 }
1396 found=true;
1397 break;
1398 }
1399 }
1400 }
1401 return found;
1402}
1403
1405 bool const isConstantGroup,bool localName)
1406{
1407
1408
1409 if (empty()) return; // no namespaces in the list
1410
1411 if (Config_getBool(OPTIMIZE_OUTPUT_VHDL)) return;
1412
1413 if (!declVisible(isConstantGroup)) return;
1414
1415 // write list of namespaces
1416 ol.startMemberHeader(isConstantGroup ? "constantgroups" : "namespaces");
1417 //bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
1418 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
1419 ol.parseText(title);
1420 ol.endMemberHeader();
1421 ol.startMemberList();
1422 for (const auto &nd : *this)
1423 {
1424 if (nd->isLinkable() && nd->hasDocumentation())
1425 {
1426 SrcLangExt lang = nd->getLanguage();
1427 if (lang==SrcLangExt::IDL && (isConstantGroup != nd->isConstantGroup()))
1428 continue; // will be output in another pass, see layout_default.xml
1430 QCString name = localName ? nd->localName() : nd->displayName();
1431 QCString anc = nd->anchor();
1432 if (anc.isEmpty()) anc=name; else anc.prepend(name+"_");
1434 QCString ct = nd->compoundTypeString();
1435 ol.docify(ct);
1436 ol.docify(" ");
1437 ol.insertMemberAlign();
1438 ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),QCString(),name);
1440 if (!nd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
1441 {
1442 ol.startMemberDescription(nd->getOutputFileBase());
1443 ol.generateDoc(nd->briefFile(),
1444 nd->briefLine(),
1445 nd,
1446 nullptr,
1447 nd->briefDescription(),
1448 DocOptions()
1449 .setSingleLine(true));
1451 }
1453 }
1454 }
1455 ol.endMemberList();
1456}
1457
1458//-------------------------------------------------------------------------------
1459
1461{
1462 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
1463 bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
1464 const auto &ml = m_memberLists.get(lt,MemberListContainer::Namespace);
1465 ml->setNeedsSorting(
1466 (ml->listType().isDeclaration() && sortBriefDocs) ||
1467 (ml->listType().isDocumentation() && sortMemberDocs));
1468 ml->push_back(md);
1469
1470 if (ml->listType().isDeclaration())
1471 {
1473 if (mdm)
1474 {
1475 mdm->setSectionList(this,ml.get());
1476 }
1477 }
1478}
1479
1481{
1482 for (auto &ml : m_memberLists)
1483 {
1484 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
1485 }
1486
1487 if (Config_getBool(SORT_BRIEF_DOCS))
1488 {
1489 auto classComp = [](const ClassLinkedRefMap::Ptr &c1,const ClassLinkedRefMap::Ptr &c2)
1490 {
1491 return Config_getBool(SORT_BY_SCOPE_NAME) ?
1492 qstricmp_sort(c1->name(), c2->name())<0 :
1493 qstricmp_sort(c1->className(), c2->className())<0;
1494 };
1495
1496 std::stable_sort(m_classes.begin(), m_classes.end(), classComp);
1497 std::stable_sort(m_interfaces.begin(),m_interfaces.end(),classComp);
1498 std::stable_sort(m_structs.begin(), m_structs.end(), classComp);
1499 std::stable_sort(m_exceptions.begin(),m_exceptions.end(),classComp);
1500
1501 auto conceptComp = [](const ConceptLinkedRefMap::Ptr &c1,const ConceptLinkedRefMap::Ptr &c2)
1502 {
1503 return qstricmp_sort(c1->name(),c2->name())<0;
1504 };
1505
1506 std::stable_sort(m_concepts.begin(), m_concepts.end(), conceptComp);
1507
1508 auto namespaceComp = [](const NamespaceLinkedRefMap::Ptr &n1,const NamespaceLinkedRefMap::Ptr &n2)
1509 {
1510 return qstricmp_sort(n1->name(),n2->name())<0;
1511 };
1512
1513 std::stable_sort(m_namespaces.begin(),m_namespaces.end(),namespaceComp);
1514 }
1515
1516}
1517
1519{
1520 for (auto &ml : m_memberLists)
1521 {
1522 if (ml->listType()==lt)
1523 {
1524 return ml.get();
1525 }
1526 }
1527 return nullptr;
1528}
1529
1531{
1532 MemberList * ml = getMemberList(lt);
1533 if (ml) ml->writeDeclarations(ol,nullptr,this,nullptr,nullptr,nullptr,title,QCString());
1534}
1535
1541
1542static bool hasNonReferenceNestedNamespaceRec(const NamespaceDef *nd,int level)
1543{
1544 if (level>30)
1545 {
1546 err("Possible recursive namespace relation while inside {}\n",nd->name());
1547 return false;
1548 }
1549 bool found=nd->isLinkableInProject();
1550 if (found)
1551 {
1552 return true;
1553 }
1554 else
1555 {
1556 for (const auto &ind : nd->getNamespaces())
1557 {
1558 found = found || hasNonReferenceNestedNamespaceRec(ind,level+1);
1559 if (found) break;
1560 }
1561 }
1562 return found;
1563}
1564
1566{
1567 bool allExternals = Config_getBool(ALLEXTERNALS);
1568 return allExternals || hasNonReferenceNestedNamespaceRec(this,0) || isLinkable();
1569}
1570
1572{
1573 int i = name().findRev("::");
1574 if (i==-1) i=0; else i+=2;
1575 bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES);
1576 bool hideUndoc = Config_getBool(HIDE_UNDOC_NAMESPACES);
1577 if (extractAnonNs && // extract anonymous ns
1578 name().mid(i,20)=="anonymous_namespace{" // correct prefix
1579 ) // not disabled by config
1580 {
1581 return TRUE;
1582 }
1583 return !name().isEmpty() && name().at(i)!='@' && // not anonymous
1584 (hasDocumentation() || !hideUndoc || getLanguage()==SrcLangExt::CSharp) && // documented
1585 !isReference() && // not an external reference
1586 !isHidden() && // not hidden
1587 !isArtificial(); // or artificial
1588}
1589
1591{
1592 return isLinkableInProject() || isReference();
1593}
1594
1596{
1597 return m_allMembers.find(n);
1598}
1599
1601{
1602 QCString pageTitle;
1603 SrcLangExt lang = getLanguage();
1604
1605 auto getReferenceTitle = [this](std::function<QCString()> translateFunc) -> QCString
1606 {
1607 return Config_getBool(HIDE_COMPOUND_REFERENCE) ? displayName() : translateFunc();
1608 };
1609
1610 if (lang==SrcLangExt::Java)
1611 {
1612 pageTitle = theTranslator->trPackage(displayName());
1613 }
1614 else if (lang==SrcLangExt::Fortran || lang==SrcLangExt::Slice)
1615 {
1616 pageTitle = getReferenceTitle([this](){
1617 return theTranslator->trModuleReference(displayName());
1618 });
1619 }
1620 else if (lang==SrcLangExt::IDL)
1621 {
1622 pageTitle = getReferenceTitle([this](){
1623 return isConstantGroup()
1624 ? theTranslator->trConstantGroupReference(displayName())
1625 : theTranslator->trModuleReference(displayName());
1626 });
1627 }
1628 else
1629 {
1630 pageTitle = getReferenceTitle([this](){
1631 return theTranslator->trNamespaceReference(displayName());
1632 });
1633 }
1634 return pageTitle;
1635}
1636
1638{
1639 SrcLangExt lang = getLanguage();
1640 if (lang==SrcLangExt::Java)
1641 {
1642 return "package";
1643 }
1644 else if(lang==SrcLangExt::CSharp)
1645 {
1646 return "namespace";
1647 }
1648 else if (lang==SrcLangExt::Fortran)
1649 {
1650 return "module";
1651 }
1652 else if (lang==SrcLangExt::IDL)
1653 {
1654 if (isModule())
1655 {
1656 return "module";
1657 }
1658 else if (isConstantGroup())
1659 {
1660 return "constants";
1661 }
1662 else if (isLibrary())
1663 {
1664 return "library";
1665 }
1666 else
1667 {
1668 err_full(getDefFileName(),getDefLine(),"Internal inconsistency: namespace in IDL not module, library or constant group");
1669 }
1670 }
1671 return "namespace";
1672}
1673
1675{
1676 metaData = m;
1677}
1678
1679// --- Cast functions
1680//
1682{
1683 if (d && (typeid(*d)==typeid(NamespaceDefImpl) || typeid(*d)==typeid(NamespaceDefAliasImpl)))
1684 {
1685 return static_cast<NamespaceDef*>(d);
1686 }
1687 else
1688 {
1689 return nullptr;
1690 }
1691}
1692
1694{
1695 Definition *d = toDefinition(md);
1696 if (d && typeid(*d)==typeid(NamespaceDefImpl))
1697 {
1698 return static_cast<NamespaceDef*>(d);
1699 }
1700 else
1701 {
1702 return nullptr;
1703 }
1704}
1705
1706
1708{
1709 if (d && (typeid(*d)==typeid(NamespaceDefImpl) || typeid(*d)==typeid(NamespaceDefAliasImpl)))
1710 {
1711 return static_cast<const NamespaceDef*>(d);
1712 }
1713 else
1714 {
1715 return nullptr;
1716 }
1717}
1718
1720{
1721 if (d && typeid(*d)==typeid(NamespaceDefImpl))
1722 {
1723 return static_cast<NamespaceDefMutable*>(d);
1724 }
1725 else
1726 {
1727 return nullptr;
1728 }
1729}
1730
1731// --- Helpers
1732
1733static NamespaceDef *getResolvedNamespaceRec(StringSet &namespacesTried,const NamespaceAliasInfo &aliasInfo);
1734
1735static QCString replaceNamespaceAliasesRec(StringSet &namespacesTried,const QCString &name)
1736{
1737 QCString result = name;
1738 //printf("> replaceNamespaceAliasesRec(%s)\n",qPrint(name));
1739 if (namespacesTried.find(name.str())==namespacesTried.end())
1740 {
1741 namespacesTried.insert(name.str());
1742 size_t p = 0;
1743 for (;;)
1744 {
1745 size_t i = name.str().find("::",p);
1746 if (i==std::string::npos)
1747 {
1748 auto it = Doxygen::namespaceAliasMap.find(name.str());
1749 if (it != Doxygen::namespaceAliasMap.end())
1750 {
1751 //printf("found map %s->%s\n",qPrint(name),qPrint(it->second.alias));
1752 auto ns = getResolvedNamespaceRec(namespacesTried,it->second);
1753 if (ns)
1754 {
1755 result = replaceNamespaceAliasesRec(namespacesTried,ns->qualifiedName());
1756 }
1757 }
1758 break;
1759 }
1760 else
1761 {
1762 auto it = Doxygen::namespaceAliasMap.find(name.left(i).str());
1763 if (it != Doxygen::namespaceAliasMap.end())
1764 {
1765 //printf("found map %s|%s->%s\n",qPrint(name.left(i)),qPrint(name.mid(i)),qPrint(it->second.alias));
1766 auto ns = getResolvedNamespaceRec(namespacesTried,it->second);
1767 if (ns)
1768 {
1769 result = replaceNamespaceAliasesRec(namespacesTried,ns->qualifiedName()+name.mid(i));
1770 break;
1771 }
1772 }
1773 }
1774 p = i+2;
1775 }
1776 }
1777 //printf("< replaceNamespaceAliasesRec(%s)=%s\n",qPrint(name),qPrint(result));
1778 return result;
1779}
1780
1781static NamespaceDef *getResolvedNamespaceRec(StringSet &namespacesTried,const NamespaceAliasInfo &aliasInfo)
1782{
1783 size_t j = aliasInfo.context.length();
1784 for (;;)
1785 {
1786 if (j>0)
1787 {
1788 //printf("candidate %s|::%s\n",qPrint(aliasInfo.context.substr(0,j)),qPrint(aliasInfo.alias));
1789 auto candidate = replaceNamespaceAliasesRec(namespacesTried,aliasInfo.context.substr(0,j)+"::"+aliasInfo.alias);
1790 auto nd = Doxygen::namespaceLinkedMap->find(candidate);
1791 if (nd)
1792 {
1793 return nd;
1794 }
1795 }
1796 if (j>0) // strip one level from context, i.e. given N1::N2::N3
1797 // j==10 -> j==6 (N1::N2::N3->N1::N2), and then
1798 // j==6 -> j==2 (N1::N2->N1), and then
1799 // j==2 -> j==std::string::npos (N1->"")
1800 {
1801 j = aliasInfo.context.rfind("::",j-1);
1802 }
1803 else
1804 {
1805 j = std::string::npos;
1806 }
1807 if (j==std::string::npos)
1808 {
1809 //printf("candidate %s\n",qPrint(aliasInfo.alias));
1810 auto candidate = replaceNamespaceAliasesRec(namespacesTried,aliasInfo.alias);
1811 auto nd = Doxygen::namespaceLinkedMap->find(candidate);
1812 if (nd)
1813 {
1814 return nd;
1815 }
1816 break;
1817 }
1818 }
1819 return nullptr;
1820}
1821
1823{
1824 //printf("> replaceNamespaceAliases(%s)\n",qPrint(name));
1825 StringSet namespacesTried;
1826 name = replaceNamespaceAliasesRec(namespacesTried,name);
1827 //printf("< replaceNamespaceAliases: result=%s\n",qPrint(name));
1828}
1829
1831{
1832 //printf("> getResolvedNamespace(%s)\n",qPrint(name));
1833 if (name.isEmpty()) return nullptr;
1834 StringSet namespacesTried;
1835 auto ns = getResolvedNamespaceRec(namespacesTried,NamespaceAliasInfo(name.str()));
1836 //printf("< getResolvedNamespace(%s)=%s\n",qPrint(name),ns?qPrint(ns->qualifiedName()):"nullptr");
1837 return ns;
1838}
1839
1840//--------------------------------------------------------------------------------------
1841//
1843{
1844 for (const auto &cnd : nd->getNamespaces())
1845 {
1846 if (cnd->isLinkableInProject() && !cnd->isAnonymous())
1847 {
1848 return true;
1849 }
1850 }
1851 return false;
1852}
1853
1855{
1856 //printf(">namespaceHasNestedConcept(%s)\n",qPrint(nd->name()));
1857 for (const auto &cnd : nd->getNamespaces())
1858 {
1860 {
1861 //printf("<namespaceHasNestedConcept(%s): case1\n",qPrint(nd->name()));
1862 return true;
1863 }
1864 }
1865 for (const auto &cnd : nd->getConcepts())
1866 {
1867 //printf("candidate %s isLinkableInProject()=%d\n",qPrint(cnd->name()),cnd->isLinkableInProject());
1868 if (cnd->isLinkableInProject())
1869 {
1870 //printf("<namespaceHasNestedConcept(%s): case2\n",qPrint(nd->name()));
1871 return true;
1872 }
1873 }
1874 //printf("<namespaceHasNestedConcept(%s): case3\n",qPrint(nd->name()));
1875 return false;
1876}
1877
1879{
1880 //printf(">namespaceHasNestedClass(%s,filterClasses=%d)\n",qPrint(nd->name()),filterClasses);
1881 for (const auto &cnd : nd->getNamespaces())
1882 {
1883 if (namespaceHasNestedClass(cnd,filterClasses,ct))
1884 {
1885 //printf("<namespaceHasNestedClass(%s,filterClasses=%d): case1\n",qPrint(nd->name()),filterClasses);
1886 return true;
1887 }
1888 }
1889
1890 ClassLinkedRefMap list = nd->getClasses();
1891 if (filterClasses)
1892 {
1893 switch (ct)
1894 {
1896 list = nd->getInterfaces();
1897 break;
1898 case ClassDef::Struct:
1899 list = nd->getStructs();
1900 break;
1902 list = nd->getExceptions();
1903 break;
1904 default:
1905 break;
1906 }
1907 }
1908
1909 for (const auto &cd : list)
1910 {
1911 //printf("candidate %s isLinkableInProject()=%d\n",qPrint(cd->name()),cd->isLinkableInProject());
1912 if (cd->isLinkableInProject())
1913 {
1914 //printf("<namespaceHasNestedClass(%s,filterClasses=%d): case2\n",qPrint(nd->name()),filterClasses);
1915 return true;
1916 }
1917 }
1918 //printf("<namespaceHasNestedClass(%s,filterClasses=%d): case3\n",qPrint(nd->name()),filterClasses);
1919 return false;
1920}
1921
1922
A abstract class representing of a compound symbol.
Definition classdef.h:104
virtual QCString className() const =0
Returns the name of the class including outer classes, but not including namespaces.
CompoundType
The various compound types.
Definition classdef.h:109
@ Interface
Definition classdef.h:112
@ Exception
Definition classdef.h:115
virtual CompoundType compoundType() const =0
Returns the type of compound this is, i.e.
void writeDeclaration(OutputList &ol, const ClassDef::CompoundType *filter, const QCString &header, bool localNames) const
Definition classlist.cpp:53
const QCString & name() const override
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:77
virtual const QCString & localName() const =0
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual bool isLinkable() const =0
virtual DefType definitionType() const =0
virtual QCString anchor() const =0
virtual bool isLinkableInProject() const =0
virtual bool isAnonymous() const =0
virtual bool isHidden() const =0
virtual const Definition * findInnerCompound(const QCString &name) const =0
virtual QCString qualifiedName() const =0
virtual CodeSymbolType codeSymbolType() const =0
virtual QCString getOutputFileBase() const =0
virtual const QCString & name() const =0
const QCString & name() const override
QCString getDefFileName() const override
void writeNavigationPath(OutputList &ol) const override
QCString briefFile() const override
QCString qualifiedName() const override
void writeRequirementRefs(OutputList &ol) const override
const RefItemVector & xrefListItems() const override
void setName(const QCString &name) override
QCString briefDescription(bool abbreviate=FALSE) const override
Definition * getOuterScope() const override
DefinitionMixin(const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
void setLocalName(const QCString &name) override
QCString inbodyDocumentation() const override
QCString documentation() const override
void writeDocAnchorsToTagFile(TextStream &fs) const override
SrcLangExt getLanguage() const override
virtual void setOuterScope(Definition *d)=0
static NamespaceLinkedMap * namespaceLinkedMap
Definition doxygen.h:114
static bool suppressDocWarnings
Definition doxygen.h:131
static MemberNameLinkedMap * functionNameLinkedMap
Definition doxygen.h:111
static NamespaceDefMutable * globalScope
Definition doxygen.h:120
static NamespaceAliasInfoMap namespaceAliasMap
Definition doxygen.h:112
A model of a file symbol.
Definition filedef.h:99
virtual void insertMember(MemberDef *md)=0
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1437
Container class representing a vector of objects with keys.
Definition linkedmap.h:232
bool add(const char *k, T *obj)
Definition linkedmap.h:284
A model of a class/file/namespace member symbol.
Definition memberdef.h:48
virtual const ClassDef * getClassDef() const =0
virtual MemberType memberType() const =0
virtual QCString memberTypeName() const =0
virtual void setSectionList(const Definition *container, const MemberList *sl)=0
virtual void setFileDef(FileDef *fd)=0
virtual void setNamespace(NamespaceDef *nd)=0
A list of MemberDef objects as shown in documentation sections.
Definition memberlist.h:125
int numDocMembers() const
Definition memberlist.h:138
void writeDeclarations(OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, const QCString &title, const QCString &subtitle, bool showEnumValues=FALSE, bool showInline=FALSE, const ClassDef *inheritedFrom=nullptr, MemberListType lt=MemberListType::PubMethods(), bool showSectionTitle=true) const
Writes the list of members to the output.
void writeTagFile(TextStream &, bool useQualifiedName=false, bool showNamespaceMembers=true)
MemberListType listType() const
Definition memberlist.h:130
void writeDocumentation(OutputList &ol, const QCString &scopeName, const Definition *container, const QCString &title, const QCString &anchor, bool showEnumValues=FALSE, bool showInline=FALSE) const
void setAnchors()
bool declVisible() const
Wrapper class for the MemberListType type.
Definition types.h:346
constexpr const char * toLabel() const noexcept
Definition types.h:402
void push_back(Ptr &&p)
Definition membername.h:54
void sort()
Definition memberlist.h:76
void push_back(const T &value)
Definition memberlist.h:48
ClassLinkedRefMap getInterfaces() const override
bool subGrouping() const override
ClassLinkedRefMap getExceptions() const override
const MemberDef * getMemberByName(const QCString &name) const override
QCString getOutputFileBase() const override
ClassLinkedRefMap getStructs() const override
ConceptLinkedRefMap getConcepts() const override
QCString displayName(bool b=TRUE) const override
ClassLinkedRefMap getClasses() const override
DefType definitionType() const override
bool isLinkableInProject() const override
const NamespaceDef * getNSAlias() const
QCString title() const override
QCString anchor() const override
int numDocMembers() const override
bool isLinkable() const override
const MemberGroupList & getMemberGroups() const override
const LinkedRefMap< const Definition > & getUsedDefinitions() const override
int countVisibleMembers() const override
~NamespaceDefAliasImpl() override
const QCString & localName() const override
bool isLibrary() const override
bool hasDetailedDescription() const override
bool isVisibleInHierarchy() const override
MemberList * getMemberList(MemberListType lt) const override
NamespaceDefAliasImpl(const Definition *newScope, const NamespaceDef *nd)
bool isModule() const override
QCString compoundTypeString() const override
bool isInline() const override
NamespaceLinkedRefMap getNamespaces() const override
const LinkedRefMap< NamespaceDef > & getUsedNamespaces() const override
CodeSymbolType codeSymbolType() const override
const MemberLists & getMemberLists() const override
bool isConstantGroup() const override
const Definition * findInnerCompound(const QCString &name) const override
An abstract interface of a namespace symbol.
virtual bool isLibrary() const =0
virtual MemberList * getMemberList(MemberListType lt) const =0
virtual bool isConstantGroup() const =0
virtual ConceptLinkedRefMap getConcepts() const =0
virtual ClassLinkedRefMap getStructs() const =0
virtual QCString compoundTypeString() const =0
virtual const LinkedRefMap< NamespaceDef > & getUsedNamespaces() const =0
virtual ClassLinkedRefMap getExceptions() const =0
virtual const MemberLists & getMemberLists() const =0
virtual NamespaceLinkedRefMap getNamespaces() const =0
virtual bool isModule() const =0
virtual bool subGrouping() const =0
virtual int countVisibleMembers() const =0
virtual int numDocMembers() const =0
virtual bool hasDetailedDescription() const =0
virtual bool isInline() const =0
virtual bool isVisibleInHierarchy() const =0
virtual const MemberDef * getMemberByName(const QCString &) const =0
virtual QCString title() const =0
virtual ClassLinkedRefMap getClasses() const =0
virtual ClassLinkedRefMap getInterfaces() const =0
virtual const LinkedRefMap< const Definition > & getUsedDefinitions() const =0
virtual const MemberGroupList & getMemberGroups() const =0
MemberGroupList m_memberGroups
void writeQuickMemberLinks(OutputList &ol, const MemberDef *currentMd) const override
const MemberDef * getMemberByName(const QCString &) const override
bool isConstantGroup() const override
LinkedRefMap< NamespaceDef > m_usingDirList
void addUsingDirective(NamespaceDef *nd) override
const LinkedRefMap< const Definition > & getUsedDefinitions() const override
NamespaceLinkedRefMap getNamespaces() const override
void computeAnchors() override
NamespaceLinkedRefMap m_namespaces
void writeConceptsToTagFile(TextStream &)
void writeMemberPages(OutputList &ol) override
bool isLibrary() const override
void insertNamespace(NamespaceDef *nd) override
void writeMemberGroups(OutputList &ol)
void addInnerCompound(Definition *d) override
void insertClass(ClassDef *cd) override
int countVisibleMembers() const override
bool isLinkable() const override
void insertConcept(ConceptDef *cd) override
bool isInline() const override
void addMemberToList(MemberListType lt, MemberDef *md)
void writeMemberDocumentation(OutputList &ol, MemberListType lt, const QCString &title)
MemberLinkedRefMap m_allMembers
void startMemberDeclarations(OutputList &ol)
void writeTagFile(TextStream &) override
void writeAuthorSection(OutputList &ol)
CodeSymbolType codeSymbolType() const override
ClassLinkedRefMap m_structs
void writeClassDeclarations(OutputList &ol, const QCString &title, const ClassLinkedRefMap &d)
void setFileNameLocal(const QCString &fn)
ClassLinkedRefMap getClasses() const override
MemberList * getMemberList(MemberListType lt) const override
void setFileName(const QCString &fn) override
void endMemberDocumentation(OutputList &ol)
const MemberLists & getMemberLists() const override
ClassLinkedRefMap m_interfaces
const MemberGroupList & getMemberGroups() const override
enum NamespaceDefImpl::@152056333015234071026257214045103374127312105332 m_type
void addRequirementReferences() override
void writeInlineClasses(OutputList &ol)
void writeBriefDescription(OutputList &ol)
~NamespaceDefImpl() override
void combineUsingRelations(NamespaceDefSet &visitedNamespace) override
int numDocMembers() const override
ClassLinkedRefMap m_exceptions
bool subGrouping() const override
QCString anchor() const override
bool isModule() const override
bool isVisibleInHierarchy() const override
void startMemberDocumentation(OutputList &ol)
LinkedRefMap< const Definition > m_usingDeclList
bool hasDetailedDescription() const override
ClassLinkedRefMap getInterfaces() const override
void insertUsedFile(FileDef *fd) override
NamespaceDefImpl(const QCString &defFileName, int defLine, int defColumn, const QCString &name, const QCString &ref=QCString(), const QCString &refFile=QCString(), const QCString &type=QCString(), bool isPublished=false)
QCString title() const override
void writeMemberDeclarations(OutputList &ol, MemberListType lt, const QCString &title)
QCString getOutputFileBase() const override
void endMemberDeclarations(OutputList &ol)
const LinkedRefMap< NamespaceDef > & getUsedNamespaces() const override
void addMembersToMemberGroup() override
void writeDocumentation(OutputList &ol) override
QCString displayName(bool=TRUE) const override
void findSectionsInDocumentation() override
void addUsingDeclaration(const Definition *cd) override
bool isLinkableInProject() const override
void setMetaData(const QCString &m) override
void writeConcepts(OutputList &ol, const QCString &title)
LinkedRefMap< const Definition > m_innerCompounds
ConceptLinkedRefMap getConcepts() const override
void setInline(bool isInline) override
ClassLinkedRefMap getStructs() const override
void addNamespaceAttributes(OutputList &ol)
void distributeMemberGroupDocumentation() override
const Definition * findInnerCompound(const QCString &name) const override
void writeNamespaceDeclarations(OutputList &ol, const QCString &title, bool isConstantGroup=false)
ClassLinkedRefMap m_classes
void countMembers() override
void writeDetailedDescription(OutputList &ol, const QCString &title)
MemberLists m_memberLists
void insertMember(MemberDef *md) override
ClassLinkedRefMap getExceptions() const override
void setName(const QCString &name) override
void writePageNavigation(OutputList &ol) const override
void sortMemberLists() override
void addListReferences() override
ConceptLinkedRefMap m_concepts
QCString compoundTypeString() const override
DefType definitionType() const override
void writeClassesToTagFile(TextStream &, const ClassLinkedRefMap &d)
void writeSummaryLinks(OutputList &ol) const override
virtual void insertMember(MemberDef *md)=0
virtual void combineUsingRelations(NamespaceDefSet &visitedNamespace)=0
void writeDeclaration(OutputList &ol, const QCString &title, bool isConstantGroup=false, bool localName=FALSE)
bool declVisible(bool isContantGroup) const
Class representing a list of output generators that are written to in parallel.
Definition outputlist.h:315
void writeDoc(const IDocNodeAST *ast, const Definition *ctx, const MemberDef *md, int sectionLevel=-1)
Definition outputlist.h:383
void endTextBlock(bool paraBreak=FALSE)
Definition outputlist.h:672
void writeString(const QCString &text)
Definition outputlist.h:411
void startMemberDeclaration()
Definition outputlist.h:569
void disable(OutputType o)
void writeRuler()
Definition outputlist.h:521
void startGroupHeader(const QCString &id=QCString(), int extraLevels=0)
Definition outputlist.h:453
void enable(OutputType o)
void endContents()
Definition outputlist.h:620
void endMemberDescription()
Definition outputlist.h:567
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
Definition outputlist.h:439
void startMemberDescription(const QCString &anchor, const QCString &inheritId=QCString(), bool typ=false)
Definition outputlist.h:565
void docify(const QCString &s)
Definition outputlist.h:437
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, const DocOptions &options)
void startParagraph(const QCString &classDef=QCString())
Definition outputlist.h:407
void startTextBlock(bool dense=FALSE)
Definition outputlist.h:670
void endParagraph()
Definition outputlist.h:409
void startMemberSections()
Definition outputlist.h:461
void startMemberList()
Definition outputlist.h:481
void endTextLink()
Definition outputlist.h:444
void endMemberItem(OutputGenerator::MemberItemType type)
Definition outputlist.h:495
void endMemberList()
Definition outputlist.h:483
void writeSynopsis()
Definition outputlist.h:592
void startTypewriter()
Definition outputlist.h:449
void pushGeneratorState()
void insertMemberAlign(bool templ=FALSE)
Definition outputlist.h:517
void disableAllBut(OutputType o)
void popGeneratorState()
void writeSummaryLink(const QCString &file, const QCString &anchor, const QCString &title, bool first)
Definition outputlist.h:614
void writeAnchor(const QCString &fileName, const QCString &name)
Definition outputlist.h:523
void endGroupHeader(int extraLevels=0)
Definition outputlist.h:455
void endLabels()
Definition outputlist.h:742
void endQuickIndices()
Definition outputlist.h:604
void writePageOutline()
Definition outputlist.h:616
void writeLabel(const QCString &l, bool isLast)
Definition outputlist.h:740
void startLabels()
Definition outputlist.h:738
void startContents()
Definition outputlist.h:618
void endMemberDeclaration(const QCString &anchor, const QCString &inheritId)
Definition outputlist.h:571
void enableAll()
void endMemberHeader()
Definition outputlist.h:471
void startMemberItem(const QCString &anchor, OutputGenerator::MemberItemType type, const QCString &id=QCString())
Definition outputlist.h:493
void endTypewriter()
Definition outputlist.h:451
void lineBreak(const QCString &style=QCString())
Definition outputlist.h:559
void parseText(const QCString &textStr)
void startTextLink(const QCString &file, const QCString &anchor)
Definition outputlist.h:442
void startMemberHeader(const QCString &anchor, int typ=2)
Definition outputlist.h:469
void endMemberSections()
Definition outputlist.h:463
This is an alternative implementation of QCString.
Definition qcstring.h:101
QCString & prepend(const char *s)
Definition qcstring.h:422
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:241
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:593
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:163
const std::string & str() const
Definition qcstring.h:552
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition qcstring.cpp:96
QCString left(size_t len) const
Definition qcstring.h:229
static RequirementManager & instance()
void addRequirementRefsForSymbol(const Definition *symbol)
Text streaming class that buffers data.
Definition textstream.h:36
ClassDef * toClassDef(Definition *d)
ConceptDef * toConceptDef(Definition *d)
#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
std::set< std::string > StringSet
Definition containers.h:31
Definition * toDefinition(DefinitionMutable *dm)
DirIterator end(const DirIterator &) noexcept
Definition dir.cpp:175
void docFindSections(const QCString &input, const Definition *d, const QCString &fileName)
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, const DocOptions &options)
IDocParserPtr createDocParser()
factory function to create a parser
Definition docparser.cpp:55
static void writeTagFile()
static void combineUsingRelations()
Definition doxygen.cpp:9271
FileDef * toFileDef(Definition *d)
Definition filedef.cpp:1967
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
Definition index.cpp:384
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition index.cpp:394
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
@ NamespaceVisible
Definition index.h:92
Translator * theTranslator
Definition language.cpp:71
std::unique_ptr< MemberDef > createMemberDefAlias(const Definition *newScope, const MemberDef *aliasMd)
MemberDefMutable * toMemberDefMutable(Definition *d)
#define err(fmt,...)
Definition message.h:127
#define err_full(file, line, fmt,...)
Definition message.h:132
bool namespaceHasNestedNamespace(const NamespaceDef *nd)
void replaceNamespaceAliases(QCString &name)
bool namespaceHasNestedClass(const NamespaceDef *nd, bool filterClasses, ClassDef::CompoundType ct)
static NamespaceDef * getResolvedNamespaceRec(StringSet &namespacesTried, const NamespaceAliasInfo &aliasInfo)
std::unique_ptr< NamespaceDef > createNamespaceDefAlias(const Definition *newScope, const NamespaceDef *nd)
Factory method to create an alias of an existing namespace.
static bool hasNonReferenceNestedNamespaceRec(const NamespaceDef *nd, int level)
static QCString replaceNamespaceAliasesRec(StringSet &namespacesTried, const QCString &name)
std::unique_ptr< NamespaceDef > createNamespaceDef(const QCString &defFileName, int defLine, int defColumn, const QCString &name, const QCString &ref, const QCString &refFile, const QCString &type, bool isPublished)
Factory method to create new NamespaceDef instance.
NamespaceDef * getResolvedNamespace(const QCString &name)
static QCString makeDisplayName(const NamespaceDef *nd, bool includeScope)
NamespaceDef * toNamespaceDef(Definition *d)
NamespaceDefMutable * toNamespaceDefMutable(Definition *d)
bool namespaceHasNestedConcept(const NamespaceDef *nd)
std::unordered_set< const NamespaceDef * > NamespaceDefSet
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition qcstring.cpp:571
int qstricmp_sort(const char *str1, const char *str2)
Definition qcstring.h:86
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
Web server based search engine.
Represents of a member declaration list with configurable title and subtitle.
Definition layout.h:112
QCString title(SrcLangExt lang) const
Definition layout.cpp:1788
MemberListType type
Definition layout.h:118
Represents of a member definition list with configurable title.
Definition layout.h:132
MemberListType type
Definition layout.h:137
QCString title(SrcLangExt lang) const
Definition layout.cpp:1800
Definition layout.h:102
QCString title(SrcLangExt lang) const
Definition layout.cpp:1781
std::string context
Definition doxygen.h:77
std::string alias
Definition doxygen.h:76
CodeSymbolType
Definition types.h:481
@ Enumeration
Definition types.h:557
@ EnumValue
Definition types.h:558
@ Dictionary
Definition types.h:568
@ Sequence
Definition types.h:567
@ Variable
Definition types.h:555
@ Property
Definition types.h:563
@ Typedef
Definition types.h:556
@ Function
Definition types.h:554
SrcLangExt
Definition types.h:207
QCString convertToHtml(const QCString &s, bool keepEntities)
Definition util.cpp:3944
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
void addGroupListToTitle(OutputList &ol, const Definition *d)
Definition util.cpp:4892
QCString removeAnonymousScopes(const QCString &str)
Definition util.cpp:162
void createSubDirs(const Dir &d)
Definition util.cpp:3621
QCString stripScope(const QCString &name)
Definition util.cpp:3760
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3485
QCString convertToXML(const QCString &s, bool keepEntities)
Definition util.cpp:3893
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
Definition util.cpp:5897
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:4902
A bunch of utility functions.