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 setFileName(const QCString &fn) override;
104 bool subGrouping() const override { return m_subGrouping; }
105 MemberList *getMemberList(MemberListType lt) const override;
106 const MemberLists &getMemberLists() const override { return m_memberLists; }
107 const MemberDef *getMemberByName(const QCString &) const override;
108 const MemberGroupList &getMemberGroups() const override { return m_memberGroups; }
109 ClassLinkedRefMap getClasses() const override { return m_classes; }
110 ClassLinkedRefMap getInterfaces() const override { return m_interfaces; }
111 ClassLinkedRefMap getStructs() const override { return m_structs; }
112 ClassLinkedRefMap getExceptions() const override { return m_exceptions; }
114 ConceptLinkedRefMap getConcepts() const override { return m_concepts; }
115 void setName(const QCString &name) override;
116
117 QCString title() const override;
118 QCString compoundTypeString() const override;
119
120 void setMetaData(const QCString &m) override;
121 int countVisibleMembers() const override;
122 void writeSummaryLinks(OutputList &ol) const override;
123 void writePageNavigation(OutputList &ol) const override;
124
125 private:
134 void writeConcepts(OutputList &ol,const QCString &title);
143 void setFileNameLocal(const QCString &fn);
144
146 bool isConstantGroup=false);
147 void updateLocalName();
148
151
155
165 bool m_subGrouping = false;
167 bool m_isPublished = false;
169 bool m_inline = false;
170};
171
172std::unique_ptr<NamespaceDef> createNamespaceDef(const QCString &defFileName,int defLine,int defColumn,
173 const QCString &name,const QCString &ref,
174 const QCString &refFile,const QCString &type,
175 bool isPublished)
176{
177 //printf("createNamespaceDef(%s)\n",qPrint(name));
178 return std::make_unique<NamespaceDefImpl>(defFileName,defLine,defColumn,name,ref,refFile,type,isPublished);
179}
180
181//------------------------------------------------------------------
182
183class NamespaceDefAliasImpl : public DefinitionAliasMixin<NamespaceDef>
184{
185 public:
187 : DefinitionAliasMixin(newScope,nd) { init(); }
190
191 DefType definitionType() const override { return TypeNamespace; }
192
193 const NamespaceDef *getNSAlias() const { return toNamespaceDef(getAlias()); }
194
195 // ---- getters
197 { return getNSAlias()->codeSymbolType(); }
199 { return getNSAlias()->getOutputFileBase(); }
200 QCString anchor() const override
201 { return getNSAlias()->anchor(); }
202 int numDocMembers() const override
203 { return getNSAlias()->numDocMembers(); }
205 { return getNSAlias()->getUsedNamespaces(); }
208 QCString displayName(bool b=TRUE) const override
209 { return makeDisplayName(this,b); }
210 const QCString &localName() const override
211 { return getNSAlias()->localName(); }
212 bool isConstantGroup() const override
213 { return getNSAlias()->isConstantGroup(); }
214 bool isModule() const override
215 { return getNSAlias()->isModule(); }
216 bool isLibrary() const override
217 { return getNSAlias()->isLibrary(); }
218 bool isInline() const override
219 { return getNSAlias()->isInline(); }
220 bool isLinkableInProject() const override
221 { return getNSAlias()->isLinkableInProject(); }
222 bool isLinkable() const override
223 { return getNSAlias()->isLinkable(); }
224 bool isVisibleInHierarchy() const override
225 { return getNSAlias()->isVisibleInHierarchy(); }
226 bool hasDetailedDescription() const override
227 { return getNSAlias()->hasDetailedDescription(); }
228 const Definition *findInnerCompound(const QCString &name) const override
229 { return getNSAlias()->findInnerCompound(name); }
230 bool subGrouping() const override
231 { return getNSAlias()->subGrouping(); }
233 { return getNSAlias()->getMemberList(lt); }
234 const MemberLists &getMemberLists() const override
235 { return getNSAlias()->getMemberLists(); }
236 const MemberDef *getMemberByName(const QCString &name) const override
237 { return getNSAlias()->getMemberByName(name); }
238 const MemberGroupList &getMemberGroups() const override
239 { return getNSAlias()->getMemberGroups(); }
241 { return getNSAlias()->getClasses(); }
243 { return getNSAlias()->getInterfaces(); }
245 { return getNSAlias()->getStructs(); }
247 { return getNSAlias()->getExceptions(); }
249 { return getNSAlias()->getNamespaces(); }
251 { return getNSAlias()->getConcepts(); }
252 QCString title() const override
253 { return getNSAlias()->title(); }
255 { return getNSAlias()->compoundTypeString(); }
256 int countVisibleMembers() const override
257 { return getNSAlias()->countVisibleMembers(); }
258};
259
260std::unique_ptr<NamespaceDef> createNamespaceDefAlias(const Definition *newScope,const NamespaceDef *nd)
261{
262 auto alnd = std::make_unique<NamespaceDefAliasImpl>(newScope,nd);
263 //printf("alnd name=%s localName=%s qualifiedName=%s displayName()=%s\n",
264 // qPrint(alnd->name()),qPrint(alnd->localName()),qPrint(alnd->qualifiedName()),
265 // qPrint(alnd->displayName()));
266 return alnd;
267}
268
269//------------------------------------------------------------------
270
272 const QCString &name,const QCString &lref,
273 const QCString &fName, const QCString &type,
274 bool isPublished) :
275 DefinitionMixin(df,dl,dc,name)
276 ,m_isPublished(isPublished)
277{
278 if (!fName.isEmpty())
279 {
280 if (!lref.isEmpty())
281 {
282 fileName = stripExtension(fName);
283 }
284 else
285 {
286 fileName = convertNameToFile(stripExtension(fName));
287 }
288 }
289 else
290 {
291 setFileNameLocal(name);
292 }
293 setReference(lref);
294 m_inline=FALSE;
295 m_subGrouping=Config_getBool(SUBGROUPING);
296 if (type=="module")
297 {
298 m_type = MODULE;
299 }
300 else if (type=="constants")
301 {
302 m_type = CONSTANT_GROUP;
303 }
304 else if (type=="library")
305 {
306 m_type = LIBRARY;
307 }
308 else
309 {
310 m_type = NAMESPACE;
311 }
312
313 updateLocalName();
314}
315
317{
318 QCString locName=name();
319 int i=locName.findRev("::");
320 if (i!=-1)
321 {
322 locName=locName.mid(i+2);
323 }
324 setLocalName(locName);
325}
326
332
336
338{
339 if (isReference())
340 {
341 fileName = "namespace"+fn;
342 }
343 else
344 {
345 fileName = convertNameToFile("namespace"+fn);
346 }
347}
348
350{
352}
353
355{
356 for (const auto &mg : m_memberGroups)
357 {
358 mg->distributeMemberGroupDocumentation();
359 }
360}
361
363{
367 for (const auto &mg : m_memberGroups)
368 {
369 mg->findSectionsInDocumentation(this);
370 }
371 for (auto &ml : m_memberLists)
372 {
373 if (ml->listType().isDeclaration())
374 {
375 ml->findSectionsInDocumentation(this);
376 }
377 }
378}
379
381{
382 if (fd==nullptr) return;
383 auto it = std::find(files.begin(),files.end(),fd);
384 if (it==files.end())
385 {
386 files.push_back(fd);
387 }
388}
389
391{
392 //printf("%s:NamespaceDefImpl::addInnerCompound(%s)\n",qPrint(name()),qPrint(d->name()));
393 m_innerCompounds.add(d->localName(),d);
395 {
397 }
399 {
401 }
403 {
405 }
406}
407
409{
411
412 if (Config_getBool(OPTIMIZE_OUTPUT_SLICE))
413 {
415 {
416 d = &m_interfaces;
417 }
418 else if (cd->compoundType()==ClassDef::Struct)
419 {
420 d = &m_structs;
421 }
422 else if (cd->compoundType()==ClassDef::Exception)
423 {
424 d = &m_exceptions;
425 }
426 }
427
428 d->add(cd->name(),cd);
429}
430
432{
433 m_concepts.add(cd->name(),cd);
434}
435
440
441
443{
444 for (auto &ml : m_memberLists)
445 {
446 if (ml->listType().isDeclaration())
447 {
449 }
450 }
451
452 // add members inside sections to their groups
453 for (const auto &mg : m_memberGroups)
454 {
455 if (mg->allMembersInSameSection() && m_subGrouping)
456 {
457 //printf("----> addToDeclarationSection(%s)\n",qPrint(mg->header()));
458 mg->addToDeclarationSection();
459 }
460 }
461}
462
464{
465 //printf("%s::insertMember(%s) isInline=%d hasDocs=%d\n",qPrint(name()),qPrint(md->name()),
466 // isInline(),hasDocumentation());
467 if (md->isHidden()) return;
469
470 // if this is an inline namespace that is not documented, then insert the
471 // member in the parent scope instead
472 if (isInline() && !hasDocumentation())
473 {
474 Definition *outerScope = getOuterScope();
475 if (outerScope)
476 {
477 if (outerScope->definitionType()==Definition::TypeNamespace)
478 {
480 if (nd && nd!=Doxygen::globalScope)
481 {
482 nd->insertMember(md);
483 if (mdm)
484 {
485 mdm->setNamespace(nd);
486 }
487 }
488 }
489 else if (outerScope->definitionType()==Definition::TypeFile)
490 {
491 FileDef *fd = toFileDef(outerScope);
492 fd->insertMember(md);
493 if (mdm)
494 {
495 mdm->setFileDef(fd);
496 mdm->setOuterScope(fd);
497 }
498 }
499 }
500 }
501 else // member is a non-inline namespace or a documented inline namespace
502 {
503 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
504 if (allMemberList==nullptr)
505 {
506 m_memberLists.emplace_back(std::make_unique<MemberList>(MemberListType::AllMembersList(),MemberListContainer::Namespace));
507 allMemberList = m_memberLists.back().get();
508 }
509 allMemberList->push_back(md);
510 //printf("%s::m_allMembersDict->append(%s)\n",qPrint(name()),qPrint(md->localName()));
511 m_allMembers.add(md->localName(),md);
512 switch(md->memberType())
513 {
515 addMemberToList(MemberListType::DecVarMembers(),md);
516 addMemberToList(MemberListType::DocVarMembers(),md);
517 break;
519 addMemberToList(MemberListType::DecFuncMembers(),md);
520 addMemberToList(MemberListType::DocFuncMembers(),md);
521 break;
523 addMemberToList(MemberListType::DecTypedefMembers(),md);
524 addMemberToList(MemberListType::DocTypedefMembers(),md);
525 break;
527 addMemberToList(MemberListType::DecSequenceMembers(),md);
528 addMemberToList(MemberListType::DocSequenceMembers(),md);
529 break;
531 addMemberToList(MemberListType::DecDictionaryMembers(),md);
532 addMemberToList(MemberListType::DocDictionaryMembers(),md);
533 break;
535 addMemberToList(MemberListType::DecEnumMembers(),md);
536 addMemberToList(MemberListType::DocEnumMembers(),md);
537 break;
539 break;
541 addMemberToList(MemberListType::DecDefineMembers(),md);
542 addMemberToList(MemberListType::DocDefineMembers(),md);
543 break;
545 if (md->getLanguage() == SrcLangExt::Python)
546 {
547 addMemberToList(MemberListType::PropertyMembers(),md);
548 addMemberToList(MemberListType::Properties(),md);
549 break;
550 }
551 // fallthrough, explicitly no break here
552 default:
553 err("NamespaceDefImpl::insertMembers(): "
554 "member '{}' with unexpected type '{}' and class scope '{}' inserted in namespace scope '{}'!\n",
555 md->name(), md->memberTypeName(), md->getClassDef() ? md->getClassDef()->name() : "", name());
556 }
557 // if this is an inline namespace, then insert an alias of this member in the outer scope.
558 if (isInline())
559 {
560 Definition *outerScope = getOuterScope();
561 if (outerScope)
562 {
563 std::unique_ptr<MemberDef> aliasMd = createMemberDefAlias(outerScope,md);
564 if (outerScope->definitionType()==Definition::TypeNamespace)
565 {
567 if (ndm)
568 {
569 ndm->insertMember(aliasMd.get());
570 }
571 }
572 else if (outerScope->definitionType()==Definition::TypeFile)
573 {
574 toFileDef(outerScope)->insertMember(aliasMd.get());
575 }
576 if (aliasMd)
577 {
578 QCString name = md->name();
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 }
729 ol.endTextBlock();
730 }
731}
732
734{
736 {
737 auto parser { createDocParser() };
738 auto ast { validatingParseDoc(*parser.get(),
739 briefFile(),
740 briefLine(),
741 this,
742 nullptr,
744 DocOptions()
745 .setIndexWords(true)
746 .setSingleLine(true))
747 };
748 if (!ast->isEmpty())
749 {
750 ol.startParagraph();
753 ol.writeString(" - ");
755 ol.writeDoc(ast.get(),this,nullptr);
758 ol.writeString(" \n");
760
762 {
764 ol.startTextLink(getOutputFileBase(),"details");
765 ol.parseText(theTranslator->trMore());
766 ol.endTextLink();
767 }
769 ol.endParagraph();
770 }
771 }
772
773 // Write a summary of the Slice definition including metadata.
774 if (getLanguage() == SrcLangExt::Slice)
775 {
776 ol.startParagraph();
777 ol.startTypewriter();
778 if (!metaData.isEmpty())
779 {
780 ol.docify(metaData);
781 ol.lineBreak();
782 }
783 ol.docify("module ");
784 ol.docify(stripScope(name()));
785 ol.docify(" { ... }");
786 ol.endTypewriter();
787 ol.endParagraph();
788 }
789
790 ol.writeSynopsis();
791}
792
797
802
804{
805 if (Config_getBool(SEPARATE_MEMBER_PAGES))
806 {
809 }
810}
811
813{
814 if (Config_getBool(SEPARATE_MEMBER_PAGES))
815 {
818 }
819}
820
825
827{
828 m_concepts.writeDeclaration(ol,title,TRUE);
829}
830
832{
833 m_classes.writeDocumentation(ol,this);
834}
835
841
843{
844 /* write user defined member groups */
845 for (const auto &mg : m_memberGroups)
846 {
847 if (!mg->allMembersInSameSection() || !m_subGrouping)
848 {
849 mg->writeDeclarations(ol,nullptr,this,nullptr,nullptr,nullptr);
850 }
851 }
852}
853
855{
856 // write Author section (Man only)
859 ol.startGroupHeader();
860 ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
861 ol.endGroupHeader();
862 ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString(PROJECT_NAME)));
864}
865
867{
870 bool first=TRUE;
871 SrcLangExt lang = getLanguage();
872 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
873 {
874 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
875 if (lde->kind()==LayoutDocEntry::NamespaceClasses && m_classes.declVisible() && ls)
876 {
877 QCString label = "nested-classes";
878 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
879 first=FALSE;
880 }
881 else if (lde->kind()==LayoutDocEntry::NamespaceInterfaces && m_interfaces.declVisible() && ls)
882 {
883 QCString label = "interfaces";
884 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
885 first=FALSE;
886 }
887 else if (lde->kind()==LayoutDocEntry::NamespaceStructs && m_structs.declVisible() && ls)
888 {
889 QCString label = "structs";
890 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
891 first=FALSE;
892 }
893 else if (lde->kind()==LayoutDocEntry::NamespaceExceptions && m_exceptions.declVisible() && ls)
894 {
895 QCString label = "exceptions";
896 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
897 first=FALSE;
898 }
899 else if (lde->kind()==LayoutDocEntry::NamespaceNestedNamespaces && m_namespaces.declVisible(false) && ls)
900 {
901 QCString label = "namespaces";
902 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
903 first=FALSE;
904 }
905 else if (lde->kind()==LayoutDocEntry::NamespaceNestedConstantGroups && m_namespaces.declVisible(true) && ls)
906 {
907 QCString label = "constantgroups";
908 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
909 first=FALSE;
910 }
911 else if (lde->kind()==LayoutDocEntry::NamespaceConcepts && m_concepts.declVisible() && ls)
912 {
913 QCString label = "concepts";
914 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
915 first=FALSE;
916 }
917 else if (lde->kind()== LayoutDocEntry::MemberDecl)
918 {
919 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
920 if (lmd)
921 {
922 MemberList * ml = getMemberList(lmd->type);
923 if (ml && ml->declVisible())
924 {
925 ol.writeSummaryLink(QCString(),ml->listType().toLabel(),lmd->title(lang),first);
926 first=FALSE;
927 }
928 }
929 }
930 }
931 if (!first)
932 {
933 ol.writeString(" </div>\n");
934 }
936}
937
942
944{
945 // UNO IDL constant groups may be published
946 if (getLanguage()==SrcLangExt::IDL && isConstantGroup() && m_isPublished)
947 {
950 ol.startLabels();
951 ol.writeLabel("published",false);
952 ol.endLabels();
954 }
955 else if (isExported())
956 {
959 ol.startLabels();
960 ol.writeLabel("export",false);
961 ol.endLabels();
963 }
964}
965
967{
968 for (const auto &cd : list)
969 {
970 if (cd->isLinkableInProject())
971 {
972 tagFile << " <class kind=\"" << cd->compoundTypeString()
973 << "\">" << convertToXML(cd->name()) << "</class>\n";
974 }
975 }
976}
977
979{
980 for (const auto &cd : m_concepts)
981 {
982 if (cd->isLinkableInProject())
983 {
984 tagFile << " <concept>" << convertToXML(cd->name()) << "</concept>\n";
985 }
986 }
987}
988
990{
991 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
992 //bool outputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
993 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
994
995 QCString pageTitle = title();
996 startFile(ol,getOutputFileBase(),false,name(),pageTitle,HighlightedItem::NamespaceVisible,!generateTreeView);
997
998 if (!generateTreeView)
999 {
1001 {
1003 }
1004 ol.endQuickIndices();
1005 }
1006
1007 startTitle(ol,getOutputFileBase(),this);
1008 ol.parseText(pageTitle);
1009 addGroupListToTitle(ol,this);
1012 ol.startContents();
1013
1014 //---------------------------------------- start flexible part -------------------------------
1015
1016 SrcLangExt lang = getLanguage();
1017 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1018 {
1019 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
1020 switch (lde->kind())
1021 {
1022 case LayoutDocEntry::BriefDesc:
1024 break;
1025 case LayoutDocEntry::MemberDeclStart:
1027 break;
1028 case LayoutDocEntry::NamespaceClasses:
1029 {
1030 if (ls) writeClassDeclarations(ol,ls->title(lang),m_classes);
1031 }
1032 break;
1033 case LayoutDocEntry::NamespaceInterfaces:
1034 {
1035 if (ls) writeClassDeclarations(ol,ls->title(lang),m_interfaces);
1036 }
1037 break;
1038 case LayoutDocEntry::NamespaceStructs:
1039 {
1040 if (ls) writeClassDeclarations(ol,ls->title(lang),m_structs);
1041 }
1042 break;
1043 case LayoutDocEntry::NamespaceExceptions:
1044 {
1045 if (ls) writeClassDeclarations(ol,ls->title(lang),m_exceptions);
1046 }
1047 break;
1048 case LayoutDocEntry::NamespaceConcepts:
1049 {
1050 if (ls) writeConcepts(ol,ls->title(lang));
1051 }
1052 break;
1053 case LayoutDocEntry::NamespaceNestedNamespaces:
1054 {
1055 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),false);
1056 }
1057 break;
1058 case LayoutDocEntry::NamespaceNestedConstantGroups:
1059 {
1060 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),true);
1061 }
1062 break;
1063 case LayoutDocEntry::MemberGroups:
1065 break;
1066 case LayoutDocEntry::MemberDecl:
1067 {
1068 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1069 if (lmd) writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
1070 }
1071 break;
1072 case LayoutDocEntry::MemberDeclEnd:
1074 break;
1075 case LayoutDocEntry::DetailedDesc:
1076 {
1077 if (ls) writeDetailedDescription(ol,ls->title(lang));
1078 }
1079 break;
1080 case LayoutDocEntry::MemberDefStart:
1082 break;
1083 case LayoutDocEntry::NamespaceInlineClasses:
1085 break;
1086 case LayoutDocEntry::MemberDef:
1087 {
1088 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1089 if (lmd) writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
1090 }
1091 break;
1092 case LayoutDocEntry::MemberDefEnd:
1094 break;
1095 case LayoutDocEntry::AuthorSection:
1097 break;
1098 case LayoutDocEntry::ClassIncludes:
1099 case LayoutDocEntry::ClassInheritanceGraph:
1100 case LayoutDocEntry::ClassNestedClasses:
1101 case LayoutDocEntry::ClassCollaborationGraph:
1102 case LayoutDocEntry::ClassAllMembersLink:
1103 case LayoutDocEntry::ClassUsedFiles:
1104 case LayoutDocEntry::ClassInlineClasses:
1105 case LayoutDocEntry::ConceptDefinition:
1106 case LayoutDocEntry::FileClasses:
1107 case LayoutDocEntry::FileConcepts:
1108 case LayoutDocEntry::FileInterfaces:
1109 case LayoutDocEntry::FileStructs:
1110 case LayoutDocEntry::FileExceptions:
1111 case LayoutDocEntry::FileNamespaces:
1112 case LayoutDocEntry::FileConstantGroups:
1113 case LayoutDocEntry::FileIncludes:
1114 case LayoutDocEntry::FileIncludeGraph:
1115 case LayoutDocEntry::FileIncludedByGraph:
1116 case LayoutDocEntry::FileSourceLink:
1117 case LayoutDocEntry::FileInlineClasses:
1118 case LayoutDocEntry::GroupClasses:
1119 case LayoutDocEntry::GroupConcepts:
1120 case LayoutDocEntry::GroupModules:
1121 case LayoutDocEntry::GroupInlineClasses:
1122 case LayoutDocEntry::GroupNamespaces:
1123 case LayoutDocEntry::GroupDirs:
1124 case LayoutDocEntry::GroupNestedGroups:
1125 case LayoutDocEntry::GroupFiles:
1126 case LayoutDocEntry::GroupGraph:
1127 case LayoutDocEntry::GroupPageDocs:
1128 case LayoutDocEntry::ModuleExports:
1129 case LayoutDocEntry::ModuleClasses:
1130 case LayoutDocEntry::ModuleConcepts:
1131 case LayoutDocEntry::ModuleUsedFiles:
1132 case LayoutDocEntry::DirSubDirs:
1133 case LayoutDocEntry::DirFiles:
1134 case LayoutDocEntry::DirGraph:
1135 err("Internal inconsistency: member '{}' should not be part of "
1136 "LayoutDocManager::Namespace entry list\n",lde->entryToString());
1137 break;
1138 }
1139 }
1140
1141 //---------------------------------------- end flexible part -------------------------------
1142
1143 ol.endContents();
1144
1145 endFileWithNavPath(ol,this);
1146
1147 if (Config_getBool(SEPARATE_MEMBER_PAGES))
1148 {
1149 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1150 if (allMemberList) allMemberList->sort();
1151 writeMemberPages(ol);
1152 }
1153}
1154
1156{
1157 ol.pushGeneratorState();
1159
1160 for (const auto &ml : m_memberLists)
1161 {
1162 if (ml->listType().isDocumentation())
1163 {
1164 ml->writeDocumentationPage(ol,displayName(),this);
1165 }
1166 }
1167 ol.popGeneratorState();
1168}
1169
1171{
1172 bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
1173
1174 ol.writeString(" <div class=\"navtab\">\n");
1175 ol.writeString(" <table>\n");
1176
1177 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1178 if (allMemberList)
1179 {
1180 for (const auto &md : *allMemberList)
1181 {
1182 if (md->getNamespaceDef()==this && md->isLinkable() && !md->isEnumValue())
1183 {
1184 if (md->isLinkableInProject())
1185 {
1186 QCString fn = md->getOutputFileBase();
1188 if (md==currentMd) // selected item => highlight
1189 {
1190 ol.writeString(" <tr><td class=\"navtabHL\">");
1191 }
1192 else
1193 {
1194 ol.writeString(" <tr><td class=\"navtab\">");
1195 }
1196 ol.writeString("<span class=\"label\"><a ");
1197 ol.writeString("href=\"");
1198 if (createSubDirs) ol.writeString("../../");
1199 ol.writeString(fn+"#"+md->anchor());
1200 ol.writeString("\">");
1201 ol.writeString(convertToHtml(md->localName()));
1202 ol.writeString("</a></span>");
1203 ol.writeString("</td></tr>\n");
1204 }
1205 }
1206 }
1207 }
1208
1209 ol.writeString(" </table>\n");
1210 ol.writeString(" </div>\n");
1211}
1212
1214{
1215 for (auto &ml : m_memberLists)
1216 {
1217 ml->countDecMembers();
1218 ml->countDocMembers();
1219 }
1220 for (const auto &mg : m_memberGroups)
1221 {
1222 mg->countDecMembers();
1223 mg->countDocMembers();
1224 }
1225}
1226
1228{
1229 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1230 return (allMemberList ? allMemberList->numDocMembers() : 0) + static_cast<int>(m_innerCompounds.size());
1231}
1232
1234{
1235 m_usingDirList.add(nd->qualifiedName(),nd);
1236 //printf("%s: NamespaceDefImpl::addUsingDirective: %s:%zu\n",qPrint(name()),qPrint(nd->qualifiedName()),m_usingDirList.size());
1237}
1238
1243
1248
1250{
1251 if (n==nullptr) return nullptr;
1252 const Definition *d = m_innerCompounds.find(n);
1253 if (d==nullptr)
1254 {
1255 if (!m_usingDirList.empty())
1256 {
1257 d = m_usingDirList.find(n);
1258 }
1259 if (d==nullptr && !m_usingDeclList.empty())
1260 {
1261 d = m_usingDeclList.find(n);
1262 }
1263 }
1264 return d;
1265}
1266
1268{
1269 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
1270 {
1271 const RefItemVector &xrefItems = xrefListItems();
1272 addRefItem(xrefItems,
1273 qualifiedName(),
1274 getLanguage()==SrcLangExt::Fortran ?
1275 theTranslator->trModule(TRUE,TRUE) :
1276 theTranslator->trNamespace(TRUE,TRUE),
1278 QCString(),
1279 this
1280 );
1281 }
1282 for (const auto &mg : m_memberGroups)
1283 {
1284 mg->addListReferences(this);
1285 }
1286 for (auto &ml : m_memberLists)
1287 {
1288 if (ml->listType().isDocumentation())
1289 {
1290 ml->addListReferences(this);
1291 }
1292 }
1293}
1294
1296{
1297 return makeDisplayName(this,includeScope);
1298}
1299
1301{
1302 if (visitedNamespaces.find(this)!=visitedNamespaces.end()) return; // already processed
1303 visitedNamespaces.insert(this);
1304
1306 for (auto &nd : usingDirList)
1307 {
1309 if (ndm)
1310 {
1311 ndm->combineUsingRelations(visitedNamespaces);
1312 }
1313 }
1314
1315 for (auto &nd : usingDirList)
1316 {
1317 // add used namespaces of namespace nd to this namespace
1318 for (const auto &und : nd->getUsedNamespaces())
1319 {
1320 addUsingDirective(und);
1321 }
1322 // add used classes of namespace nd to this namespace
1323 for (const auto &ud : nd->getUsedDefinitions())
1324 {
1326 }
1327 }
1328}
1329
1331{
1332 int count=0;
1333 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1334 {
1335 if (lde->kind()==LayoutDocEntry::MemberDef)
1336 {
1337 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1338 if (lmd)
1339 {
1340 MemberList *ml = getMemberList(lmd->type);
1341 if (ml)
1342 {
1343 for (const auto &md : *ml)
1344 {
1345 if (md->visibleInIndex())
1346 {
1347 count++;
1348 }
1349 }
1350 }
1351 }
1352 }
1353 }
1354 return count;
1355}
1356
1357
1358
1359//-------------------------------------------------------------------------------
1360
1361bool NamespaceLinkedRefMap::declVisible(bool isConstantGroup) const
1362{
1363 bool found=false;
1364 for (const auto &nd : *this)
1365 {
1366 if (nd->isLinkable() && nd->hasDocumentation())
1367 {
1368 SrcLangExt lang = nd->getLanguage();
1369 if (SrcLangExt::IDL==lang)
1370 {
1371 if (isConstantGroup == nd->isConstantGroup())
1372 {
1373 found=true;
1374 break;
1375 }
1376 }
1377 else if (!isConstantGroup) // ensure we only get extra section in IDL
1378 {
1379 if (nd->isConstantGroup())
1380 {
1381 err("Internal inconsistency: constant group but not IDL?\n");
1382 }
1383 found=true;
1384 break;
1385 }
1386 }
1387 }
1388 return found;
1389}
1390
1392 bool const isConstantGroup,bool localName)
1393{
1394
1395
1396 if (empty()) return; // no namespaces in the list
1397
1398 if (Config_getBool(OPTIMIZE_OUTPUT_VHDL)) return;
1399
1400 if (!declVisible(isConstantGroup)) return;
1401
1402 // write list of namespaces
1403 ol.startMemberHeader(isConstantGroup ? "constantgroups" : "namespaces");
1404 //bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
1405 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
1406 ol.parseText(title);
1407 ol.endMemberHeader();
1408 ol.startMemberList();
1409 for (const auto &nd : *this)
1410 {
1411 if (nd->isLinkable() && nd->hasDocumentation())
1412 {
1413 SrcLangExt lang = nd->getLanguage();
1414 if (lang==SrcLangExt::IDL && (isConstantGroup != nd->isConstantGroup()))
1415 continue; // will be output in another pass, see layout_default.xml
1417 QCString name = localName ? nd->localName() : nd->displayName();
1418 QCString anc = nd->anchor();
1419 if (anc.isEmpty()) anc=name; else anc.prepend(name+"_");
1421 QCString ct = nd->compoundTypeString();
1422 ol.docify(ct);
1423 ol.docify(" ");
1424 ol.insertMemberAlign();
1425 ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),QCString(),name);
1427 if (!nd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
1428 {
1429 ol.startMemberDescription(nd->getOutputFileBase());
1430 ol.generateDoc(nd->briefFile(),
1431 nd->briefLine(),
1432 nd,
1433 nullptr,
1434 nd->briefDescription(),
1435 DocOptions()
1436 .setSingleLine(true));
1438 }
1440 }
1441 }
1442 ol.endMemberList();
1443}
1444
1445//-------------------------------------------------------------------------------
1446
1448{
1449 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
1450 bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
1451 const auto &ml = m_memberLists.get(lt,MemberListContainer::Namespace);
1452 ml->setNeedsSorting(
1453 (ml->listType().isDeclaration() && sortBriefDocs) ||
1454 (ml->listType().isDocumentation() && sortMemberDocs));
1455 ml->push_back(md);
1456
1457 if (ml->listType().isDeclaration())
1458 {
1460 if (mdm)
1461 {
1462 mdm->setSectionList(this,ml.get());
1463 }
1464 }
1465}
1466
1468{
1469 for (auto &ml : m_memberLists)
1470 {
1471 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
1472 }
1473
1474 if (Config_getBool(SORT_BRIEF_DOCS))
1475 {
1476 auto classComp = [](const ClassLinkedRefMap::Ptr &c1,const ClassLinkedRefMap::Ptr &c2)
1477 {
1478 return Config_getBool(SORT_BY_SCOPE_NAME) ?
1479 qstricmp_sort(c1->name(), c2->name())<0 :
1480 qstricmp_sort(c1->className(), c2->className())<0;
1481 };
1482
1483 std::stable_sort(m_classes.begin(), m_classes.end(), classComp);
1484 std::stable_sort(m_interfaces.begin(),m_interfaces.end(),classComp);
1485 std::stable_sort(m_structs.begin(), m_structs.end(), classComp);
1486 std::stable_sort(m_exceptions.begin(),m_exceptions.end(),classComp);
1487
1488 auto conceptComp = [](const ConceptLinkedRefMap::Ptr &c1,const ConceptLinkedRefMap::Ptr &c2)
1489 {
1490 return qstricmp_sort(c1->name(),c2->name())<0;
1491 };
1492
1493 std::stable_sort(m_concepts.begin(), m_concepts.end(), conceptComp);
1494
1495 auto namespaceComp = [](const NamespaceLinkedRefMap::Ptr &n1,const NamespaceLinkedRefMap::Ptr &n2)
1496 {
1497 return qstricmp_sort(n1->name(),n2->name())<0;
1498 };
1499
1500 std::stable_sort(m_namespaces.begin(),m_namespaces.end(),namespaceComp);
1501 }
1502
1503}
1504
1506{
1507 for (auto &ml : m_memberLists)
1508 {
1509 if (ml->listType()==lt)
1510 {
1511 return ml.get();
1512 }
1513 }
1514 return nullptr;
1515}
1516
1518{
1519 MemberList * ml = getMemberList(lt);
1520 if (ml) ml->writeDeclarations(ol,nullptr,this,nullptr,nullptr,nullptr,title,QCString());
1521}
1522
1528
1529static bool hasNonReferenceNestedNamespaceRec(const NamespaceDef *nd,int level)
1530{
1531 if (level>30)
1532 {
1533 err("Possible recursive namespace relation while inside {}\n",nd->name());
1534 return false;
1535 }
1536 bool found=nd->isLinkableInProject();
1537 if (found)
1538 {
1539 return true;
1540 }
1541 else
1542 {
1543 for (const auto &ind : nd->getNamespaces())
1544 {
1545 found = found || hasNonReferenceNestedNamespaceRec(ind,level+1);
1546 if (found) break;
1547 }
1548 }
1549 return found;
1550}
1551
1553{
1554 bool allExternals = Config_getBool(ALLEXTERNALS);
1555 return allExternals || hasNonReferenceNestedNamespaceRec(this,0) || isLinkable();
1556}
1557
1559{
1560 int i = name().findRev("::");
1561 if (i==-1) i=0; else i+=2;
1562 bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES);
1563 bool hideUndoc = Config_getBool(HIDE_UNDOC_NAMESPACES);
1564 if (extractAnonNs && // extract anonymous ns
1565 name().mid(i,20)=="anonymous_namespace{" // correct prefix
1566 ) // not disabled by config
1567 {
1568 return TRUE;
1569 }
1570 return !name().isEmpty() && name().at(i)!='@' && // not anonymous
1571 (hasDocumentation() || !hideUndoc || getLanguage()==SrcLangExt::CSharp) && // documented
1572 !isReference() && // not an external reference
1573 !isHidden() && // not hidden
1574 !isArtificial(); // or artificial
1575}
1576
1578{
1579 return isLinkableInProject() || isReference();
1580}
1581
1583{
1584 return m_allMembers.find(n);
1585}
1586
1588{
1589 QCString pageTitle;
1590 SrcLangExt lang = getLanguage();
1591
1592 auto getReferenceTitle = [this](std::function<QCString()> translateFunc) -> QCString
1593 {
1594 return Config_getBool(HIDE_COMPOUND_REFERENCE) ? displayName() : translateFunc();
1595 };
1596
1597 if (lang==SrcLangExt::Java)
1598 {
1599 pageTitle = theTranslator->trPackage(displayName());
1600 }
1601 else if (lang==SrcLangExt::Fortran || lang==SrcLangExt::Slice)
1602 {
1603 pageTitle = getReferenceTitle([this](){
1604 return theTranslator->trModuleReference(displayName());
1605 });
1606 }
1607 else if (lang==SrcLangExt::IDL)
1608 {
1609 pageTitle = getReferenceTitle([this](){
1610 return isConstantGroup()
1611 ? theTranslator->trConstantGroupReference(displayName())
1612 : theTranslator->trModuleReference(displayName());
1613 });
1614 }
1615 else
1616 {
1617 pageTitle = getReferenceTitle([this](){
1618 return theTranslator->trNamespaceReference(displayName());
1619 });
1620 }
1621 return pageTitle;
1622}
1623
1625{
1626 SrcLangExt lang = getLanguage();
1627 if (lang==SrcLangExt::Java)
1628 {
1629 return "package";
1630 }
1631 else if(lang==SrcLangExt::CSharp)
1632 {
1633 return "namespace";
1634 }
1635 else if (lang==SrcLangExt::Fortran)
1636 {
1637 return "module";
1638 }
1639 else if (lang==SrcLangExt::IDL)
1640 {
1641 if (isModule())
1642 {
1643 return "module";
1644 }
1645 else if (isConstantGroup())
1646 {
1647 return "constants";
1648 }
1649 else if (isLibrary())
1650 {
1651 return "library";
1652 }
1653 else
1654 {
1655 err_full(getDefFileName(),getDefLine(),"Internal inconsistency: namespace in IDL not module, library or constant group");
1656 }
1657 }
1658 return "namespace";
1659}
1660
1662{
1663 metaData = m;
1664}
1665
1666// --- Cast functions
1667//
1669{
1670 if (d && (typeid(*d)==typeid(NamespaceDefImpl) || typeid(*d)==typeid(NamespaceDefAliasImpl)))
1671 {
1672 return static_cast<NamespaceDef*>(d);
1673 }
1674 else
1675 {
1676 return nullptr;
1677 }
1678}
1679
1681{
1682 Definition *d = toDefinition(md);
1683 if (d && typeid(*d)==typeid(NamespaceDefImpl))
1684 {
1685 return static_cast<NamespaceDef*>(d);
1686 }
1687 else
1688 {
1689 return nullptr;
1690 }
1691}
1692
1693
1695{
1696 if (d && (typeid(*d)==typeid(NamespaceDefImpl) || typeid(*d)==typeid(NamespaceDefAliasImpl)))
1697 {
1698 return static_cast<const NamespaceDef*>(d);
1699 }
1700 else
1701 {
1702 return nullptr;
1703 }
1704}
1705
1707{
1708 if (d && typeid(*d)==typeid(NamespaceDefImpl))
1709 {
1710 return static_cast<NamespaceDefMutable*>(d);
1711 }
1712 else
1713 {
1714 return nullptr;
1715 }
1716}
1717
1718// --- Helpers
1719
1720static NamespaceDef *getResolvedNamespaceRec(StringSet &namespacesTried,const NamespaceAliasInfo &aliasInfo);
1721
1722static QCString replaceNamespaceAliasesRec(StringSet &namespacesTried,const QCString &name)
1723{
1724 QCString result = name;
1725 //printf("> replaceNamespaceAliasesRec(%s)\n",qPrint(name));
1726 if (namespacesTried.find(name.str())==namespacesTried.end())
1727 {
1728 namespacesTried.insert(name.str());
1729 size_t p = 0;
1730 for (;;)
1731 {
1732 size_t i = name.str().find("::",p);
1733 if (i==std::string::npos)
1734 {
1735 auto it = Doxygen::namespaceAliasMap.find(name.str());
1736 if (it != Doxygen::namespaceAliasMap.end())
1737 {
1738 //printf("found map %s->%s\n",qPrint(name),qPrint(it->second.alias));
1739 auto ns = getResolvedNamespaceRec(namespacesTried,it->second);
1740 if (ns)
1741 {
1742 result = replaceNamespaceAliasesRec(namespacesTried,ns->qualifiedName());
1743 }
1744 }
1745 break;
1746 }
1747 else
1748 {
1749 auto it = Doxygen::namespaceAliasMap.find(name.left(i).str());
1750 if (it != Doxygen::namespaceAliasMap.end())
1751 {
1752 //printf("found map %s|%s->%s\n",qPrint(name.left(i)),qPrint(name.mid(i)),qPrint(it->second.alias));
1753 auto ns = getResolvedNamespaceRec(namespacesTried,it->second);
1754 if (ns)
1755 {
1756 result = replaceNamespaceAliasesRec(namespacesTried,ns->qualifiedName()+name.mid(i));
1757 break;
1758 }
1759 }
1760 }
1761 p = i+2;
1762 }
1763 }
1764 //printf("< replaceNamespaceAliasesRec(%s)=%s\n",qPrint(name),qPrint(result));
1765 return result;
1766}
1767
1768static NamespaceDef *getResolvedNamespaceRec(StringSet &namespacesTried,const NamespaceAliasInfo &aliasInfo)
1769{
1770 size_t j = aliasInfo.context.length();
1771 for (;;)
1772 {
1773 if (j>0)
1774 {
1775 //printf("candidate %s|::%s\n",qPrint(aliasInfo.context.substr(0,j)),qPrint(aliasInfo.alias));
1776 auto candidate = replaceNamespaceAliasesRec(namespacesTried,aliasInfo.context.substr(0,j)+"::"+aliasInfo.alias);
1777 auto nd = Doxygen::namespaceLinkedMap->find(candidate);
1778 if (nd)
1779 {
1780 return nd;
1781 }
1782 }
1783 if (j>0) // strip one level from context, i.e. given N1::N2::N3
1784 // j==10 -> j==6 (N1::N2::N3->N1::N2), and then
1785 // j==6 -> j==2 (N1::N2->N1), and then
1786 // j==2 -> j==std::string::npos (N1->"")
1787 {
1788 j = aliasInfo.context.rfind("::",j-1);
1789 }
1790 else
1791 {
1792 j = std::string::npos;
1793 }
1794 if (j==std::string::npos)
1795 {
1796 //printf("candidate %s\n",qPrint(aliasInfo.alias));
1797 auto candidate = replaceNamespaceAliasesRec(namespacesTried,aliasInfo.alias);
1798 auto nd = Doxygen::namespaceLinkedMap->find(candidate);
1799 if (nd)
1800 {
1801 return nd;
1802 }
1803 break;
1804 }
1805 }
1806 return nullptr;
1807}
1808
1810{
1811 //printf("> replaceNamespaceAliases(%s)\n",qPrint(name));
1812 StringSet namespacesTried;
1813 name = replaceNamespaceAliasesRec(namespacesTried,name);
1814 //printf("< replaceNamespaceAliases: result=%s\n",qPrint(name));
1815}
1816
1818{
1819 //printf("> getResolvedNamespace(%s)\n",qPrint(name));
1820 if (name.isEmpty()) return nullptr;
1821 StringSet namespacesTried;
1822 auto ns = getResolvedNamespaceRec(namespacesTried,NamespaceAliasInfo(name.str()));
1823 //printf("< getResolvedNamespace(%s)=%s\n",qPrint(name),ns?qPrint(ns->qualifiedName()):"nullptr");
1824 return ns;
1825}
1826
1827//--------------------------------------------------------------------------------------
1828//
1830{
1831 for (const auto &cnd : nd->getNamespaces())
1832 {
1833 if (cnd->isLinkableInProject() && !cnd->isAnonymous())
1834 {
1835 return true;
1836 }
1837 }
1838 return false;
1839}
1840
1842{
1843 //printf(">namespaceHasNestedConcept(%s)\n",qPrint(nd->name()));
1844 for (const auto &cnd : nd->getNamespaces())
1845 {
1847 {
1848 //printf("<namespaceHasNestedConcept(%s): case1\n",qPrint(nd->name()));
1849 return true;
1850 }
1851 }
1852 for (const auto &cnd : nd->getConcepts())
1853 {
1854 //printf("candidate %s isLinkableInProject()=%d\n",qPrint(cnd->name()),cnd->isLinkableInProject());
1855 if (cnd->isLinkableInProject())
1856 {
1857 //printf("<namespaceHasNestedConcept(%s): case2\n",qPrint(nd->name()));
1858 return true;
1859 }
1860 }
1861 //printf("<namespaceHasNestedConcept(%s): case3\n",qPrint(nd->name()));
1862 return false;
1863}
1864
1866{
1867 //printf(">namespaceHasNestedClass(%s,filterClasses=%d)\n",qPrint(nd->name()),filterClasses);
1868 for (const auto &cnd : nd->getNamespaces())
1869 {
1870 if (namespaceHasNestedClass(cnd,filterClasses,ct))
1871 {
1872 //printf("<namespaceHasNestedClass(%s,filterClasses=%d): case1\n",qPrint(nd->name()),filterClasses);
1873 return true;
1874 }
1875 }
1876
1877 ClassLinkedRefMap list = nd->getClasses();
1878 if (filterClasses)
1879 {
1880 switch (ct)
1881 {
1883 list = nd->getInterfaces();
1884 break;
1885 case ClassDef::Struct:
1886 list = nd->getStructs();
1887 break;
1889 list = nd->getExceptions();
1890 break;
1891 default:
1892 break;
1893 }
1894 }
1895
1896 for (const auto &cd : list)
1897 {
1898 //printf("candidate %s isLinkableInProject()=%d\n",qPrint(cd->name()),cd->isLinkableInProject());
1899 if (cd->isLinkableInProject())
1900 {
1901 //printf("<namespaceHasNestedClass(%s,filterClasses=%d): case2\n",qPrint(nd->name()),filterClasses);
1902 return true;
1903 }
1904 }
1905 //printf("<namespaceHasNestedClass(%s,filterClasses=%d): case3\n",qPrint(nd->name()),filterClasses);
1906 return false;
1907}
1908
1909
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: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
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 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
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:9189
FileDef * toFileDef(Definition *d)
Definition filedef.cpp:1954
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:482
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: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:3884
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:4726
void addGroupListToTitle(OutputList &ol, const Definition *d)
Definition util.cpp:4813
QCString removeAnonymousScopes(const QCString &str)
Definition util.cpp:170
void createSubDirs(const Dir &d)
Definition util.cpp:3561
QCString stripScope(const QCString &name)
Definition util.cpp:3700
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3425
QCString convertToXML(const QCString &s, bool keepEntities)
Definition util.cpp:3833
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
Definition util.cpp:5809
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:4823
A bunch of utility functions.