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 '%s' with unexpected type '%s' and class scope '%s' inserted in namespace scope '%s'!\n",
556 qPrint(md->name()),
557 qPrint(md->memberTypeName()),
558 md->getClassDef() ? qPrint(md->getClassDef()->name()) : "",
559 qPrint(name()));
560 }
561 // if this is an inline namespace, then insert an alias of this member in the outer scope.
562 if (isInline())
563 {
564 Definition *outerScope = getOuterScope();
565 if (outerScope)
566 {
567 std::unique_ptr<MemberDef> aliasMd = createMemberDefAlias(outerScope,md);
568 if (outerScope->definitionType()==Definition::TypeNamespace)
569 {
571 if (ndm)
572 {
573 ndm->insertMember(aliasMd.get());
574 }
575 }
576 else if (outerScope->definitionType()==Definition::TypeFile)
577 {
578 toFileDef(outerScope)->insertMember(aliasMd.get());
579 }
580 if (aliasMd)
581 {
582 QCString name = md->name();
584 mn->push_back(std::move(aliasMd));
585 }
586 }
587 }
588 }
589}
590
592{
593 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
594 if (allMemberList) allMemberList->setAnchors();
595}
596
598{
599 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
600 return ((!briefDescription().isEmpty() && repeatBrief) ||
601 !documentation().isEmpty());
602}
603
605{
608 tagFile << " <compound kind=\"namespace\">\n";
609 tagFile << " <name>" << convertToXML(name()) << "</name>\n";
610 tagFile << " <filename>" << fn << "</filename>\n";
611 QCString idStr = id();
612 if (!idStr.isEmpty())
613 {
614 tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>\n";
615 }
616 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
617 {
618 switch (lde->kind())
619 {
620 case LayoutDocEntry::NamespaceNestedNamespaces:
621 {
622 for (const auto &nd : namespaces)
623 {
624 if (nd->isLinkableInProject())
625 {
626 tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>\n";
627 }
628 }
629 }
630 break;
631 case LayoutDocEntry::NamespaceClasses:
632 {
634 }
635 break;
636 case LayoutDocEntry::NamespaceInterfaces:
637 {
639 }
640 break;
641 case LayoutDocEntry::NamespaceStructs:
642 {
644 }
645 break;
646 case LayoutDocEntry::NamespaceExceptions:
647 {
649 }
650 break;
651 case LayoutDocEntry::NamespaceConcepts:
652 {
653 writeConceptsToTagFile(tagFile);
654 }
655 break;
656 case LayoutDocEntry::MemberDecl:
657 {
658 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
659 if (lmd)
660 {
661 MemberList * ml = getMemberList(lmd->type);
662 if (ml)
663 {
664 ml->writeTagFile(tagFile);
665 }
666 }
667 }
668 break;
669 case LayoutDocEntry::MemberGroups:
670 {
671 for (const auto &mg : m_memberGroups)
672 {
673 mg->writeTagFile(tagFile);
674 }
675 }
676 break;
677 default:
678 break;
679 }
680 }
682 tagFile << " </compound>\n";
683}
684
686{
688 {
691 ol.writeRuler();
695 ol.writeAnchor(QCString(),"details");
697 ol.startGroupHeader();
698 ol.parseText(title);
699 ol.endGroupHeader();
700
701 ol.startTextBlock();
702 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
703 {
705 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
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(),docLine(),this,nullptr,documentation()+"\n",TRUE,FALSE,
722 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
723 }
724 ol.endTextBlock();
725 }
726}
727
729{
731 {
732 auto parser { createDocParser() };
733 auto ast { validatingParseDoc(*parser.get(),
734 briefFile(),briefLine(),this,nullptr,
736 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
737 if (!ast->isEmpty())
738 {
739 ol.startParagraph();
742 ol.writeString(" - ");
744 ol.writeDoc(ast.get(),this,nullptr);
747 ol.writeString(" \n");
749
751 {
753 ol.startTextLink(getOutputFileBase(),"details");
754 ol.parseText(theTranslator->trMore());
755 ol.endTextLink();
756 }
758 ol.endParagraph();
759 }
760 }
761
762 // Write a summary of the Slice definition including metadata.
764 {
765 ol.startParagraph();
766 ol.startTypewriter();
767 if (!metaData.isEmpty())
768 {
769 ol.docify(metaData);
770 ol.lineBreak();
771 }
772 ol.docify("module ");
773 ol.docify(stripScope(name()));
774 ol.docify(" { ... }");
775 ol.endTypewriter();
776 ol.endParagraph();
777 }
778
779 ol.writeSynopsis();
780}
781
786
791
793{
794 if (Config_getBool(SEPARATE_MEMBER_PAGES))
795 {
798 }
799}
800
802{
803 if (Config_getBool(SEPARATE_MEMBER_PAGES))
804 {
807 }
808}
809
814
816{
817 m_concepts.writeDeclaration(ol,title,TRUE);
818}
819
821{
822 classes.writeDocumentation(ol,this);
823}
824
830
832{
833 /* write user defined member groups */
834 for (const auto &mg : m_memberGroups)
835 {
836 if (!mg->allMembersInSameSection() || !m_subGrouping)
837 {
838 mg->writeDeclarations(ol,nullptr,this,nullptr,nullptr,nullptr);
839 }
840 }
841}
842
844{
845 // write Author section (Man only)
848 ol.startGroupHeader();
849 ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
850 ol.endGroupHeader();
851 ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString(PROJECT_NAME)));
853}
854
856{
859 bool first=TRUE;
860 SrcLangExt lang = getLanguage();
861 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
862 {
863 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
864 if (lde->kind()==LayoutDocEntry::NamespaceClasses && classes.declVisible() && ls)
865 {
866 QCString label = "nested-classes";
867 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
868 first=FALSE;
869 }
870 else if (lde->kind()==LayoutDocEntry::NamespaceInterfaces && interfaces.declVisible() && ls)
871 {
872 QCString label = "interfaces";
873 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
874 first=FALSE;
875 }
876 else if (lde->kind()==LayoutDocEntry::NamespaceStructs && structs.declVisible() && ls)
877 {
878 QCString label = "structs";
879 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
880 first=FALSE;
881 }
882 else if (lde->kind()==LayoutDocEntry::NamespaceExceptions && exceptions.declVisible() && ls)
883 {
884 QCString label = "exceptions";
885 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
886 first=FALSE;
887 }
888 else if (lde->kind()==LayoutDocEntry::NamespaceNestedNamespaces && namespaces.declVisible(false) && ls)
889 {
890 QCString label = "namespaces";
891 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
892 first=FALSE;
893 }
894 else if (lde->kind()==LayoutDocEntry::NamespaceNestedConstantGroups && namespaces.declVisible(true) && ls)
895 {
896 QCString label = "constantgroups";
897 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
898 first=FALSE;
899 }
900 else if (lde->kind()==LayoutDocEntry::NamespaceConcepts && m_concepts.declVisible() && ls)
901 {
902 QCString label = "concepts";
903 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
904 first=FALSE;
905 }
906 else if (lde->kind()== LayoutDocEntry::MemberDecl)
907 {
908 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
909 if (lmd)
910 {
911 MemberList * ml = getMemberList(lmd->type);
912 if (ml && ml->declVisible())
913 {
914 ol.writeSummaryLink(QCString(),ml->listType().toLabel(),lmd->title(lang),first);
915 first=FALSE;
916 }
917 }
918 }
919 }
920 if (!first)
921 {
922 ol.writeString(" </div>\n");
923 }
925}
926
928{
929 // UNO IDL constant groups may be published
931 {
934 ol.startLabels();
935 ol.writeLabel("published",false);
936 ol.endLabels();
938 }
939 else if (isExported())
940 {
943 ol.startLabels();
944 ol.writeLabel("export",false);
945 ol.endLabels();
947 }
948}
949
951{
952 for (const auto &cd : list)
953 {
954 if (cd->isLinkableInProject())
955 {
956 tagFile << " <class kind=\"" << cd->compoundTypeString()
957 << "\">" << convertToXML(cd->name()) << "</class>\n";
958 }
959 }
960}
961
963{
964 for (const auto &cd : m_concepts)
965 {
966 if (cd->isLinkableInProject())
967 {
968 tagFile << " <concept>" << convertToXML(cd->name()) << "</concept>\n";
969 }
970 }
971}
972
974{
975 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
976 //bool outputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
977 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
978
979 QCString pageTitle = title();
980 startFile(ol,getOutputFileBase(),name(),pageTitle,HighlightedItem::NamespaceVisible,!generateTreeView);
981
982 if (!generateTreeView)
983 {
985 {
987 }
988 ol.endQuickIndices();
989 }
990
991 startTitle(ol,getOutputFileBase(),this);
992 ol.parseText(pageTitle);
993 addGroupListToTitle(ol,this);
996 ol.startContents();
997
998 //---------------------------------------- start flexible part -------------------------------
999
1000 SrcLangExt lang = getLanguage();
1001 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1002 {
1003 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
1004 switch (lde->kind())
1005 {
1006 case LayoutDocEntry::BriefDesc:
1008 break;
1009 case LayoutDocEntry::MemberDeclStart:
1011 break;
1012 case LayoutDocEntry::NamespaceClasses:
1013 {
1014 if (ls) writeClassDeclarations(ol,ls->title(lang),classes);
1015 }
1016 break;
1017 case LayoutDocEntry::NamespaceInterfaces:
1018 {
1019 if (ls) writeClassDeclarations(ol,ls->title(lang),interfaces);
1020 }
1021 break;
1022 case LayoutDocEntry::NamespaceStructs:
1023 {
1024 if (ls) writeClassDeclarations(ol,ls->title(lang),structs);
1025 }
1026 break;
1027 case LayoutDocEntry::NamespaceExceptions:
1028 {
1029 if (ls) writeClassDeclarations(ol,ls->title(lang),exceptions);
1030 }
1031 break;
1032 case LayoutDocEntry::NamespaceConcepts:
1033 {
1034 if (ls) writeConcepts(ol,ls->title(lang));
1035 }
1036 break;
1037 case LayoutDocEntry::NamespaceNestedNamespaces:
1038 {
1039 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),false);
1040 }
1041 break;
1042 case LayoutDocEntry::NamespaceNestedConstantGroups:
1043 {
1044 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),true);
1045 }
1046 break;
1047 case LayoutDocEntry::MemberGroups:
1049 break;
1050 case LayoutDocEntry::MemberDecl:
1051 {
1052 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1053 if (lmd) writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
1054 }
1055 break;
1056 case LayoutDocEntry::MemberDeclEnd:
1058 break;
1059 case LayoutDocEntry::DetailedDesc:
1060 {
1061 if (ls) writeDetailedDescription(ol,ls->title(lang));
1062 }
1063 break;
1064 case LayoutDocEntry::MemberDefStart:
1066 break;
1067 case LayoutDocEntry::NamespaceInlineClasses:
1069 break;
1070 case LayoutDocEntry::MemberDef:
1071 {
1072 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1073 if (lmd) writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
1074 }
1075 break;
1076 case LayoutDocEntry::MemberDefEnd:
1078 break;
1079 case LayoutDocEntry::AuthorSection:
1081 break;
1082 case LayoutDocEntry::ClassIncludes:
1083 case LayoutDocEntry::ClassInheritanceGraph:
1084 case LayoutDocEntry::ClassNestedClasses:
1085 case LayoutDocEntry::ClassCollaborationGraph:
1086 case LayoutDocEntry::ClassAllMembersLink:
1087 case LayoutDocEntry::ClassUsedFiles:
1088 case LayoutDocEntry::ClassInlineClasses:
1089 case LayoutDocEntry::ConceptDefinition:
1090 case LayoutDocEntry::FileClasses:
1091 case LayoutDocEntry::FileConcepts:
1092 case LayoutDocEntry::FileInterfaces:
1093 case LayoutDocEntry::FileStructs:
1094 case LayoutDocEntry::FileExceptions:
1095 case LayoutDocEntry::FileNamespaces:
1096 case LayoutDocEntry::FileConstantGroups:
1097 case LayoutDocEntry::FileIncludes:
1098 case LayoutDocEntry::FileIncludeGraph:
1099 case LayoutDocEntry::FileIncludedByGraph:
1100 case LayoutDocEntry::FileSourceLink:
1101 case LayoutDocEntry::FileInlineClasses:
1102 case LayoutDocEntry::GroupClasses:
1103 case LayoutDocEntry::GroupConcepts:
1104 case LayoutDocEntry::GroupModules:
1105 case LayoutDocEntry::GroupInlineClasses:
1106 case LayoutDocEntry::GroupNamespaces:
1107 case LayoutDocEntry::GroupDirs:
1108 case LayoutDocEntry::GroupNestedGroups:
1109 case LayoutDocEntry::GroupFiles:
1110 case LayoutDocEntry::GroupGraph:
1111 case LayoutDocEntry::GroupPageDocs:
1112 case LayoutDocEntry::ModuleExports:
1113 case LayoutDocEntry::ModuleClasses:
1114 case LayoutDocEntry::ModuleConcepts:
1115 case LayoutDocEntry::ModuleUsedFiles:
1116 case LayoutDocEntry::DirSubDirs:
1117 case LayoutDocEntry::DirFiles:
1118 case LayoutDocEntry::DirGraph:
1119 err("Internal inconsistency: member '%s' should not be part of "
1120 "LayoutDocManager::Namespace entry list\n",qPrint(lde->entryToString()));
1121 break;
1122 }
1123 }
1124
1125 //---------------------------------------- end flexible part -------------------------------
1126
1127 ol.endContents();
1128
1129 endFileWithNavPath(ol,this);
1130
1131 if (Config_getBool(SEPARATE_MEMBER_PAGES))
1132 {
1133 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1134 if (allMemberList) allMemberList->sort();
1135 writeMemberPages(ol);
1136 }
1137}
1138
1140{
1141 ol.pushGeneratorState();
1143
1144 for (const auto &ml : m_memberLists)
1145 {
1146 if (ml->listType().isDocumentation())
1147 {
1148 ml->writeDocumentationPage(ol,displayName(),this);
1149 }
1150 }
1151 ol.popGeneratorState();
1152}
1153
1155{
1156 bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
1157
1158 ol.writeString(" <div class=\"navtab\">\n");
1159 ol.writeString(" <table>\n");
1160
1161 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1162 if (allMemberList)
1163 {
1164 for (const auto &md : *allMemberList)
1165 {
1166 if (md->getNamespaceDef()==this && md->isLinkable() && !md->isEnumValue())
1167 {
1168 if (md->isLinkableInProject())
1169 {
1170 QCString fn = md->getOutputFileBase();
1172 if (md==currentMd) // selected item => highlight
1173 {
1174 ol.writeString(" <tr><td class=\"navtabHL\">");
1175 }
1176 else
1177 {
1178 ol.writeString(" <tr><td class=\"navtab\">");
1179 }
1180 ol.writeString("<a class=\"navtab\" ");
1181 ol.writeString("href=\"");
1182 if (createSubDirs) ol.writeString("../../");
1183 ol.writeString(fn+"#"+md->anchor());
1184 ol.writeString("\">");
1185 ol.writeString(convertToHtml(md->localName()));
1186 ol.writeString("</a>");
1187 ol.writeString("</td></tr>\n");
1188 }
1189 }
1190 }
1191 }
1192
1193 ol.writeString(" </table>\n");
1194 ol.writeString(" </div>\n");
1195}
1196
1198{
1199 for (auto &ml : m_memberLists)
1200 {
1201 ml->countDecMembers();
1202 ml->countDocMembers();
1203 }
1204 for (const auto &mg : m_memberGroups)
1205 {
1206 mg->countDecMembers();
1207 mg->countDocMembers();
1208 }
1209}
1210
1212{
1213 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1214 return (allMemberList ? allMemberList->numDocMembers() : 0) + static_cast<int>(m_innerCompounds.size());
1215}
1216
1218{
1219 m_usingDirList.add(nd->qualifiedName(),nd);
1220 //printf("%s: NamespaceDefImpl::addUsingDirective: %s:%zu\n",qPrint(name()),qPrint(nd->qualifiedName()),m_usingDirList.size());
1221}
1222
1227
1232
1234{
1235 if (n==nullptr) return nullptr;
1236 const Definition *d = m_innerCompounds.find(n);
1237 if (d==nullptr)
1238 {
1239 if (!m_usingDirList.empty())
1240 {
1241 d = m_usingDirList.find(n);
1242 }
1243 if (d==nullptr && !m_usingDeclList.empty())
1244 {
1245 d = m_usingDeclList.find(n);
1246 }
1247 }
1248 return d;
1249}
1250
1252{
1253 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
1254 {
1255 const RefItemVector &xrefItems = xrefListItems();
1256 addRefItem(xrefItems,
1257 qualifiedName(),
1259 theTranslator->trModule(TRUE,TRUE) :
1260 theTranslator->trNamespace(TRUE,TRUE),
1262 QCString(),
1263 this
1264 );
1265 }
1266 for (const auto &mg : m_memberGroups)
1267 {
1268 mg->addListReferences(this);
1269 }
1270 for (auto &ml : m_memberLists)
1271 {
1272 if (ml->listType().isDocumentation())
1273 {
1274 ml->addListReferences(this);
1275 }
1276 }
1277}
1278
1280{
1281 return makeDisplayName(this,includeScope);
1282}
1283
1285{
1286 if (visitedNamespaces.find(this)!=visitedNamespaces.end()) return; // already processed
1287 visitedNamespaces.insert(this);
1288
1290 for (auto &nd : usingDirList)
1291 {
1293 if (ndm)
1294 {
1295 ndm->combineUsingRelations(visitedNamespaces);
1296 }
1297 }
1298
1299 for (auto &nd : usingDirList)
1300 {
1301 // add used namespaces of namespace nd to this namespace
1302 for (const auto &und : nd->getUsedNamespaces())
1303 {
1304 addUsingDirective(und);
1305 }
1306 // add used classes of namespace nd to this namespace
1307 for (const auto &ud : nd->getUsedDefinitions())
1308 {
1310 }
1311 }
1312}
1313
1315{
1316 int count=0;
1317 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1318 {
1319 if (lde->kind()==LayoutDocEntry::MemberDef)
1320 {
1321 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1322 if (lmd)
1323 {
1324 MemberList *ml = getMemberList(lmd->type);
1325 if (ml)
1326 {
1327 for (const auto &md : *ml)
1328 {
1329 if (md->visibleInIndex())
1330 {
1331 count++;
1332 }
1333 }
1334 }
1335 }
1336 }
1337 }
1338 return count;
1339}
1340
1341
1342
1343//-------------------------------------------------------------------------------
1344
1345bool NamespaceLinkedRefMap::declVisible(bool isConstantGroup) const
1346{
1347 bool found=false;
1348 for (const auto &nd : *this)
1349 {
1350 if (nd->isLinkable() && nd->hasDocumentation())
1351 {
1352 SrcLangExt lang = nd->getLanguage();
1353 if (SrcLangExt::IDL==lang)
1354 {
1355 if (isConstantGroup == nd->isConstantGroup())
1356 {
1357 found=true;
1358 break;
1359 }
1360 }
1361 else if (!isConstantGroup) // ensure we only get extra section in IDL
1362 {
1363 if (nd->isConstantGroup())
1364 {
1365 err("Internal inconsistency: constant group but not IDL?\n");
1366 }
1367 found=true;
1368 break;
1369 }
1370 }
1371 }
1372 return found;
1373}
1374
1376 bool const isConstantGroup,bool localName)
1377{
1378
1379
1380 if (empty()) return; // no namespaces in the list
1381
1382 if (Config_getBool(OPTIMIZE_OUTPUT_VHDL)) return;
1383
1384 if (!declVisible(isConstantGroup)) return;
1385
1386 // write list of namespaces
1387 ol.startMemberHeader(isConstantGroup ? "constantgroups" : "namespaces");
1388 //bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
1389 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
1390 ol.parseText(title);
1391 ol.endMemberHeader();
1392 ol.startMemberList();
1393 for (const auto &nd : *this)
1394 {
1395 if (nd->isLinkable() && nd->hasDocumentation())
1396 {
1397 SrcLangExt lang = nd->getLanguage();
1398 if (lang==SrcLangExt::IDL && (isConstantGroup != nd->isConstantGroup()))
1399 continue; // will be output in another pass, see layout_default.xml
1402 QCString ct = nd->compoundTypeString();
1403 ol.docify(ct);
1404 ol.docify(" ");
1405 ol.insertMemberAlign();
1406 QCString name;
1407 if (localName)
1408 {
1409 name = nd->localName();
1410 }
1411 else
1412 {
1413 name = nd->displayName();
1414 }
1415 ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),QCString(),name);
1417 if (!nd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
1418 {
1419 ol.startMemberDescription(nd->getOutputFileBase());
1420 ol.generateDoc(nd->briefFile(),nd->briefLine(),nd,nullptr,nd->briefDescription(),FALSE,FALSE,
1421 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
1423 }
1425 }
1426 }
1427 ol.endMemberList();
1428}
1429
1430//-------------------------------------------------------------------------------
1431
1433{
1434 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
1435 bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
1436 const auto &ml = m_memberLists.get(lt,MemberListContainer::Namespace);
1437 ml->setNeedsSorting(
1438 (ml->listType().isDeclaration() && sortBriefDocs) ||
1439 (ml->listType().isDocumentation() && sortMemberDocs));
1440 ml->push_back(md);
1441
1442 if (ml->listType().isDeclaration())
1443 {
1445 if (mdm)
1446 {
1447 mdm->setSectionList(this,ml.get());
1448 }
1449 }
1450}
1451
1453{
1454 for (auto &ml : m_memberLists)
1455 {
1456 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
1457 }
1458
1459 auto classComp = [](const ClassLinkedRefMap::Ptr &c1,const ClassLinkedRefMap::Ptr &c2)
1460 {
1461 return Config_getBool(SORT_BY_SCOPE_NAME) ?
1462 qstricmp_sort(c1->name(), c2->name())<0 :
1463 qstricmp_sort(c1->className(), c2->className())<0;
1464 };
1465
1466 std::stable_sort(classes.begin(), classes.end(), classComp);
1467 std::stable_sort(interfaces.begin(),interfaces.end(),classComp);
1468 std::stable_sort(structs.begin(), structs.end(), classComp);
1469 std::stable_sort(exceptions.begin(),exceptions.end(),classComp);
1470
1471
1472 auto namespaceComp = [](const NamespaceLinkedRefMap::Ptr &n1,const NamespaceLinkedRefMap::Ptr &n2)
1473 {
1474 return qstricmp_sort(n1->name(),n2->name())<0;
1475 };
1476
1477 std::stable_sort(namespaces.begin(),namespaces.end(),namespaceComp);
1478}
1479
1481{
1482 for (auto &ml : m_memberLists)
1483 {
1484 if (ml->listType()==lt)
1485 {
1486 return ml.get();
1487 }
1488 }
1489 return nullptr;
1490}
1491
1493{
1494 MemberList * ml = getMemberList(lt);
1495 if (ml) ml->writeDeclarations(ol,nullptr,this,nullptr,nullptr,nullptr,title,QCString());
1496}
1497
1503
1504static bool hasNonReferenceNestedNamespaceRec(const NamespaceDef *nd,int level)
1505{
1506 if (level>30)
1507 {
1508 err("Possible recursive namespace relation while inside %s\n",qPrint(nd->name()));
1509 return false;
1510 }
1511 bool found=nd->isLinkableInProject();
1512 if (found)
1513 {
1514 return true;
1515 }
1516 else
1517 {
1518 for (const auto &ind : nd->getNamespaces())
1519 {
1521 if (found) break;
1522 }
1523 }
1524 return found;
1525}
1526
1528{
1529 bool allExternals = Config_getBool(ALLEXTERNALS);
1530 return allExternals || hasNonReferenceNestedNamespaceRec(this,0) || isLinkable();
1531}
1532
1534{
1535 int i = name().findRev("::");
1536 if (i==-1) i=0; else i+=2;
1537 bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES);
1538 bool hideUndoc = Config_getBool(HIDE_UNDOC_NAMESPACES);
1539 if (extractAnonNs && // extract anonymous ns
1540 name().mid(i,20)=="anonymous_namespace{" // correct prefix
1541 ) // not disabled by config
1542 {
1543 return TRUE;
1544 }
1545 return !name().isEmpty() && name().at(i)!='@' && // not anonymous
1546 (hasDocumentation() || !hideUndoc || getLanguage()==SrcLangExt::CSharp) && // documented
1547 !isReference() && // not an external reference
1548 !isHidden() && // not hidden
1549 !isArtificial(); // or artificial
1550}
1551
1553{
1554 return isLinkableInProject() || isReference();
1555}
1556
1558{
1559 return m_allMembers.find(n);
1560}
1561
1563{
1564 SrcLangExt lang = getLanguage();
1565 QCString pageTitle;
1566 if (lang==SrcLangExt::Java)
1567 {
1568 pageTitle = theTranslator->trPackage(displayName());
1569 }
1570 else if (lang==SrcLangExt::Fortran || lang==SrcLangExt::Slice)
1571 {
1572 pageTitle = theTranslator->trModuleReference(displayName());
1573 }
1574 else if (lang==SrcLangExt::IDL)
1575 {
1576 pageTitle = isConstantGroup()
1577 ? theTranslator->trConstantGroupReference(displayName())
1578 : theTranslator->trModuleReference(displayName());
1579 }
1580 else
1581 {
1582 pageTitle = theTranslator->trNamespaceReference(displayName());
1583 }
1584 return pageTitle;
1585}
1586
1588{
1589 SrcLangExt lang = getLanguage();
1590 if (lang==SrcLangExt::Java)
1591 {
1592 return "package";
1593 }
1594 else if(lang==SrcLangExt::CSharp)
1595 {
1596 return "namespace";
1597 }
1598 else if (lang==SrcLangExt::Fortran)
1599 {
1600 return "module";
1601 }
1602 else if (lang==SrcLangExt::IDL)
1603 {
1604 if (isModule())
1605 {
1606 return "module";
1607 }
1608 else if (isConstantGroup())
1609 {
1610 return "constants";
1611 }
1612 else if (isLibrary())
1613 {
1614 return "library";
1615 }
1616 else
1617 {
1618 err_full(getDefFileName(),getDefLine(),"Internal inconsistency: namespace in IDL not module, library or constant group");
1619 }
1620 }
1621 return "namespace";
1622}
1623
1625{
1626 metaData = m;
1627}
1628
1629// --- Cast functions
1630//
1632{
1633 if (d && (typeid(*d)==typeid(NamespaceDefImpl) || typeid(*d)==typeid(NamespaceDefAliasImpl)))
1634 {
1635 return static_cast<NamespaceDef*>(d);
1636 }
1637 else
1638 {
1639 return nullptr;
1640 }
1641}
1642
1644{
1645 Definition *d = toDefinition(md);
1646 if (d && typeid(*d)==typeid(NamespaceDefImpl))
1647 {
1648 return static_cast<NamespaceDef*>(d);
1649 }
1650 else
1651 {
1652 return nullptr;
1653 }
1654}
1655
1656
1658{
1659 if (d && (typeid(*d)==typeid(NamespaceDefImpl) || typeid(*d)==typeid(NamespaceDefAliasImpl)))
1660 {
1661 return static_cast<const NamespaceDef*>(d);
1662 }
1663 else
1664 {
1665 return nullptr;
1666 }
1667}
1668
1670{
1671 if (d && typeid(*d)==typeid(NamespaceDefImpl))
1672 {
1673 return static_cast<NamespaceDefMutable*>(d);
1674 }
1675 else
1676 {
1677 return nullptr;
1678 }
1679}
1680
1681// --- Helpers
1682
1683static NamespaceDef *getResolvedNamespaceRec(StringSet &namespacesTried,const NamespaceAliasInfo &aliasInfo);
1684
1685static QCString replaceNamespaceAliasesRec(StringSet &namespacesTried,const QCString &name)
1686{
1687 QCString result = name;
1688 //printf("> replaceNamespaceAliasesRec(%s)\n",qPrint(name));
1689 if (namespacesTried.find(name.str())==namespacesTried.end())
1690 {
1691 namespacesTried.insert(name.str());
1692 size_t p = 0;
1693 for (;;)
1694 {
1695 size_t i = name.str().find("::",p);
1696 if (i==std::string::npos)
1697 {
1698 auto it = Doxygen::namespaceAliasMap.find(name.str());
1699 if (it != Doxygen::namespaceAliasMap.end())
1700 {
1701 //printf("found map %s->%s\n",qPrint(name),qPrint(it->second.alias));
1702 auto ns = getResolvedNamespaceRec(namespacesTried,it->second);
1703 if (ns)
1704 {
1705 result = replaceNamespaceAliasesRec(namespacesTried,ns->qualifiedName());
1706 }
1707 }
1708 break;
1709 }
1710 else
1711 {
1712 auto it = Doxygen::namespaceAliasMap.find(name.left(i).str());
1713 if (it != Doxygen::namespaceAliasMap.end())
1714 {
1715 //printf("found map %s|%s->%s\n",qPrint(name.left(i)),qPrint(name.mid(i)),qPrint(it->second.alias));
1716 auto ns = getResolvedNamespaceRec(namespacesTried,it->second);
1717 if (ns)
1718 {
1719 result = replaceNamespaceAliasesRec(namespacesTried,ns->qualifiedName()+name.mid(i));
1720 break;
1721 }
1722 }
1723 }
1724 p = i+2;
1725 }
1726 }
1727 //printf("< replaceNamespaceAliasesRec(%s)=%s\n",qPrint(name),qPrint(result));
1728 return result;
1729}
1730
1731static NamespaceDef *getResolvedNamespaceRec(StringSet &namespacesTried,const NamespaceAliasInfo &aliasInfo)
1732{
1733 size_t j = aliasInfo.context.length();
1734 for (;;)
1735 {
1736 if (j>0)
1737 {
1738 //printf("candidate %s|::%s\n",qPrint(aliasInfo.context.substr(0,j)),qPrint(aliasInfo.alias));
1739 auto candidate = replaceNamespaceAliasesRec(namespacesTried,aliasInfo.context.substr(0,j)+"::"+aliasInfo.alias);
1740 auto nd = Doxygen::namespaceLinkedMap->find(candidate);
1741 if (nd)
1742 {
1743 return nd;
1744 }
1745 }
1746 if (j>0) // strip one level from context, i.e. given N1::N2::N3
1747 // j==10 -> j==6 (N1::N2::N3->N1::N2), and then
1748 // j==6 -> j==2 (N1::N2->N1), and then
1749 // j==2 -> j==std::string::npos (N1->"")
1750 {
1751 j = aliasInfo.context.rfind("::",j-1);
1752 }
1753 else
1754 {
1755 j = std::string::npos;
1756 }
1757 if (j==std::string::npos)
1758 {
1759 //printf("candidate %s\n",qPrint(aliasInfo.alias));
1760 auto candidate = replaceNamespaceAliasesRec(namespacesTried,QCString(aliasInfo.alias));
1761 auto nd = Doxygen::namespaceLinkedMap->find(candidate);
1762 if (nd)
1763 {
1764 return nd;
1765 }
1766 break;
1767 }
1768 }
1769 return nullptr;
1770}
1771
1773{
1774 //printf("> replaceNamespaceAliases(%s)\n",qPrint(name));
1775 StringSet namespacesTried;
1776 name = replaceNamespaceAliasesRec(namespacesTried,name);
1777 //printf("< replaceNamespaceAliases: result=%s\n",qPrint(name));
1778}
1779
1781{
1782 //printf("> getResolvedNamespace(%s)\n",qPrint(name));
1783 if (name.isEmpty()) return nullptr;
1784 StringSet namespacesTried;
1785 auto ns = getResolvedNamespaceRec(namespacesTried,NamespaceAliasInfo(name.str()));
1786 //printf("< getResolvedNamespace(%s)=%s\n",qPrint(name),ns?qPrint(ns->qualifiedName()):"nullptr");
1787 return ns;
1788}
1789
1790//--------------------------------------------------------------------------------------
1791//
1793{
1794 for (const auto &cnd : nd->getNamespaces())
1795 {
1796 if (cnd->isLinkableInProject() && !cnd->isAnonymous())
1797 {
1798 return true;
1799 }
1800 }
1801 return false;
1802}
1803
1805{
1806 //printf(">namespaceHasNestedConcept(%s)\n",qPrint(nd->name()));
1807 for (const auto &cnd : nd->getNamespaces())
1808 {
1810 {
1811 //printf("<namespaceHasNestedConcept(%s): case1\n",qPrint(nd->name()));
1812 return true;
1813 }
1814 }
1815 for (const auto &cnd : nd->getConcepts())
1816 {
1817 //printf("candidate %s isLinkableInProject()=%d\n",qPrint(cnd->name()),cnd->isLinkableInProject());
1818 if (cnd->isLinkableInProject())
1819 {
1820 //printf("<namespaceHasNestedConcept(%s): case2\n",qPrint(nd->name()));
1821 return true;
1822 }
1823 }
1824 //printf("<namespaceHasNestedConcept(%s): case3\n",qPrint(nd->name()));
1825 return false;
1826}
1827
1829{
1830 //printf(">namespaceHasNestedClass(%s,filterClasses=%d)\n",qPrint(nd->name()),filterClasses);
1831 for (const auto &cnd : nd->getNamespaces())
1832 {
1833 if (namespaceHasNestedClass(cnd,filterClasses,ct))
1834 {
1835 //printf("<namespaceHasNestedClass(%s,filterClasses=%d): case1\n",qPrint(nd->name()),filterClasses);
1836 return true;
1837 }
1838 }
1839
1840 ClassLinkedRefMap list = nd->getClasses();
1841 if (filterClasses)
1842 {
1843 switch (ct)
1844 {
1846 list = nd->getInterfaces();
1847 break;
1848 case ClassDef::Struct:
1849 list = nd->getStructs();
1850 break;
1852 list = nd->getExceptions();
1853 break;
1854 default:
1855 break;
1856 }
1857 }
1858
1859 for (const auto &cd : list)
1860 {
1861 //printf("candidate %s isLinkableInProject()=%d\n",qPrint(cd->name()),cd->isLinkableInProject());
1862 if (cd->isLinkableInProject())
1863 {
1864 //printf("<namespaceHasNestedClass(%s,filterClasses=%d): case2\n",qPrint(nd->name()),filterClasses);
1865 return true;
1866 }
1867 }
1868 //printf("<namespaceHasNestedClass(%s,filterClasses=%d): case3\n",qPrint(nd->name()),filterClasses);
1869 return false;
1870}
1871
1872
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:1423
Container class representing a vector of objects with keys.
Definition linkedmap.h:232
bool add(const char *k, T *obj)
Adds an object reference to the ordered vector if it was not added already.
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:108
int numDocMembers() const
Definition memberlist.h:118
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:113
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:75
void push_back(const T &value)
Definition memberlist.h:47
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:9117
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:84
#define err_full(file, line, fmt,...)
Definition message.h:89
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
const char * qPrint(const char *s)
Definition qcstring.h:672
#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:109
QCString title(SrcLangExt lang) const
Definition layout.cpp:1533
MemberListType type
Definition layout.h:115
Represents of a member definition list with configurable title.
Definition layout.h:125
MemberListType type
Definition layout.h:130
QCString title(SrcLangExt lang) const
Definition layout.cpp:1545
Definition layout.h:99
QCString title(SrcLangExt lang) const
Definition layout.cpp:1526
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:4317
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:5146
void addGroupListToTitle(OutputList &ol, const Definition *d)
Definition util.cpp:5233
bool found
Definition util.cpp:984
QCString removeAnonymousScopes(const QCString &str)
Definition util.cpp:172
void createSubDirs(const Dir &d)
Definition util.cpp:3994
QCString stripScope(const QCString &name)
Definition util.cpp:4133
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3858
QCString convertToXML(const QCString &s, bool keepEntities)
Definition util.cpp:4266
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
Definition util.cpp:6230
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5243
A bunch of utility functions.