Doxygen
Loading...
Searching...
No Matches
namespacedef.cpp
Go to the documentation of this file.
1/******************************************************************************
2 *
3 *
4 *
5 * Copyright (C) 1997-2015 by Dimitri van Heesch.
6 *
7 * Permission to use, copy, modify, and distribute this software and its
8 * documentation under the terms of the GNU General Public License is hereby
9 * granted. No representations are made about the suitability of this software
10 * for any purpose. It is provided "as is" without express or implied warranty.
11 * See the GNU General Public License for more details.
12 *
13 * Documents produced by Doxygen are derivative works derived from the
14 * input used in their production; they are not affected by this license.
15 *
16 */
17
18#include "namespacedef.h"
19#include "outputlist.h"
20#include "util.h"
21#include "language.h"
22#include "classdef.h"
23#include "classlist.h"
24#include "memberlist.h"
25#include "doxygen.h"
26#include "message.h"
27#include "docparser.h"
28#include "searchindex.h"
29#include "vhdldocgen.h"
30#include "layout.h"
31#include "membergroup.h"
32#include "config.h"
33#include "definitionimpl.h"
34#include "membername.h"
35#include "conceptdef.h"
36
37//------------------------------------------------------------------
38static QCString makeDisplayName(const NamespaceDef *nd,bool includeScope)
39{
40 QCString result=includeScope ? nd->name() : nd->localName();
41 SrcLangExt lang = nd->getLanguage();
43 if (sep!="::")
44 {
45 result = substitute(result,"::",sep);
46 }
47 if (nd->isAnonymous())
48 {
49 result = removeAnonymousScopes(result);
50 }
51 //printf("makeDisplayName() %s->%s lang=%d\n",qPrint(name()),qPrint(result),lang);
52 return result;
53}
54//------------------------------------------------------------------
55
56class NamespaceDefImpl : public DefinitionMixin<NamespaceDefMutable>
57{
58 public:
59 NamespaceDefImpl(const QCString &defFileName,int defLine,int defColumn,
60 const QCString &name,const QCString &ref=QCString(),
61 const QCString &refFile=QCString(),const QCString &type=QCString(),
62 bool isPublished=false);
63 ~NamespaceDefImpl() override;
65
66 DefType definitionType() const override { return TypeNamespace; }
69 QCString getOutputFileBase() const override;
70 QCString anchor() const override { return QCString(); }
71 void insertUsedFile(FileDef *fd) override;
72 void writeDocumentation(OutputList &ol) override;
73 void writeMemberPages(OutputList &ol) override;
74 void writeQuickMemberLinks(OutputList &ol,const MemberDef *currentMd) const override;
75 void writeTagFile(TextStream &) override;
76 void insertClass(ClassDef *cd) override;
77 void insertConcept(ConceptDef *cd) override;
78 void insertNamespace(NamespaceDef *nd) override;
79 void insertMember(MemberDef *md) override;
80 void computeAnchors() override;
81 void countMembers() override;
82 int numDocMembers() const override;
83 void addUsingDirective(NamespaceDef *nd) override;
85 void addUsingDeclaration(const Definition *cd) override;
87 void combineUsingRelations(NamespaceDefSet &visitedNamespace) override;
88 QCString displayName(bool=TRUE) const override;
89 void setInline(bool isInline) override { m_inline = isInline; }
90 bool isConstantGroup() const override { return CONSTANT_GROUP == m_type; }
91 bool isModule() const override { return NAMESPACE == m_type || MODULE == m_type; }
92 bool isLibrary() const override { return LIBRARY == m_type; }
93 bool isInline() const override { return m_inline; }
94 bool isLinkableInProject() const override;
95 bool isLinkable() const override;
96 bool isVisibleInHierarchy() const override;
97 bool hasDetailedDescription() const override;
98 void addMembersToMemberGroup() override;
100 void findSectionsInDocumentation() override;
101 void sortMemberLists() override;
102 const Definition *findInnerCompound(const QCString &name) const override;
103 void addInnerCompound(Definition *d) override;
104 void addListReferences() override;
105 void setFileName(const QCString &fn) override;
106 bool subGrouping() const override { return m_subGrouping; }
107 MemberList *getMemberList(MemberListType lt) const override;
108 const MemberLists &getMemberLists() const override { return m_memberLists; }
109 const MemberDef *getMemberByName(const QCString &) const override;
110 const MemberGroupList &getMemberGroups() const override { return m_memberGroups; }
111 ClassLinkedRefMap getClasses() const override { return classes; }
112 ClassLinkedRefMap getInterfaces() const override { return interfaces; }
113 ClassLinkedRefMap getStructs() const override { return structs; }
114 ClassLinkedRefMap getExceptions() const override { return exceptions; }
115 NamespaceLinkedRefMap getNamespaces() const override { return namespaces; }
116 ConceptLinkedRefMap getConcepts() const override { return m_concepts; }
117 void setName(const QCString &name) override;
118
119 QCString title() const override;
120 QCString compoundTypeString() const override;
121
122 void setMetaData(const QCString &m) override;
123 int countVisibleMembers() const override;
124 void writeSummaryLinks(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 = &interfaces;
418 }
419 else if (cd->compoundType()==ClassDef::Struct)
420 {
421 d = &structs;
422 }
423 else if (cd->compoundType()==ClassDef::Exception)
424 {
425 d = &exceptions;
426 }
427 }
428
429 d->add(cd->name(),cd);
430}
431
433{
434 m_concepts.add(cd->name(),cd);
435}
436
438{
439 namespaces.add(nd->name(),nd);
440}
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 {
579 QCString name = md->name();
581 mn->push_back(std::move(aliasMd));
582 }
583 }
584 }
585 }
586}
587
589{
590 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
591 if (allMemberList) allMemberList->setAnchors();
592}
593
595{
596 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
597 return ((!briefDescription().isEmpty() && repeatBrief) ||
598 !documentation().isEmpty());
599}
600
602{
605 tagFile << " <compound kind=\"namespace\">\n";
606 tagFile << " <name>" << convertToXML(name()) << "</name>\n";
607 tagFile << " <filename>" << fn << "</filename>\n";
608 QCString idStr = id();
609 if (!idStr.isEmpty())
610 {
611 tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>\n";
612 }
613 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
614 {
615 switch (lde->kind())
616 {
617 case LayoutDocEntry::NamespaceNestedNamespaces:
618 {
619 for (const auto &nd : namespaces)
620 {
621 if (nd->isLinkableInProject())
622 {
623 tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>\n";
624 }
625 }
626 }
627 break;
628 case LayoutDocEntry::NamespaceClasses:
629 {
631 }
632 break;
633 case LayoutDocEntry::NamespaceInterfaces:
634 {
636 }
637 break;
638 case LayoutDocEntry::NamespaceStructs:
639 {
641 }
642 break;
643 case LayoutDocEntry::NamespaceExceptions:
644 {
646 }
647 break;
648 case LayoutDocEntry::NamespaceConcepts:
649 {
650 writeConceptsToTagFile(tagFile);
651 }
652 break;
653 case LayoutDocEntry::MemberDecl:
654 {
655 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
656 if (lmd)
657 {
658 MemberList * ml = getMemberList(lmd->type);
659 if (ml)
660 {
661 ml->writeTagFile(tagFile);
662 }
663 }
664 }
665 break;
666 case LayoutDocEntry::MemberGroups:
667 {
668 for (const auto &mg : m_memberGroups)
669 {
670 mg->writeTagFile(tagFile);
671 }
672 }
673 break;
674 default:
675 break;
676 }
677 }
679 tagFile << " </compound>\n";
680}
681
683{
685 {
688 ol.writeRuler();
692 ol.writeAnchor(QCString(),"details");
694 ol.startGroupHeader();
695 ol.parseText(title);
696 ol.endGroupHeader();
697
698 ol.startTextBlock();
699 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
700 {
702 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
703 }
704 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
705 !documentation().isEmpty())
706 {
710 ol.enableAll();
713 ol.writeString("\n\n");
715 }
716 if (!documentation().isEmpty())
717 {
718 ol.generateDoc(docFile(),docLine(),this,nullptr,documentation()+"\n",TRUE,FALSE,
719 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
720 }
721 ol.endTextBlock();
722 }
723}
724
726{
728 {
729 auto parser { createDocParser() };
730 auto ast { validatingParseDoc(*parser.get(),
731 briefFile(),briefLine(),this,nullptr,
733 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
734 if (!ast->isEmpty())
735 {
736 ol.startParagraph();
739 ol.writeString(" - ");
741 ol.writeDoc(ast.get(),this,nullptr);
744 ol.writeString(" \n");
746
748 {
750 ol.startTextLink(getOutputFileBase(),"details");
751 ol.parseText(theTranslator->trMore());
752 ol.endTextLink();
753 }
755 ol.endParagraph();
756 }
757 }
758
759 // Write a summary of the Slice definition including metadata.
761 {
762 ol.startParagraph();
763 ol.startTypewriter();
764 if (!metaData.isEmpty())
765 {
766 ol.docify(metaData);
767 ol.lineBreak();
768 }
769 ol.docify("module ");
770 ol.docify(stripScope(name()));
771 ol.docify(" { ... }");
772 ol.endTypewriter();
773 ol.endParagraph();
774 }
775
776 ol.writeSynopsis();
777}
778
783
788
790{
791 if (Config_getBool(SEPARATE_MEMBER_PAGES))
792 {
795 }
796}
797
799{
800 if (Config_getBool(SEPARATE_MEMBER_PAGES))
801 {
804 }
805}
806
811
813{
814 m_concepts.writeDeclaration(ol,title,TRUE);
815}
816
818{
819 classes.writeDocumentation(ol,this);
820}
821
827
829{
830 /* write user defined member groups */
831 for (const auto &mg : m_memberGroups)
832 {
833 if (!mg->allMembersInSameSection() || !m_subGrouping)
834 {
835 mg->writeDeclarations(ol,nullptr,this,nullptr,nullptr,nullptr);
836 }
837 }
838}
839
841{
842 // write Author section (Man only)
845 ol.startGroupHeader();
846 ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
847 ol.endGroupHeader();
848 ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString(PROJECT_NAME)));
850}
851
853{
856 bool first=TRUE;
857 SrcLangExt lang = getLanguage();
858 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
859 {
860 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
861 if (lde->kind()==LayoutDocEntry::NamespaceClasses && classes.declVisible() && ls)
862 {
863 QCString label = "nested-classes";
864 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
865 first=FALSE;
866 }
867 else if (lde->kind()==LayoutDocEntry::NamespaceInterfaces && interfaces.declVisible() && ls)
868 {
869 QCString label = "interfaces";
870 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
871 first=FALSE;
872 }
873 else if (lde->kind()==LayoutDocEntry::NamespaceStructs && structs.declVisible() && ls)
874 {
875 QCString label = "structs";
876 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
877 first=FALSE;
878 }
879 else if (lde->kind()==LayoutDocEntry::NamespaceExceptions && exceptions.declVisible() && ls)
880 {
881 QCString label = "exceptions";
882 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
883 first=FALSE;
884 }
885 else if (lde->kind()==LayoutDocEntry::NamespaceNestedNamespaces && namespaces.declVisible(false) && ls)
886 {
887 QCString label = "namespaces";
888 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
889 first=FALSE;
890 }
891 else if (lde->kind()==LayoutDocEntry::NamespaceNestedConstantGroups && namespaces.declVisible(true) && ls)
892 {
893 QCString label = "constantgroups";
894 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
895 first=FALSE;
896 }
897 else if (lde->kind()==LayoutDocEntry::NamespaceConcepts && m_concepts.declVisible() && ls)
898 {
899 QCString label = "concepts";
900 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
901 first=FALSE;
902 }
903 else if (lde->kind()== LayoutDocEntry::MemberDecl)
904 {
905 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
906 if (lmd)
907 {
908 MemberList * ml = getMemberList(lmd->type);
909 if (ml && ml->declVisible())
910 {
911 ol.writeSummaryLink(QCString(),ml->listType().toLabel(),lmd->title(lang),first);
912 first=FALSE;
913 }
914 }
915 }
916 }
917 if (!first)
918 {
919 ol.writeString(" </div>\n");
920 }
922}
923
925{
926 // UNO IDL constant groups may be published
928 {
931 ol.startLabels();
932 ol.writeLabel("published",false);
933 ol.endLabels();
935 }
936 else if (isExported())
937 {
940 ol.startLabels();
941 ol.writeLabel("export",false);
942 ol.endLabels();
944 }
945}
946
948{
949 for (const auto &cd : list)
950 {
951 if (cd->isLinkableInProject())
952 {
953 tagFile << " <class kind=\"" << cd->compoundTypeString()
954 << "\">" << convertToXML(cd->name()) << "</class>\n";
955 }
956 }
957}
958
960{
961 for (const auto &cd : m_concepts)
962 {
963 if (cd->isLinkableInProject())
964 {
965 tagFile << " <concept>" << convertToXML(cd->name()) << "</concept>\n";
966 }
967 }
968}
969
971{
972 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
973 //bool outputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
974 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
975
976 QCString pageTitle = title();
977 startFile(ol,getOutputFileBase(),name(),pageTitle,HighlightedItem::NamespaceVisible,!generateTreeView);
978
979 if (!generateTreeView)
980 {
982 {
984 }
985 ol.endQuickIndices();
986 }
987
988 startTitle(ol,getOutputFileBase(),this);
989 ol.parseText(pageTitle);
990 addGroupListToTitle(ol,this);
993 ol.startContents();
994
995 //---------------------------------------- start flexible part -------------------------------
996
997 SrcLangExt lang = getLanguage();
998 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
999 {
1000 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
1001 switch (lde->kind())
1002 {
1003 case LayoutDocEntry::BriefDesc:
1005 break;
1006 case LayoutDocEntry::MemberDeclStart:
1008 break;
1009 case LayoutDocEntry::NamespaceClasses:
1010 {
1011 if (ls) writeClassDeclarations(ol,ls->title(lang),classes);
1012 }
1013 break;
1014 case LayoutDocEntry::NamespaceInterfaces:
1015 {
1016 if (ls) writeClassDeclarations(ol,ls->title(lang),interfaces);
1017 }
1018 break;
1019 case LayoutDocEntry::NamespaceStructs:
1020 {
1021 if (ls) writeClassDeclarations(ol,ls->title(lang),structs);
1022 }
1023 break;
1024 case LayoutDocEntry::NamespaceExceptions:
1025 {
1026 if (ls) writeClassDeclarations(ol,ls->title(lang),exceptions);
1027 }
1028 break;
1029 case LayoutDocEntry::NamespaceConcepts:
1030 {
1031 if (ls) writeConcepts(ol,ls->title(lang));
1032 }
1033 break;
1034 case LayoutDocEntry::NamespaceNestedNamespaces:
1035 {
1036 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),false);
1037 }
1038 break;
1039 case LayoutDocEntry::NamespaceNestedConstantGroups:
1040 {
1041 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),true);
1042 }
1043 break;
1044 case LayoutDocEntry::MemberGroups:
1046 break;
1047 case LayoutDocEntry::MemberDecl:
1048 {
1049 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1050 if (lmd) writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
1051 }
1052 break;
1053 case LayoutDocEntry::MemberDeclEnd:
1055 break;
1056 case LayoutDocEntry::DetailedDesc:
1057 {
1058 if (ls) writeDetailedDescription(ol,ls->title(lang));
1059 }
1060 break;
1061 case LayoutDocEntry::MemberDefStart:
1063 break;
1064 case LayoutDocEntry::NamespaceInlineClasses:
1066 break;
1067 case LayoutDocEntry::MemberDef:
1068 {
1069 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1070 if (lmd) writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
1071 }
1072 break;
1073 case LayoutDocEntry::MemberDefEnd:
1075 break;
1076 case LayoutDocEntry::AuthorSection:
1078 break;
1079 case LayoutDocEntry::ClassIncludes:
1080 case LayoutDocEntry::ClassInheritanceGraph:
1081 case LayoutDocEntry::ClassNestedClasses:
1082 case LayoutDocEntry::ClassCollaborationGraph:
1083 case LayoutDocEntry::ClassAllMembersLink:
1084 case LayoutDocEntry::ClassUsedFiles:
1085 case LayoutDocEntry::ClassInlineClasses:
1086 case LayoutDocEntry::ConceptDefinition:
1087 case LayoutDocEntry::FileClasses:
1088 case LayoutDocEntry::FileConcepts:
1089 case LayoutDocEntry::FileInterfaces:
1090 case LayoutDocEntry::FileStructs:
1091 case LayoutDocEntry::FileExceptions:
1092 case LayoutDocEntry::FileNamespaces:
1093 case LayoutDocEntry::FileConstantGroups:
1094 case LayoutDocEntry::FileIncludes:
1095 case LayoutDocEntry::FileIncludeGraph:
1096 case LayoutDocEntry::FileIncludedByGraph:
1097 case LayoutDocEntry::FileSourceLink:
1098 case LayoutDocEntry::FileInlineClasses:
1099 case LayoutDocEntry::GroupClasses:
1100 case LayoutDocEntry::GroupConcepts:
1101 case LayoutDocEntry::GroupModules:
1102 case LayoutDocEntry::GroupInlineClasses:
1103 case LayoutDocEntry::GroupNamespaces:
1104 case LayoutDocEntry::GroupDirs:
1105 case LayoutDocEntry::GroupNestedGroups:
1106 case LayoutDocEntry::GroupFiles:
1107 case LayoutDocEntry::GroupGraph:
1108 case LayoutDocEntry::GroupPageDocs:
1109 case LayoutDocEntry::ModuleExports:
1110 case LayoutDocEntry::ModuleClasses:
1111 case LayoutDocEntry::ModuleConcepts:
1112 case LayoutDocEntry::ModuleUsedFiles:
1113 case LayoutDocEntry::DirSubDirs:
1114 case LayoutDocEntry::DirFiles:
1115 case LayoutDocEntry::DirGraph:
1116 err("Internal inconsistency: member '{}' should not be part of "
1117 "LayoutDocManager::Namespace entry list\n",lde->entryToString());
1118 break;
1119 }
1120 }
1121
1122 //---------------------------------------- end flexible part -------------------------------
1123
1124 ol.endContents();
1125
1126 endFileWithNavPath(ol,this);
1127
1128 if (Config_getBool(SEPARATE_MEMBER_PAGES))
1129 {
1130 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1131 if (allMemberList) allMemberList->sort();
1132 writeMemberPages(ol);
1133 }
1134}
1135
1137{
1138 ol.pushGeneratorState();
1140
1141 for (const auto &ml : m_memberLists)
1142 {
1143 if (ml->listType().isDocumentation())
1144 {
1145 ml->writeDocumentationPage(ol,displayName(),this);
1146 }
1147 }
1148 ol.popGeneratorState();
1149}
1150
1152{
1153 bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
1154
1155 ol.writeString(" <div class=\"navtab\">\n");
1156 ol.writeString(" <table>\n");
1157
1158 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1159 if (allMemberList)
1160 {
1161 for (const auto &md : *allMemberList)
1162 {
1163 if (md->getNamespaceDef()==this && md->isLinkable() && !md->isEnumValue())
1164 {
1165 if (md->isLinkableInProject())
1166 {
1167 QCString fn = md->getOutputFileBase();
1169 if (md==currentMd) // selected item => highlight
1170 {
1171 ol.writeString(" <tr><td class=\"navtabHL\">");
1172 }
1173 else
1174 {
1175 ol.writeString(" <tr><td class=\"navtab\">");
1176 }
1177 ol.writeString("<a class=\"navtab\" ");
1178 ol.writeString("href=\"");
1179 if (createSubDirs) ol.writeString("../../");
1180 ol.writeString(fn+"#"+md->anchor());
1181 ol.writeString("\">");
1182 ol.writeString(convertToHtml(md->localName()));
1183 ol.writeString("</a>");
1184 ol.writeString("</td></tr>\n");
1185 }
1186 }
1187 }
1188 }
1189
1190 ol.writeString(" </table>\n");
1191 ol.writeString(" </div>\n");
1192}
1193
1195{
1196 for (auto &ml : m_memberLists)
1197 {
1198 ml->countDecMembers();
1199 ml->countDocMembers();
1200 }
1201 for (const auto &mg : m_memberGroups)
1202 {
1203 mg->countDecMembers();
1204 mg->countDocMembers();
1205 }
1206}
1207
1209{
1210 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1211 return (allMemberList ? allMemberList->numDocMembers() : 0) + static_cast<int>(m_innerCompounds.size());
1212}
1213
1215{
1216 m_usingDirList.add(nd->qualifiedName(),nd);
1217 //printf("%s: NamespaceDefImpl::addUsingDirective: %s:%zu\n",qPrint(name()),qPrint(nd->qualifiedName()),m_usingDirList.size());
1218}
1219
1224
1229
1231{
1232 if (n==nullptr) return nullptr;
1233 const Definition *d = m_innerCompounds.find(n);
1234 if (d==nullptr)
1235 {
1236 if (!m_usingDirList.empty())
1237 {
1238 d = m_usingDirList.find(n);
1239 }
1240 if (d==nullptr && !m_usingDeclList.empty())
1241 {
1242 d = m_usingDeclList.find(n);
1243 }
1244 }
1245 return d;
1246}
1247
1249{
1250 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
1251 {
1252 const RefItemVector &xrefItems = xrefListItems();
1253 addRefItem(xrefItems,
1254 qualifiedName(),
1256 theTranslator->trModule(TRUE,TRUE) :
1257 theTranslator->trNamespace(TRUE,TRUE),
1259 QCString(),
1260 this
1261 );
1262 }
1263 for (const auto &mg : m_memberGroups)
1264 {
1265 mg->addListReferences(this);
1266 }
1267 for (auto &ml : m_memberLists)
1268 {
1269 if (ml->listType().isDocumentation())
1270 {
1271 ml->addListReferences(this);
1272 }
1273 }
1274}
1275
1277{
1278 return makeDisplayName(this,includeScope);
1279}
1280
1282{
1283 if (visitedNamespaces.find(this)!=visitedNamespaces.end()) return; // already processed
1284 visitedNamespaces.insert(this);
1285
1287 for (auto &nd : usingDirList)
1288 {
1290 if (ndm)
1291 {
1292 ndm->combineUsingRelations(visitedNamespaces);
1293 }
1294 }
1295
1296 for (auto &nd : usingDirList)
1297 {
1298 // add used namespaces of namespace nd to this namespace
1299 for (const auto &und : nd->getUsedNamespaces())
1300 {
1301 addUsingDirective(und);
1302 }
1303 // add used classes of namespace nd to this namespace
1304 for (const auto &ud : nd->getUsedDefinitions())
1305 {
1307 }
1308 }
1309}
1310
1312{
1313 int count=0;
1314 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1315 {
1316 if (lde->kind()==LayoutDocEntry::MemberDef)
1317 {
1318 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1319 if (lmd)
1320 {
1321 MemberList *ml = getMemberList(lmd->type);
1322 if (ml)
1323 {
1324 for (const auto &md : *ml)
1325 {
1326 if (md->visibleInIndex())
1327 {
1328 count++;
1329 }
1330 }
1331 }
1332 }
1333 }
1334 }
1335 return count;
1336}
1337
1338
1339
1340//-------------------------------------------------------------------------------
1341
1342bool NamespaceLinkedRefMap::declVisible(bool isConstantGroup) const
1343{
1344 bool found=false;
1345 for (const auto &nd : *this)
1346 {
1347 if (nd->isLinkable() && nd->hasDocumentation())
1348 {
1349 SrcLangExt lang = nd->getLanguage();
1350 if (SrcLangExt::IDL==lang)
1351 {
1352 if (isConstantGroup == nd->isConstantGroup())
1353 {
1354 found=true;
1355 break;
1356 }
1357 }
1358 else if (!isConstantGroup) // ensure we only get extra section in IDL
1359 {
1360 if (nd->isConstantGroup())
1361 {
1362 err("Internal inconsistency: constant group but not IDL?\n");
1363 }
1364 found=true;
1365 break;
1366 }
1367 }
1368 }
1369 return found;
1370}
1371
1373 bool const isConstantGroup,bool localName)
1374{
1375
1376
1377 if (empty()) return; // no namespaces in the list
1378
1379 if (Config_getBool(OPTIMIZE_OUTPUT_VHDL)) return;
1380
1381 if (!declVisible(isConstantGroup)) return;
1382
1383 // write list of namespaces
1384 ol.startMemberHeader(isConstantGroup ? "constantgroups" : "namespaces");
1385 //bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
1386 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
1387 ol.parseText(title);
1388 ol.endMemberHeader();
1389 ol.startMemberList();
1390 for (const auto &nd : *this)
1391 {
1392 if (nd->isLinkable() && nd->hasDocumentation())
1393 {
1394 SrcLangExt lang = nd->getLanguage();
1395 if (lang==SrcLangExt::IDL && (isConstantGroup != nd->isConstantGroup()))
1396 continue; // will be output in another pass, see layout_default.xml
1399 QCString ct = nd->compoundTypeString();
1400 ol.docify(ct);
1401 ol.docify(" ");
1402 ol.insertMemberAlign();
1403 QCString name;
1404 if (localName)
1405 {
1406 name = nd->localName();
1407 }
1408 else
1409 {
1410 name = nd->displayName();
1411 }
1412 ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),QCString(),name);
1414 if (!nd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
1415 {
1416 ol.startMemberDescription(nd->getOutputFileBase());
1417 ol.generateDoc(nd->briefFile(),nd->briefLine(),nd,nullptr,nd->briefDescription(),FALSE,FALSE,
1418 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
1420 }
1422 }
1423 }
1424 ol.endMemberList();
1425}
1426
1427//-------------------------------------------------------------------------------
1428
1430{
1431 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
1432 bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
1433 const auto &ml = m_memberLists.get(lt,MemberListContainer::Namespace);
1434 ml->setNeedsSorting(
1435 (ml->listType().isDeclaration() && sortBriefDocs) ||
1436 (ml->listType().isDocumentation() && sortMemberDocs));
1437 ml->push_back(md);
1438
1439 if (ml->listType().isDeclaration())
1440 {
1442 if (mdm)
1443 {
1444 mdm->setSectionList(this,ml.get());
1445 }
1446 }
1447}
1448
1450{
1451 for (auto &ml : m_memberLists)
1452 {
1453 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
1454 }
1455
1456 auto classComp = [](const ClassLinkedRefMap::Ptr &c1,const ClassLinkedRefMap::Ptr &c2)
1457 {
1458 return Config_getBool(SORT_BY_SCOPE_NAME) ?
1459 qstricmp_sort(c1->name(), c2->name())<0 :
1460 qstricmp_sort(c1->className(), c2->className())<0;
1461 };
1462
1463 std::stable_sort(classes.begin(), classes.end(), classComp);
1464 std::stable_sort(interfaces.begin(),interfaces.end(),classComp);
1465 std::stable_sort(structs.begin(), structs.end(), classComp);
1466 std::stable_sort(exceptions.begin(),exceptions.end(),classComp);
1467
1468
1469 auto namespaceComp = [](const NamespaceLinkedRefMap::Ptr &n1,const NamespaceLinkedRefMap::Ptr &n2)
1470 {
1471 return qstricmp_sort(n1->name(),n2->name())<0;
1472 };
1473
1474 std::stable_sort(namespaces.begin(),namespaces.end(),namespaceComp);
1475}
1476
1478{
1479 for (auto &ml : m_memberLists)
1480 {
1481 if (ml->listType()==lt)
1482 {
1483 return ml.get();
1484 }
1485 }
1486 return nullptr;
1487}
1488
1490{
1491 MemberList * ml = getMemberList(lt);
1492 if (ml) ml->writeDeclarations(ol,nullptr,this,nullptr,nullptr,nullptr,title,QCString());
1493}
1494
1500
1501static bool hasNonReferenceNestedNamespaceRec(const NamespaceDef *nd,int level)
1502{
1503 if (level>30)
1504 {
1505 err("Possible recursive namespace relation while inside {}\n",nd->name());
1506 return false;
1507 }
1508 bool found=nd->isLinkableInProject();
1509 if (found)
1510 {
1511 return true;
1512 }
1513 else
1514 {
1515 for (const auto &ind : nd->getNamespaces())
1516 {
1518 if (found) break;
1519 }
1520 }
1521 return found;
1522}
1523
1525{
1526 bool allExternals = Config_getBool(ALLEXTERNALS);
1527 return allExternals || hasNonReferenceNestedNamespaceRec(this,0) || isLinkable();
1528}
1529
1531{
1532 int i = name().findRev("::");
1533 if (i==-1) i=0; else i+=2;
1534 bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES);
1535 bool hideUndoc = Config_getBool(HIDE_UNDOC_NAMESPACES);
1536 if (extractAnonNs && // extract anonymous ns
1537 name().mid(i,20)=="anonymous_namespace{" // correct prefix
1538 ) // not disabled by config
1539 {
1540 return TRUE;
1541 }
1542 return !name().isEmpty() && name().at(i)!='@' && // not anonymous
1543 (hasDocumentation() || !hideUndoc || getLanguage()==SrcLangExt::CSharp) && // documented
1544 !isReference() && // not an external reference
1545 !isHidden() && // not hidden
1546 !isArtificial(); // or artificial
1547}
1548
1550{
1551 return isLinkableInProject() || isReference();
1552}
1553
1555{
1556 return m_allMembers.find(n);
1557}
1558
1560{
1561 SrcLangExt lang = getLanguage();
1562 QCString pageTitle;
1563 if (lang==SrcLangExt::Java)
1564 {
1565 pageTitle = theTranslator->trPackage(displayName());
1566 }
1567 else if (lang==SrcLangExt::Fortran || lang==SrcLangExt::Slice)
1568 {
1569 pageTitle = theTranslator->trModuleReference(displayName());
1570 }
1571 else if (lang==SrcLangExt::IDL)
1572 {
1573 pageTitle = isConstantGroup()
1574 ? theTranslator->trConstantGroupReference(displayName())
1575 : theTranslator->trModuleReference(displayName());
1576 }
1577 else
1578 {
1579 pageTitle = theTranslator->trNamespaceReference(displayName());
1580 }
1581 return pageTitle;
1582}
1583
1585{
1586 SrcLangExt lang = getLanguage();
1587 if (lang==SrcLangExt::Java)
1588 {
1589 return "package";
1590 }
1591 else if(lang==SrcLangExt::CSharp)
1592 {
1593 return "namespace";
1594 }
1595 else if (lang==SrcLangExt::Fortran)
1596 {
1597 return "module";
1598 }
1599 else if (lang==SrcLangExt::IDL)
1600 {
1601 if (isModule())
1602 {
1603 return "module";
1604 }
1605 else if (isConstantGroup())
1606 {
1607 return "constants";
1608 }
1609 else if (isLibrary())
1610 {
1611 return "library";
1612 }
1613 else
1614 {
1615 err_full(getDefFileName(),getDefLine(),"Internal inconsistency: namespace in IDL not module, library or constant group");
1616 }
1617 }
1618 return "namespace";
1619}
1620
1622{
1623 metaData = m;
1624}
1625
1626// --- Cast functions
1627//
1629{
1630 if (d && (typeid(*d)==typeid(NamespaceDefImpl) || typeid(*d)==typeid(NamespaceDefAliasImpl)))
1631 {
1632 return static_cast<NamespaceDef*>(d);
1633 }
1634 else
1635 {
1636 return nullptr;
1637 }
1638}
1639
1641{
1642 Definition *d = toDefinition(md);
1643 if (d && typeid(*d)==typeid(NamespaceDefImpl))
1644 {
1645 return static_cast<NamespaceDef*>(d);
1646 }
1647 else
1648 {
1649 return nullptr;
1650 }
1651}
1652
1653
1655{
1656 if (d && (typeid(*d)==typeid(NamespaceDefImpl) || typeid(*d)==typeid(NamespaceDefAliasImpl)))
1657 {
1658 return static_cast<const NamespaceDef*>(d);
1659 }
1660 else
1661 {
1662 return nullptr;
1663 }
1664}
1665
1667{
1668 if (d && typeid(*d)==typeid(NamespaceDefImpl))
1669 {
1670 return static_cast<NamespaceDefMutable*>(d);
1671 }
1672 else
1673 {
1674 return nullptr;
1675 }
1676}
1677
1678// --- Helpers
1679
1680static NamespaceDef *getResolvedNamespaceRec(StringSet &namespacesTried,const NamespaceAliasInfo &aliasInfo);
1681
1682static QCString replaceNamespaceAliasesRec(StringSet &namespacesTried,const QCString &name)
1683{
1684 QCString result = name;
1685 //printf("> replaceNamespaceAliasesRec(%s)\n",qPrint(name));
1686 if (namespacesTried.find(name.str())==namespacesTried.end())
1687 {
1688 namespacesTried.insert(name.str());
1689 size_t p = 0;
1690 for (;;)
1691 {
1692 size_t i = name.str().find("::",p);
1693 if (i==std::string::npos)
1694 {
1695 auto it = Doxygen::namespaceAliasMap.find(name.str());
1696 if (it != Doxygen::namespaceAliasMap.end())
1697 {
1698 //printf("found map %s->%s\n",qPrint(name),qPrint(it->second.alias));
1699 auto ns = getResolvedNamespaceRec(namespacesTried,it->second);
1700 if (ns)
1701 {
1702 result = replaceNamespaceAliasesRec(namespacesTried,ns->qualifiedName());
1703 }
1704 }
1705 break;
1706 }
1707 else
1708 {
1709 auto it = Doxygen::namespaceAliasMap.find(name.left(i).str());
1710 if (it != Doxygen::namespaceAliasMap.end())
1711 {
1712 //printf("found map %s|%s->%s\n",qPrint(name.left(i)),qPrint(name.mid(i)),qPrint(it->second.alias));
1713 auto ns = getResolvedNamespaceRec(namespacesTried,it->second);
1714 if (ns)
1715 {
1716 result = replaceNamespaceAliasesRec(namespacesTried,ns->qualifiedName()+name.mid(i));
1717 break;
1718 }
1719 }
1720 }
1721 p = i+2;
1722 }
1723 }
1724 //printf("< replaceNamespaceAliasesRec(%s)=%s\n",qPrint(name),qPrint(result));
1725 return result;
1726}
1727
1728static NamespaceDef *getResolvedNamespaceRec(StringSet &namespacesTried,const NamespaceAliasInfo &aliasInfo)
1729{
1730 size_t j = aliasInfo.context.length();
1731 for (;;)
1732 {
1733 if (j>0)
1734 {
1735 //printf("candidate %s|::%s\n",qPrint(aliasInfo.context.substr(0,j)),qPrint(aliasInfo.alias));
1736 auto candidate = replaceNamespaceAliasesRec(namespacesTried,aliasInfo.context.substr(0,j)+"::"+aliasInfo.alias);
1737 auto nd = Doxygen::namespaceLinkedMap->find(candidate);
1738 if (nd)
1739 {
1740 return nd;
1741 }
1742 }
1743 if (j>0) // strip one level from context, i.e. given N1::N2::N3
1744 // j==10 -> j==6 (N1::N2::N3->N1::N2), and then
1745 // j==6 -> j==2 (N1::N2->N1), and then
1746 // j==2 -> j==std::string::npos (N1->"")
1747 {
1748 j = aliasInfo.context.rfind("::",j-1);
1749 }
1750 else
1751 {
1752 j = std::string::npos;
1753 }
1754 if (j==std::string::npos)
1755 {
1756 //printf("candidate %s\n",qPrint(aliasInfo.alias));
1757 auto candidate = replaceNamespaceAliasesRec(namespacesTried,QCString(aliasInfo.alias));
1758 auto nd = Doxygen::namespaceLinkedMap->find(candidate);
1759 if (nd)
1760 {
1761 return nd;
1762 }
1763 break;
1764 }
1765 }
1766 return nullptr;
1767}
1768
1770{
1771 //printf("> replaceNamespaceAliases(%s)\n",qPrint(name));
1772 StringSet namespacesTried;
1773 name = replaceNamespaceAliasesRec(namespacesTried,name);
1774 //printf("< replaceNamespaceAliases: result=%s\n",qPrint(name));
1775}
1776
1778{
1779 //printf("> getResolvedNamespace(%s)\n",qPrint(name));
1780 if (name.isEmpty()) return nullptr;
1781 StringSet namespacesTried;
1782 auto ns = getResolvedNamespaceRec(namespacesTried,NamespaceAliasInfo(name.str()));
1783 //printf("< getResolvedNamespace(%s)=%s\n",qPrint(name),ns?qPrint(ns->qualifiedName()):"nullptr");
1784 return ns;
1785}
1786
1787//--------------------------------------------------------------------------------------
1788//
1790{
1791 for (const auto &cnd : nd->getNamespaces())
1792 {
1793 if (cnd->isLinkableInProject() && !cnd->isAnonymous())
1794 {
1795 return true;
1796 }
1797 }
1798 return false;
1799}
1800
1802{
1803 //printf(">namespaceHasNestedConcept(%s)\n",qPrint(nd->name()));
1804 for (const auto &cnd : nd->getNamespaces())
1805 {
1807 {
1808 //printf("<namespaceHasNestedConcept(%s): case1\n",qPrint(nd->name()));
1809 return true;
1810 }
1811 }
1812 for (const auto &cnd : nd->getConcepts())
1813 {
1814 //printf("candidate %s isLinkableInProject()=%d\n",qPrint(cnd->name()),cnd->isLinkableInProject());
1815 if (cnd->isLinkableInProject())
1816 {
1817 //printf("<namespaceHasNestedConcept(%s): case2\n",qPrint(nd->name()));
1818 return true;
1819 }
1820 }
1821 //printf("<namespaceHasNestedConcept(%s): case3\n",qPrint(nd->name()));
1822 return false;
1823}
1824
1826{
1827 //printf(">namespaceHasNestedClass(%s,filterClasses=%d)\n",qPrint(nd->name()),filterClasses);
1828 for (const auto &cnd : nd->getNamespaces())
1829 {
1830 if (namespaceHasNestedClass(cnd,filterClasses,ct))
1831 {
1832 //printf("<namespaceHasNestedClass(%s,filterClasses=%d): case1\n",qPrint(nd->name()),filterClasses);
1833 return true;
1834 }
1835 }
1836
1837 ClassLinkedRefMap list = nd->getClasses();
1838 if (filterClasses)
1839 {
1840 switch (ct)
1841 {
1843 list = nd->getInterfaces();
1844 break;
1845 case ClassDef::Struct:
1846 list = nd->getStructs();
1847 break;
1849 list = nd->getExceptions();
1850 break;
1851 default:
1852 break;
1853 }
1854 }
1855
1856 for (const auto &cd : list)
1857 {
1858 //printf("candidate %s isLinkableInProject()=%d\n",qPrint(cd->name()),cd->isLinkableInProject());
1859 if (cd->isLinkableInProject())
1860 {
1861 //printf("<namespaceHasNestedClass(%s,filterClasses=%d): case2\n",qPrint(nd->name()),filterClasses);
1862 return true;
1863 }
1864 }
1865 //printf("<namespaceHasNestedClass(%s,filterClasses=%d): case3\n",qPrint(nd->name()),filterClasses);
1866 return false;
1867}
1868
1869
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:76
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
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:115
static bool suppressDocWarnings
Definition doxygen.h:132
static MemberNameLinkedMap * functionNameLinkedMap
Definition doxygen.h:112
static NamespaceDefMutable * globalScope
Definition doxygen.h:121
static NamespaceAliasInfoMap namespaceAliasMap
Definition doxygen.h:113
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:1435
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:109
int numDocMembers() const
Definition memberlist.h:122
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:114
void writeDocumentation(OutputList &ol, const QCString &scopeName, const Definition *container, const QCString &title, bool showEnumValues=FALSE, bool showInline=FALSE) const
void setAnchors()
bool declVisible() const
Wrapper class for the MemberListType type.
Definition types.h:184
constexpr const char * toLabel() const
Definition types.h:240
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
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
void writeClassDeclarations(OutputList &ol, const QCString &title, const ClassLinkedRefMap &d)
void setFileNameLocal(const QCString &fn)
ClassLinkedRefMap getClasses() const override
NamespaceLinkedRefMap namespaces
MemberList * getMemberList(MemberListType lt) const override
void setFileName(const QCString &fn) override
void endMemberDocumentation(OutputList &ol)
const MemberLists & getMemberLists() const override
const MemberGroupList & getMemberGroups() const override
enum NamespaceDefImpl::@152056333015234071026257214045103374127312105332 m_type
void writeInlineClasses(OutputList &ol)
void writeBriefDescription(OutputList &ol)
~NamespaceDefImpl() override
void combineUsingRelations(NamespaceDefSet &visitedNamespace) override
ClassLinkedRefMap classes
int numDocMembers() const override
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
ClassLinkedRefMap structs
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
ClassLinkedRefMap interfaces
void addNamespaceAttributes(OutputList &ol)
ClassLinkedRefMap exceptions
void distributeMemberGroupDocumentation() override
const Definition * findInnerCompound(const QCString &name) const override
void writeNamespaceDeclarations(OutputList &ol, const QCString &title, bool isConstantGroup=false)
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 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: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
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 startMemberSections()
Definition outputlist.h:462
void startMemberList()
Definition outputlist.h:482
void endTextLink()
Definition outputlist.h:445
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 writeSummaryLink(const QCString &file, const QCString &anchor, const QCString &title, bool first)
Definition outputlist.h:615
void writeAnchor(const QCString &fileName, const QCString &name)
Definition outputlist.h:524
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 enableAll()
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 lineBreak(const QCString &style=QCString())
Definition outputlist.h:560
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
void endMemberSections()
Definition outputlist.h:464
This is an alternative implementation of QCString.
Definition qcstring.h:101
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:226
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:578
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
const std::string & str() const
Definition qcstring.h:537
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition qcstring.cpp:91
QCString left(size_t len) const
Definition qcstring.h:214
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)
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()
static void combineUsingRelations()
Definition doxygen.cpp:9176
FileDef * toFileDef(Definition *d)
Definition filedef.cpp:1894
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
@ 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:477
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
std::vector< RefItem * > RefItemVector
Definition reflist.h:133
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:1786
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:1798
Definition layout.h:102
QCString title(SrcLangExt lang) const
Definition layout.cpp:1779
std::string context
Definition doxygen.h:78
std::string alias
Definition doxygen.h:77
CodeSymbolType
Definition types.h:319
@ Enumeration
Definition types.h:395
@ EnumValue
Definition types.h:396
@ Dictionary
Definition types.h:406
@ Sequence
Definition types.h:405
@ Variable
Definition types.h:393
@ Property
Definition types.h:401
@ Typedef
Definition types.h:394
@ Function
Definition types.h:392
SrcLangExt
Language as given by extension.
Definition types.h:42
@ CSharp
Definition types.h:46
@ Fortran
Definition types.h:53
@ Python
Definition types.h:52
@ Slice
Definition types.h:59
QCString convertToHtml(const QCString &s, bool keepEntities)
Definition util.cpp:4403
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:5242
void addGroupListToTitle(OutputList &ol, const Definition *d)
Definition util.cpp:5329
bool found
Definition util.cpp:984
QCString removeAnonymousScopes(const QCString &str)
Definition util.cpp:172
void createSubDirs(const Dir &d)
Definition util.cpp:4080
QCString stripScope(const QCString &name)
Definition util.cpp:4219
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3944
QCString convertToXML(const QCString &s, bool keepEntities)
Definition util.cpp:4352
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
Definition util.cpp:6326
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5339
A bunch of utility functions.