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; }
68 { return getLanguage()==SrcLangExt::Java ? CodeSymbolType::Package : CodeSymbolType::Namespace; }
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 void writePageNavigation(OutputList &ol) const override;
126
127 private:
136 void writeConcepts(OutputList &ol,const QCString &title);
145 void setFileNameLocal(const QCString &fn);
146
148 bool isConstantGroup=false);
149 void updateLocalName();
150
153
157
167 bool m_subGrouping = false;
169 bool m_isPublished = false;
171 bool m_inline = false;
172};
173
174std::unique_ptr<NamespaceDef> createNamespaceDef(const QCString &defFileName,int defLine,int defColumn,
175 const QCString &name,const QCString &ref,
176 const QCString &refFile,const QCString &type,
177 bool isPublished)
178{
179 //printf("createNamespaceDef(%s)\n",qPrint(name));
180 return std::make_unique<NamespaceDefImpl>(defFileName,defLine,defColumn,name,ref,refFile,type,isPublished);
181}
182
183//------------------------------------------------------------------
184
185class NamespaceDefAliasImpl : public DefinitionAliasMixin<NamespaceDef>
186{
187 public:
189 : DefinitionAliasMixin(newScope,nd) { init(); }
192
193 DefType definitionType() const override { return TypeNamespace; }
194
195 const NamespaceDef *getNSAlias() const { return toNamespaceDef(getAlias()); }
196
197 // ---- getters
199 { return getNSAlias()->codeSymbolType(); }
201 { return getNSAlias()->getOutputFileBase(); }
202 QCString anchor() const override
203 { return getNSAlias()->anchor(); }
204 int numDocMembers() const override
205 { return getNSAlias()->numDocMembers(); }
207 { return getNSAlias()->getUsedNamespaces(); }
210 QCString displayName(bool b=TRUE) const override
211 { return makeDisplayName(this,b); }
212 const QCString &localName() const override
213 { return getNSAlias()->localName(); }
214 bool isConstantGroup() const override
215 { return getNSAlias()->isConstantGroup(); }
216 bool isModule() const override
217 { return getNSAlias()->isModule(); }
218 bool isLibrary() const override
219 { return getNSAlias()->isLibrary(); }
220 bool isInline() const override
221 { return getNSAlias()->isInline(); }
222 bool isLinkableInProject() const override
223 { return getNSAlias()->isLinkableInProject(); }
224 bool isLinkable() const override
225 { return getNSAlias()->isLinkable(); }
226 bool isVisibleInHierarchy() const override
227 { return getNSAlias()->isVisibleInHierarchy(); }
228 bool hasDetailedDescription() const override
229 { return getNSAlias()->hasDetailedDescription(); }
230 const Definition *findInnerCompound(const QCString &name) const override
231 { return getNSAlias()->findInnerCompound(name); }
232 bool subGrouping() const override
233 { return getNSAlias()->subGrouping(); }
235 { return getNSAlias()->getMemberList(lt); }
236 const MemberLists &getMemberLists() const override
237 { return getNSAlias()->getMemberLists(); }
238 const MemberDef *getMemberByName(const QCString &name) const override
239 { return getNSAlias()->getMemberByName(name); }
240 const MemberGroupList &getMemberGroups() const override
241 { return getNSAlias()->getMemberGroups(); }
243 { return getNSAlias()->getClasses(); }
245 { return getNSAlias()->getInterfaces(); }
247 { return getNSAlias()->getStructs(); }
249 { return getNSAlias()->getExceptions(); }
251 { return getNSAlias()->getNamespaces(); }
253 { return getNSAlias()->getConcepts(); }
254 QCString title() const override
255 { return getNSAlias()->title(); }
257 { return getNSAlias()->compoundTypeString(); }
258 int countVisibleMembers() const override
259 { return getNSAlias()->countVisibleMembers(); }
260};
261
262std::unique_ptr<NamespaceDef> createNamespaceDefAlias(const Definition *newScope,const NamespaceDef *nd)
263{
264 auto alnd = std::make_unique<NamespaceDefAliasImpl>(newScope,nd);
265 //printf("alnd name=%s localName=%s qualifiedName=%s displayName()=%s\n",
266 // qPrint(alnd->name()),qPrint(alnd->localName()),qPrint(alnd->qualifiedName()),
267 // qPrint(alnd->displayName()));
268 return alnd;
269}
270
271//------------------------------------------------------------------
272
274 const QCString &name,const QCString &lref,
275 const QCString &fName, const QCString &type,
276 bool isPublished) :
277 DefinitionMixin(df,dl,dc,name)
278 ,m_isPublished(isPublished)
279{
280 if (!fName.isEmpty())
281 {
282 if (!lref.isEmpty())
283 {
284 fileName = stripExtension(fName);
285 }
286 else
287 {
288 fileName = convertNameToFile(stripExtension(fName));
289 }
290 }
291 else
292 {
293 setFileNameLocal(name);
294 }
295 setReference(lref);
296 m_inline=FALSE;
297 m_subGrouping=Config_getBool(SUBGROUPING);
298 if (type=="module")
299 {
300 m_type = MODULE;
301 }
302 else if (type=="constants")
303 {
304 m_type = CONSTANT_GROUP;
305 }
306 else if (type=="library")
307 {
308 m_type = LIBRARY;
309 }
310 else
311 {
312 m_type = NAMESPACE;
313 }
314
315 updateLocalName();
316}
317
319{
320 QCString locName=name();
321 int i=locName.findRev("::");
322 if (i!=-1)
323 {
324 locName=locName.mid(i+2);
325 }
326 setLocalName(locName);
327}
328
334
338
340{
341 if (isReference())
342 {
343 fileName = "namespace"+fn;
344 }
345 else
346 {
347 fileName = convertNameToFile("namespace"+fn);
348 }
349}
350
352{
354}
355
357{
358 for (const auto &mg : m_memberGroups)
359 {
360 mg->distributeMemberGroupDocumentation();
361 }
362}
363
365{
369 for (const auto &mg : m_memberGroups)
370 {
371 mg->findSectionsInDocumentation(this);
372 }
373 for (auto &ml : m_memberLists)
374 {
375 if (ml->listType().isDeclaration())
376 {
377 ml->findSectionsInDocumentation(this);
378 }
379 }
380}
381
383{
384 if (fd==nullptr) return;
385 auto it = std::find(files.begin(),files.end(),fd);
386 if (it==files.end())
387 {
388 files.push_back(fd);
389 }
390}
391
393{
394 //printf("%s:NamespaceDefImpl::addInnerCompound(%s)\n",qPrint(name()),qPrint(d->name()));
395 m_innerCompounds.add(d->localName(),d);
397 {
399 }
401 {
403 }
405 {
407 }
408}
409
411{
413
414 if (Config_getBool(OPTIMIZE_OUTPUT_SLICE))
415 {
417 {
418 d = &interfaces;
419 }
420 else if (cd->compoundType()==ClassDef::Struct)
421 {
422 d = &structs;
423 }
424 else if (cd->compoundType()==ClassDef::Exception)
425 {
426 d = &exceptions;
427 }
428 }
429
430 d->add(cd->name(),cd);
431}
432
434{
435 m_concepts.add(cd->name(),cd);
436}
437
439{
440 namespaces.add(nd->name(),nd);
441}
442
443
445{
446 for (auto &ml : m_memberLists)
447 {
448 if (ml->listType().isDeclaration())
449 {
451 }
452 }
453
454 // add members inside sections to their groups
455 for (const auto &mg : m_memberGroups)
456 {
457 if (mg->allMembersInSameSection() && m_subGrouping)
458 {
459 //printf("----> addToDeclarationSection(%s)\n",qPrint(mg->header()));
460 mg->addToDeclarationSection();
461 }
462 }
463}
464
466{
467 //printf("%s::insertMember(%s) isInline=%d hasDocs=%d\n",qPrint(name()),qPrint(md->name()),
468 // isInline(),hasDocumentation());
469 if (md->isHidden()) return;
471
472 // if this is an inline namespace that is not documented, then insert the
473 // member in the parent scope instead
474 if (isInline() && !hasDocumentation())
475 {
476 Definition *outerScope = getOuterScope();
477 if (outerScope)
478 {
479 if (outerScope->definitionType()==Definition::TypeNamespace)
480 {
482 if (nd && nd!=Doxygen::globalScope)
483 {
484 nd->insertMember(md);
485 if (mdm)
486 {
487 mdm->setNamespace(nd);
488 }
489 }
490 }
491 else if (outerScope->definitionType()==Definition::TypeFile)
492 {
493 FileDef *fd = toFileDef(outerScope);
494 fd->insertMember(md);
495 if (mdm)
496 {
497 mdm->setFileDef(fd);
498 mdm->setOuterScope(fd);
499 }
500 }
501 }
502 }
503 else // member is a non-inline namespace or a documented inline namespace
504 {
505 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
506 if (allMemberList==nullptr)
507 {
508 m_memberLists.emplace_back(std::make_unique<MemberList>(MemberListType::AllMembersList(),MemberListContainer::Namespace));
509 allMemberList = m_memberLists.back().get();
510 }
511 allMemberList->push_back(md);
512 //printf("%s::m_allMembersDict->append(%s)\n",qPrint(name()),qPrint(md->localName()));
513 m_allMembers.add(md->localName(),md);
514 switch(md->memberType())
515 {
517 addMemberToList(MemberListType::DecVarMembers(),md);
518 addMemberToList(MemberListType::DocVarMembers(),md);
519 break;
521 addMemberToList(MemberListType::DecFuncMembers(),md);
522 addMemberToList(MemberListType::DocFuncMembers(),md);
523 break;
525 addMemberToList(MemberListType::DecTypedefMembers(),md);
526 addMemberToList(MemberListType::DocTypedefMembers(),md);
527 break;
529 addMemberToList(MemberListType::DecSequenceMembers(),md);
530 addMemberToList(MemberListType::DocSequenceMembers(),md);
531 break;
533 addMemberToList(MemberListType::DecDictionaryMembers(),md);
534 addMemberToList(MemberListType::DocDictionaryMembers(),md);
535 break;
537 addMemberToList(MemberListType::DecEnumMembers(),md);
538 addMemberToList(MemberListType::DocEnumMembers(),md);
539 break;
541 break;
543 addMemberToList(MemberListType::DecDefineMembers(),md);
544 addMemberToList(MemberListType::DocDefineMembers(),md);
545 break;
547 if (md->getLanguage() == SrcLangExt::Python)
548 {
549 addMemberToList(MemberListType::PropertyMembers(),md);
550 addMemberToList(MemberListType::Properties(),md);
551 break;
552 }
553 // fallthrough, explicitly no break here
554 default:
555 err("NamespaceDefImpl::insertMembers(): "
556 "member '{}' with unexpected type '{}' and class scope '{}' inserted in namespace scope '{}'!\n",
557 md->name(), md->memberTypeName(), md->getClassDef() ? md->getClassDef()->name() : "", name());
558 }
559 // if this is an inline namespace, then insert an alias of this member in the outer scope.
560 if (isInline())
561 {
562 Definition *outerScope = getOuterScope();
563 if (outerScope)
564 {
565 std::unique_ptr<MemberDef> aliasMd = createMemberDefAlias(outerScope,md);
566 if (outerScope->definitionType()==Definition::TypeNamespace)
567 {
569 if (ndm)
570 {
571 ndm->insertMember(aliasMd.get());
572 }
573 }
574 else if (outerScope->definitionType()==Definition::TypeFile)
575 {
576 toFileDef(outerScope)->insertMember(aliasMd.get());
577 }
578 if (aliasMd)
579 {
580 QCString name = md->name();
582 mn->push_back(std::move(aliasMd));
583 }
584 }
585 }
586 }
587}
588
590{
591 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
592 if (allMemberList) allMemberList->setAnchors();
593}
594
596{
597 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
598 return ((!briefDescription().isEmpty() && repeatBrief) ||
599 !documentation().isEmpty());
600}
601
603{
606 tagFile << " <compound kind=\"namespace\">\n";
607 tagFile << " <name>" << convertToXML(name()) << "</name>\n";
608 tagFile << " <filename>" << fn << "</filename>\n";
609 QCString idStr = id();
610 if (!idStr.isEmpty())
611 {
612 tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>\n";
613 }
614 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
615 {
616 switch (lde->kind())
617 {
618 case LayoutDocEntry::NamespaceNestedNamespaces:
619 {
620 for (const auto &nd : namespaces)
621 {
622 if (nd->isLinkableInProject())
623 {
624 tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>\n";
625 }
626 }
627 }
628 break;
629 case LayoutDocEntry::NamespaceClasses:
630 {
632 }
633 break;
634 case LayoutDocEntry::NamespaceInterfaces:
635 {
637 }
638 break;
639 case LayoutDocEntry::NamespaceStructs:
640 {
642 }
643 break;
644 case LayoutDocEntry::NamespaceExceptions:
645 {
647 }
648 break;
649 case LayoutDocEntry::NamespaceConcepts:
650 {
651 writeConceptsToTagFile(tagFile);
652 }
653 break;
654 case LayoutDocEntry::MemberDecl:
655 {
656 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
657 if (lmd)
658 {
659 MemberList * ml = getMemberList(lmd->type);
660 if (ml)
661 {
662 ml->writeTagFile(tagFile);
663 }
664 }
665 }
666 break;
667 case LayoutDocEntry::MemberGroups:
668 {
669 for (const auto &mg : m_memberGroups)
670 {
671 mg->writeTagFile(tagFile);
672 }
673 }
674 break;
675 default:
676 break;
677 }
678 }
680 tagFile << " </compound>\n";
681}
682
684{
686 {
689 ol.writeRuler();
693 ol.writeAnchor(QCString(),"details");
695 ol.startGroupHeader("details");
696 ol.parseText(title);
697 ol.endGroupHeader();
698
699 ol.startTextBlock();
700 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
701 {
703 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
704 }
705 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
706 !documentation().isEmpty())
707 {
711 ol.enableAll();
714 ol.writeString("\n\n");
716 }
717 if (!documentation().isEmpty())
718 {
719 ol.generateDoc(docFile(),docLine(),this,nullptr,documentation()+"\n",TRUE,FALSE,
720 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
721 }
722 ol.endTextBlock();
723 }
724}
725
727{
729 {
730 auto parser { createDocParser() };
731 auto ast { validatingParseDoc(*parser.get(),
732 briefFile(),briefLine(),this,nullptr,
734 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
735 if (!ast->isEmpty())
736 {
737 ol.startParagraph();
740 ol.writeString(" - ");
742 ol.writeDoc(ast.get(),this,nullptr);
745 ol.writeString(" \n");
747
749 {
751 ol.startTextLink(getOutputFileBase(),"details");
752 ol.parseText(theTranslator->trMore());
753 ol.endTextLink();
754 }
756 ol.endParagraph();
757 }
758 }
759
760 // Write a summary of the Slice definition including metadata.
761 if (getLanguage() == SrcLangExt::Slice)
762 {
763 ol.startParagraph();
764 ol.startTypewriter();
765 if (!metaData.isEmpty())
766 {
767 ol.docify(metaData);
768 ol.lineBreak();
769 }
770 ol.docify("module ");
771 ol.docify(stripScope(name()));
772 ol.docify(" { ... }");
773 ol.endTypewriter();
774 ol.endParagraph();
775 }
776
777 ol.writeSynopsis();
778}
779
784
789
791{
792 if (Config_getBool(SEPARATE_MEMBER_PAGES))
793 {
796 }
797}
798
800{
801 if (Config_getBool(SEPARATE_MEMBER_PAGES))
802 {
805 }
806}
807
812
814{
815 m_concepts.writeDeclaration(ol,title,TRUE);
816}
817
819{
820 classes.writeDocumentation(ol,this);
821}
822
828
830{
831 /* write user defined member groups */
832 for (const auto &mg : m_memberGroups)
833 {
834 if (!mg->allMembersInSameSection() || !m_subGrouping)
835 {
836 mg->writeDeclarations(ol,nullptr,this,nullptr,nullptr,nullptr);
837 }
838 }
839}
840
842{
843 // write Author section (Man only)
846 ol.startGroupHeader();
847 ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
848 ol.endGroupHeader();
849 ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString(PROJECT_NAME)));
851}
852
854{
857 bool first=TRUE;
858 SrcLangExt lang = getLanguage();
859 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
860 {
861 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
862 if (lde->kind()==LayoutDocEntry::NamespaceClasses && classes.declVisible() && ls)
863 {
864 QCString label = "nested-classes";
865 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
866 first=FALSE;
867 }
868 else if (lde->kind()==LayoutDocEntry::NamespaceInterfaces && interfaces.declVisible() && ls)
869 {
870 QCString label = "interfaces";
871 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
872 first=FALSE;
873 }
874 else if (lde->kind()==LayoutDocEntry::NamespaceStructs && structs.declVisible() && ls)
875 {
876 QCString label = "structs";
877 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
878 first=FALSE;
879 }
880 else if (lde->kind()==LayoutDocEntry::NamespaceExceptions && exceptions.declVisible() && ls)
881 {
882 QCString label = "exceptions";
883 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
884 first=FALSE;
885 }
886 else if (lde->kind()==LayoutDocEntry::NamespaceNestedNamespaces && namespaces.declVisible(false) && ls)
887 {
888 QCString label = "namespaces";
889 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
890 first=FALSE;
891 }
892 else if (lde->kind()==LayoutDocEntry::NamespaceNestedConstantGroups && namespaces.declVisible(true) && ls)
893 {
894 QCString label = "constantgroups";
895 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
896 first=FALSE;
897 }
898 else if (lde->kind()==LayoutDocEntry::NamespaceConcepts && m_concepts.declVisible() && ls)
899 {
900 QCString label = "concepts";
901 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
902 first=FALSE;
903 }
904 else if (lde->kind()== LayoutDocEntry::MemberDecl)
905 {
906 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
907 if (lmd)
908 {
909 MemberList * ml = getMemberList(lmd->type);
910 if (ml && ml->declVisible())
911 {
912 ol.writeSummaryLink(QCString(),ml->listType().toLabel(),lmd->title(lang),first);
913 first=FALSE;
914 }
915 }
916 }
917 }
918 if (!first)
919 {
920 ol.writeString(" </div>\n");
921 }
923}
924
929
931{
932 // UNO IDL constant groups may be published
933 if (getLanguage()==SrcLangExt::IDL && isConstantGroup() && m_isPublished)
934 {
937 ol.startLabels();
938 ol.writeLabel("published",false);
939 ol.endLabels();
941 }
942 else if (isExported())
943 {
946 ol.startLabels();
947 ol.writeLabel("export",false);
948 ol.endLabels();
950 }
951}
952
954{
955 for (const auto &cd : list)
956 {
957 if (cd->isLinkableInProject())
958 {
959 tagFile << " <class kind=\"" << cd->compoundTypeString()
960 << "\">" << convertToXML(cd->name()) << "</class>\n";
961 }
962 }
963}
964
966{
967 for (const auto &cd : m_concepts)
968 {
969 if (cd->isLinkableInProject())
970 {
971 tagFile << " <concept>" << convertToXML(cd->name()) << "</concept>\n";
972 }
973 }
974}
975
977{
978 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
979 //bool outputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
980 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
981
982 QCString pageTitle = title();
983 startFile(ol,getOutputFileBase(),name(),pageTitle,HighlightedItem::NamespaceVisible,!generateTreeView);
984
985 if (!generateTreeView)
986 {
988 {
990 }
991 ol.endQuickIndices();
992 }
993
994 startTitle(ol,getOutputFileBase(),this);
995 ol.parseText(pageTitle);
996 addGroupListToTitle(ol,this);
999 ol.startContents();
1000
1001 //---------------------------------------- start flexible part -------------------------------
1002
1003 SrcLangExt lang = getLanguage();
1004 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1005 {
1006 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
1007 switch (lde->kind())
1008 {
1009 case LayoutDocEntry::BriefDesc:
1011 break;
1012 case LayoutDocEntry::MemberDeclStart:
1014 break;
1015 case LayoutDocEntry::NamespaceClasses:
1016 {
1017 if (ls) writeClassDeclarations(ol,ls->title(lang),classes);
1018 }
1019 break;
1020 case LayoutDocEntry::NamespaceInterfaces:
1021 {
1022 if (ls) writeClassDeclarations(ol,ls->title(lang),interfaces);
1023 }
1024 break;
1025 case LayoutDocEntry::NamespaceStructs:
1026 {
1027 if (ls) writeClassDeclarations(ol,ls->title(lang),structs);
1028 }
1029 break;
1030 case LayoutDocEntry::NamespaceExceptions:
1031 {
1032 if (ls) writeClassDeclarations(ol,ls->title(lang),exceptions);
1033 }
1034 break;
1035 case LayoutDocEntry::NamespaceConcepts:
1036 {
1037 if (ls) writeConcepts(ol,ls->title(lang));
1038 }
1039 break;
1040 case LayoutDocEntry::NamespaceNestedNamespaces:
1041 {
1042 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),false);
1043 }
1044 break;
1045 case LayoutDocEntry::NamespaceNestedConstantGroups:
1046 {
1047 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),true);
1048 }
1049 break;
1050 case LayoutDocEntry::MemberGroups:
1052 break;
1053 case LayoutDocEntry::MemberDecl:
1054 {
1055 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1056 if (lmd) writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
1057 }
1058 break;
1059 case LayoutDocEntry::MemberDeclEnd:
1061 break;
1062 case LayoutDocEntry::DetailedDesc:
1063 {
1064 if (ls) writeDetailedDescription(ol,ls->title(lang));
1065 }
1066 break;
1067 case LayoutDocEntry::MemberDefStart:
1069 break;
1070 case LayoutDocEntry::NamespaceInlineClasses:
1072 break;
1073 case LayoutDocEntry::MemberDef:
1074 {
1075 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1076 if (lmd) writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
1077 }
1078 break;
1079 case LayoutDocEntry::MemberDefEnd:
1081 break;
1082 case LayoutDocEntry::AuthorSection:
1084 break;
1085 case LayoutDocEntry::ClassIncludes:
1086 case LayoutDocEntry::ClassInheritanceGraph:
1087 case LayoutDocEntry::ClassNestedClasses:
1088 case LayoutDocEntry::ClassCollaborationGraph:
1089 case LayoutDocEntry::ClassAllMembersLink:
1090 case LayoutDocEntry::ClassUsedFiles:
1091 case LayoutDocEntry::ClassInlineClasses:
1092 case LayoutDocEntry::ConceptDefinition:
1093 case LayoutDocEntry::FileClasses:
1094 case LayoutDocEntry::FileConcepts:
1095 case LayoutDocEntry::FileInterfaces:
1096 case LayoutDocEntry::FileStructs:
1097 case LayoutDocEntry::FileExceptions:
1098 case LayoutDocEntry::FileNamespaces:
1099 case LayoutDocEntry::FileConstantGroups:
1100 case LayoutDocEntry::FileIncludes:
1101 case LayoutDocEntry::FileIncludeGraph:
1102 case LayoutDocEntry::FileIncludedByGraph:
1103 case LayoutDocEntry::FileSourceLink:
1104 case LayoutDocEntry::FileInlineClasses:
1105 case LayoutDocEntry::GroupClasses:
1106 case LayoutDocEntry::GroupConcepts:
1107 case LayoutDocEntry::GroupModules:
1108 case LayoutDocEntry::GroupInlineClasses:
1109 case LayoutDocEntry::GroupNamespaces:
1110 case LayoutDocEntry::GroupDirs:
1111 case LayoutDocEntry::GroupNestedGroups:
1112 case LayoutDocEntry::GroupFiles:
1113 case LayoutDocEntry::GroupGraph:
1114 case LayoutDocEntry::GroupPageDocs:
1115 case LayoutDocEntry::ModuleExports:
1116 case LayoutDocEntry::ModuleClasses:
1117 case LayoutDocEntry::ModuleConcepts:
1118 case LayoutDocEntry::ModuleUsedFiles:
1119 case LayoutDocEntry::DirSubDirs:
1120 case LayoutDocEntry::DirFiles:
1121 case LayoutDocEntry::DirGraph:
1122 err("Internal inconsistency: member '{}' should not be part of "
1123 "LayoutDocManager::Namespace entry list\n",lde->entryToString());
1124 break;
1125 }
1126 }
1127
1128 //---------------------------------------- end flexible part -------------------------------
1129
1130 ol.endContents();
1131
1132 endFileWithNavPath(ol,this);
1133
1134 if (Config_getBool(SEPARATE_MEMBER_PAGES))
1135 {
1136 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1137 if (allMemberList) allMemberList->sort();
1138 writeMemberPages(ol);
1139 }
1140}
1141
1143{
1144 ol.pushGeneratorState();
1146
1147 for (const auto &ml : m_memberLists)
1148 {
1149 if (ml->listType().isDocumentation())
1150 {
1151 ml->writeDocumentationPage(ol,displayName(),this);
1152 }
1153 }
1154 ol.popGeneratorState();
1155}
1156
1158{
1159 bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
1160
1161 ol.writeString(" <div class=\"navtab\">\n");
1162 ol.writeString(" <table>\n");
1163
1164 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1165 if (allMemberList)
1166 {
1167 for (const auto &md : *allMemberList)
1168 {
1169 if (md->getNamespaceDef()==this && md->isLinkable() && !md->isEnumValue())
1170 {
1171 if (md->isLinkableInProject())
1172 {
1173 QCString fn = md->getOutputFileBase();
1175 if (md==currentMd) // selected item => highlight
1176 {
1177 ol.writeString(" <tr><td class=\"navtabHL\">");
1178 }
1179 else
1180 {
1181 ol.writeString(" <tr><td class=\"navtab\">");
1182 }
1183 ol.writeString("<span class=\"label\"><a ");
1184 ol.writeString("href=\"");
1185 if (createSubDirs) ol.writeString("../../");
1186 ol.writeString(fn+"#"+md->anchor());
1187 ol.writeString("\">");
1188 ol.writeString(convertToHtml(md->localName()));
1189 ol.writeString("</a></span>");
1190 ol.writeString("</td></tr>\n");
1191 }
1192 }
1193 }
1194 }
1195
1196 ol.writeString(" </table>\n");
1197 ol.writeString(" </div>\n");
1198}
1199
1201{
1202 for (auto &ml : m_memberLists)
1203 {
1204 ml->countDecMembers();
1205 ml->countDocMembers();
1206 }
1207 for (const auto &mg : m_memberGroups)
1208 {
1209 mg->countDecMembers();
1210 mg->countDocMembers();
1211 }
1212}
1213
1215{
1216 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1217 return (allMemberList ? allMemberList->numDocMembers() : 0) + static_cast<int>(m_innerCompounds.size());
1218}
1219
1221{
1222 m_usingDirList.add(nd->qualifiedName(),nd);
1223 //printf("%s: NamespaceDefImpl::addUsingDirective: %s:%zu\n",qPrint(name()),qPrint(nd->qualifiedName()),m_usingDirList.size());
1224}
1225
1230
1235
1237{
1238 if (n==nullptr) return nullptr;
1239 const Definition *d = m_innerCompounds.find(n);
1240 if (d==nullptr)
1241 {
1242 if (!m_usingDirList.empty())
1243 {
1244 d = m_usingDirList.find(n);
1245 }
1246 if (d==nullptr && !m_usingDeclList.empty())
1247 {
1248 d = m_usingDeclList.find(n);
1249 }
1250 }
1251 return d;
1252}
1253
1255{
1256 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
1257 {
1258 const RefItemVector &xrefItems = xrefListItems();
1259 addRefItem(xrefItems,
1260 qualifiedName(),
1261 getLanguage()==SrcLangExt::Fortran ?
1262 theTranslator->trModule(TRUE,TRUE) :
1263 theTranslator->trNamespace(TRUE,TRUE),
1265 QCString(),
1266 this
1267 );
1268 }
1269 for (const auto &mg : m_memberGroups)
1270 {
1271 mg->addListReferences(this);
1272 }
1273 for (auto &ml : m_memberLists)
1274 {
1275 if (ml->listType().isDocumentation())
1276 {
1277 ml->addListReferences(this);
1278 }
1279 }
1280}
1281
1283{
1284 return makeDisplayName(this,includeScope);
1285}
1286
1288{
1289 if (visitedNamespaces.find(this)!=visitedNamespaces.end()) return; // already processed
1290 visitedNamespaces.insert(this);
1291
1293 for (auto &nd : usingDirList)
1294 {
1296 if (ndm)
1297 {
1298 ndm->combineUsingRelations(visitedNamespaces);
1299 }
1300 }
1301
1302 for (auto &nd : usingDirList)
1303 {
1304 // add used namespaces of namespace nd to this namespace
1305 for (const auto &und : nd->getUsedNamespaces())
1306 {
1307 addUsingDirective(und);
1308 }
1309 // add used classes of namespace nd to this namespace
1310 for (const auto &ud : nd->getUsedDefinitions())
1311 {
1313 }
1314 }
1315}
1316
1318{
1319 int count=0;
1320 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1321 {
1322 if (lde->kind()==LayoutDocEntry::MemberDef)
1323 {
1324 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1325 if (lmd)
1326 {
1327 MemberList *ml = getMemberList(lmd->type);
1328 if (ml)
1329 {
1330 for (const auto &md : *ml)
1331 {
1332 if (md->visibleInIndex())
1333 {
1334 count++;
1335 }
1336 }
1337 }
1338 }
1339 }
1340 }
1341 return count;
1342}
1343
1344
1345
1346//-------------------------------------------------------------------------------
1347
1348bool NamespaceLinkedRefMap::declVisible(bool isConstantGroup) const
1349{
1350 bool found=false;
1351 for (const auto &nd : *this)
1352 {
1353 if (nd->isLinkable() && nd->hasDocumentation())
1354 {
1355 SrcLangExt lang = nd->getLanguage();
1356 if (SrcLangExt::IDL==lang)
1357 {
1358 if (isConstantGroup == nd->isConstantGroup())
1359 {
1360 found=true;
1361 break;
1362 }
1363 }
1364 else if (!isConstantGroup) // ensure we only get extra section in IDL
1365 {
1366 if (nd->isConstantGroup())
1367 {
1368 err("Internal inconsistency: constant group but not IDL?\n");
1369 }
1370 found=true;
1371 break;
1372 }
1373 }
1374 }
1375 return found;
1376}
1377
1379 bool const isConstantGroup,bool localName)
1380{
1381
1382
1383 if (empty()) return; // no namespaces in the list
1384
1385 if (Config_getBool(OPTIMIZE_OUTPUT_VHDL)) return;
1386
1387 if (!declVisible(isConstantGroup)) return;
1388
1389 // write list of namespaces
1390 ol.startMemberHeader(isConstantGroup ? "constantgroups" : "namespaces");
1391 //bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
1392 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
1393 ol.parseText(title);
1394 ol.endMemberHeader();
1395 ol.startMemberList();
1396 for (const auto &nd : *this)
1397 {
1398 if (nd->isLinkable() && nd->hasDocumentation())
1399 {
1400 SrcLangExt lang = nd->getLanguage();
1401 if (lang==SrcLangExt::IDL && (isConstantGroup != nd->isConstantGroup()))
1402 continue; // will be output in another pass, see layout_default.xml
1404 QCString name = localName ? nd->localName() : nd->displayName();
1405 QCString anc = nd->anchor();
1406 if (anc.isEmpty()) anc=name; else anc.prepend(name+"_");
1408 QCString ct = nd->compoundTypeString();
1409 ol.docify(ct);
1410 ol.docify(" ");
1411 ol.insertMemberAlign();
1412 ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),QCString(),name);
1414 if (!nd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
1415 {
1416 ol.startMemberDescription(nd->getOutputFileBase());
1417 ol.generateDoc(nd->briefFile(),nd->briefLine(),nd,nullptr,nd->briefDescription(),FALSE,FALSE,
1418 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
1420 }
1422 }
1423 }
1424 ol.endMemberList();
1425}
1426
1427//-------------------------------------------------------------------------------
1428
1430{
1431 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
1432 bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
1433 const auto &ml = m_memberLists.get(lt,MemberListContainer::Namespace);
1434 ml->setNeedsSorting(
1435 (ml->listType().isDeclaration() && sortBriefDocs) ||
1436 (ml->listType().isDocumentation() && sortMemberDocs));
1437 ml->push_back(md);
1438
1439 if (ml->listType().isDeclaration())
1440 {
1442 if (mdm)
1443 {
1444 mdm->setSectionList(this,ml.get());
1445 }
1446 }
1447}
1448
1450{
1451 for (auto &ml : m_memberLists)
1452 {
1453 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
1454 }
1455
1456 auto classComp = [](const ClassLinkedRefMap::Ptr &c1,const ClassLinkedRefMap::Ptr &c2)
1457 {
1458 return Config_getBool(SORT_BY_SCOPE_NAME) ?
1459 qstricmp_sort(c1->name(), c2->name())<0 :
1460 qstricmp_sort(c1->className(), c2->className())<0;
1461 };
1462
1463 std::stable_sort(classes.begin(), classes.end(), classComp);
1464 std::stable_sort(interfaces.begin(),interfaces.end(),classComp);
1465 std::stable_sort(structs.begin(), structs.end(), classComp);
1466 std::stable_sort(exceptions.begin(),exceptions.end(),classComp);
1467
1468
1469 auto namespaceComp = [](const NamespaceLinkedRefMap::Ptr &n1,const NamespaceLinkedRefMap::Ptr &n2)
1470 {
1471 return qstricmp_sort(n1->name(),n2->name())<0;
1472 };
1473
1474 std::stable_sort(namespaces.begin(),namespaces.end(),namespaceComp);
1475}
1476
1478{
1479 for (auto &ml : m_memberLists)
1480 {
1481 if (ml->listType()==lt)
1482 {
1483 return ml.get();
1484 }
1485 }
1486 return nullptr;
1487}
1488
1490{
1491 MemberList * ml = getMemberList(lt);
1492 if (ml) ml->writeDeclarations(ol,nullptr,this,nullptr,nullptr,nullptr,title,QCString());
1493}
1494
1500
1501static bool hasNonReferenceNestedNamespaceRec(const NamespaceDef *nd,int level)
1502{
1503 if (level>30)
1504 {
1505 err("Possible recursive namespace relation while inside {}\n",nd->name());
1506 return false;
1507 }
1508 bool found=nd->isLinkableInProject();
1509 if (found)
1510 {
1511 return true;
1512 }
1513 else
1514 {
1515 for (const auto &ind : nd->getNamespaces())
1516 {
1518 if (found) break;
1519 }
1520 }
1521 return found;
1522}
1523
1525{
1526 bool allExternals = Config_getBool(ALLEXTERNALS);
1527 return allExternals || hasNonReferenceNestedNamespaceRec(this,0) || isLinkable();
1528}
1529
1531{
1532 int i = name().findRev("::");
1533 if (i==-1) i=0; else i+=2;
1534 bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES);
1535 bool hideUndoc = Config_getBool(HIDE_UNDOC_NAMESPACES);
1536 if (extractAnonNs && // extract anonymous ns
1537 name().mid(i,20)=="anonymous_namespace{" // correct prefix
1538 ) // not disabled by config
1539 {
1540 return TRUE;
1541 }
1542 return !name().isEmpty() && name().at(i)!='@' && // not anonymous
1543 (hasDocumentation() || !hideUndoc || getLanguage()==SrcLangExt::CSharp) && // documented
1544 !isReference() && // not an external reference
1545 !isHidden() && // not hidden
1546 !isArtificial(); // or artificial
1547}
1548
1550{
1551 return isLinkableInProject() || isReference();
1552}
1553
1555{
1556 return m_allMembers.find(n);
1557}
1558
1560{
1561 QCString pageTitle;
1562 SrcLangExt lang = getLanguage();
1563
1564 auto getReferenceTitle = [this](std::function<QCString()> translateFunc) -> QCString
1565 {
1566 return Config_getBool(HIDE_COMPOUND_REFERENCE) ? displayName() : translateFunc();
1567 };
1568
1569 if (lang==SrcLangExt::Java)
1570 {
1571 pageTitle = theTranslator->trPackage(displayName());
1572 }
1573 else if (lang==SrcLangExt::Fortran || lang==SrcLangExt::Slice)
1574 {
1575 pageTitle = getReferenceTitle([this](){
1576 return theTranslator->trModuleReference(displayName());
1577 });
1578 }
1579 else if (lang==SrcLangExt::IDL)
1580 {
1581 pageTitle = getReferenceTitle([this](){
1582 return isConstantGroup()
1583 ? theTranslator->trConstantGroupReference(displayName())
1584 : theTranslator->trModuleReference(displayName());
1585 });
1586 }
1587 else
1588 {
1589 pageTitle = getReferenceTitle([this](){
1590 return theTranslator->trNamespaceReference(displayName());
1591 });
1592 }
1593 return pageTitle;
1594}
1595
1597{
1598 SrcLangExt lang = getLanguage();
1599 if (lang==SrcLangExt::Java)
1600 {
1601 return "package";
1602 }
1603 else if(lang==SrcLangExt::CSharp)
1604 {
1605 return "namespace";
1606 }
1607 else if (lang==SrcLangExt::Fortran)
1608 {
1609 return "module";
1610 }
1611 else if (lang==SrcLangExt::IDL)
1612 {
1613 if (isModule())
1614 {
1615 return "module";
1616 }
1617 else if (isConstantGroup())
1618 {
1619 return "constants";
1620 }
1621 else if (isLibrary())
1622 {
1623 return "library";
1624 }
1625 else
1626 {
1627 err_full(getDefFileName(),getDefLine(),"Internal inconsistency: namespace in IDL not module, library or constant group");
1628 }
1629 }
1630 return "namespace";
1631}
1632
1634{
1635 metaData = m;
1636}
1637
1638// --- Cast functions
1639//
1641{
1642 if (d && (typeid(*d)==typeid(NamespaceDefImpl) || typeid(*d)==typeid(NamespaceDefAliasImpl)))
1643 {
1644 return static_cast<NamespaceDef*>(d);
1645 }
1646 else
1647 {
1648 return nullptr;
1649 }
1650}
1651
1653{
1654 Definition *d = toDefinition(md);
1655 if (d && typeid(*d)==typeid(NamespaceDefImpl))
1656 {
1657 return static_cast<NamespaceDef*>(d);
1658 }
1659 else
1660 {
1661 return nullptr;
1662 }
1663}
1664
1665
1667{
1668 if (d && (typeid(*d)==typeid(NamespaceDefImpl) || typeid(*d)==typeid(NamespaceDefAliasImpl)))
1669 {
1670 return static_cast<const NamespaceDef*>(d);
1671 }
1672 else
1673 {
1674 return nullptr;
1675 }
1676}
1677
1679{
1680 if (d && typeid(*d)==typeid(NamespaceDefImpl))
1681 {
1682 return static_cast<NamespaceDefMutable*>(d);
1683 }
1684 else
1685 {
1686 return nullptr;
1687 }
1688}
1689
1690// --- Helpers
1691
1692static NamespaceDef *getResolvedNamespaceRec(StringSet &namespacesTried,const NamespaceAliasInfo &aliasInfo);
1693
1694static QCString replaceNamespaceAliasesRec(StringSet &namespacesTried,const QCString &name)
1695{
1696 QCString result = name;
1697 //printf("> replaceNamespaceAliasesRec(%s)\n",qPrint(name));
1698 if (namespacesTried.find(name.str())==namespacesTried.end())
1699 {
1700 namespacesTried.insert(name.str());
1701 size_t p = 0;
1702 for (;;)
1703 {
1704 size_t i = name.str().find("::",p);
1705 if (i==std::string::npos)
1706 {
1707 auto it = Doxygen::namespaceAliasMap.find(name.str());
1708 if (it != Doxygen::namespaceAliasMap.end())
1709 {
1710 //printf("found map %s->%s\n",qPrint(name),qPrint(it->second.alias));
1711 auto ns = getResolvedNamespaceRec(namespacesTried,it->second);
1712 if (ns)
1713 {
1714 result = replaceNamespaceAliasesRec(namespacesTried,ns->qualifiedName());
1715 }
1716 }
1717 break;
1718 }
1719 else
1720 {
1721 auto it = Doxygen::namespaceAliasMap.find(name.left(i).str());
1722 if (it != Doxygen::namespaceAliasMap.end())
1723 {
1724 //printf("found map %s|%s->%s\n",qPrint(name.left(i)),qPrint(name.mid(i)),qPrint(it->second.alias));
1725 auto ns = getResolvedNamespaceRec(namespacesTried,it->second);
1726 if (ns)
1727 {
1728 result = replaceNamespaceAliasesRec(namespacesTried,ns->qualifiedName()+name.mid(i));
1729 break;
1730 }
1731 }
1732 }
1733 p = i+2;
1734 }
1735 }
1736 //printf("< replaceNamespaceAliasesRec(%s)=%s\n",qPrint(name),qPrint(result));
1737 return result;
1738}
1739
1740static NamespaceDef *getResolvedNamespaceRec(StringSet &namespacesTried,const NamespaceAliasInfo &aliasInfo)
1741{
1742 size_t j = aliasInfo.context.length();
1743 for (;;)
1744 {
1745 if (j>0)
1746 {
1747 //printf("candidate %s|::%s\n",qPrint(aliasInfo.context.substr(0,j)),qPrint(aliasInfo.alias));
1748 auto candidate = replaceNamespaceAliasesRec(namespacesTried,aliasInfo.context.substr(0,j)+"::"+aliasInfo.alias);
1749 auto nd = Doxygen::namespaceLinkedMap->find(candidate);
1750 if (nd)
1751 {
1752 return nd;
1753 }
1754 }
1755 if (j>0) // strip one level from context, i.e. given N1::N2::N3
1756 // j==10 -> j==6 (N1::N2::N3->N1::N2), and then
1757 // j==6 -> j==2 (N1::N2->N1), and then
1758 // j==2 -> j==std::string::npos (N1->"")
1759 {
1760 j = aliasInfo.context.rfind("::",j-1);
1761 }
1762 else
1763 {
1764 j = std::string::npos;
1765 }
1766 if (j==std::string::npos)
1767 {
1768 //printf("candidate %s\n",qPrint(aliasInfo.alias));
1769 auto candidate = replaceNamespaceAliasesRec(namespacesTried,QCString(aliasInfo.alias));
1770 auto nd = Doxygen::namespaceLinkedMap->find(candidate);
1771 if (nd)
1772 {
1773 return nd;
1774 }
1775 break;
1776 }
1777 }
1778 return nullptr;
1779}
1780
1782{
1783 //printf("> replaceNamespaceAliases(%s)\n",qPrint(name));
1784 StringSet namespacesTried;
1785 name = replaceNamespaceAliasesRec(namespacesTried,name);
1786 //printf("< replaceNamespaceAliases: result=%s\n",qPrint(name));
1787}
1788
1790{
1791 //printf("> getResolvedNamespace(%s)\n",qPrint(name));
1792 if (name.isEmpty()) return nullptr;
1793 StringSet namespacesTried;
1794 auto ns = getResolvedNamespaceRec(namespacesTried,NamespaceAliasInfo(name.str()));
1795 //printf("< getResolvedNamespace(%s)=%s\n",qPrint(name),ns?qPrint(ns->qualifiedName()):"nullptr");
1796 return ns;
1797}
1798
1799//--------------------------------------------------------------------------------------
1800//
1802{
1803 for (const auto &cnd : nd->getNamespaces())
1804 {
1805 if (cnd->isLinkableInProject() && !cnd->isAnonymous())
1806 {
1807 return true;
1808 }
1809 }
1810 return false;
1811}
1812
1814{
1815 //printf(">namespaceHasNestedConcept(%s)\n",qPrint(nd->name()));
1816 for (const auto &cnd : nd->getNamespaces())
1817 {
1819 {
1820 //printf("<namespaceHasNestedConcept(%s): case1\n",qPrint(nd->name()));
1821 return true;
1822 }
1823 }
1824 for (const auto &cnd : nd->getConcepts())
1825 {
1826 //printf("candidate %s isLinkableInProject()=%d\n",qPrint(cnd->name()),cnd->isLinkableInProject());
1827 if (cnd->isLinkableInProject())
1828 {
1829 //printf("<namespaceHasNestedConcept(%s): case2\n",qPrint(nd->name()));
1830 return true;
1831 }
1832 }
1833 //printf("<namespaceHasNestedConcept(%s): case3\n",qPrint(nd->name()));
1834 return false;
1835}
1836
1838{
1839 //printf(">namespaceHasNestedClass(%s,filterClasses=%d)\n",qPrint(nd->name()),filterClasses);
1840 for (const auto &cnd : nd->getNamespaces())
1841 {
1842 if (namespaceHasNestedClass(cnd,filterClasses,ct))
1843 {
1844 //printf("<namespaceHasNestedClass(%s,filterClasses=%d): case1\n",qPrint(nd->name()),filterClasses);
1845 return true;
1846 }
1847 }
1848
1849 ClassLinkedRefMap list = nd->getClasses();
1850 if (filterClasses)
1851 {
1852 switch (ct)
1853 {
1855 list = nd->getInterfaces();
1856 break;
1857 case ClassDef::Struct:
1858 list = nd->getStructs();
1859 break;
1861 list = nd->getExceptions();
1862 break;
1863 default:
1864 break;
1865 }
1866 }
1867
1868 for (const auto &cd : list)
1869 {
1870 //printf("candidate %s isLinkableInProject()=%d\n",qPrint(cd->name()),cd->isLinkableInProject());
1871 if (cd->isLinkableInProject())
1872 {
1873 //printf("<namespaceHasNestedClass(%s,filterClasses=%d): case2\n",qPrint(nd->name()),filterClasses);
1874 return true;
1875 }
1876 }
1877 //printf("<namespaceHasNestedClass(%s,filterClasses=%d): case3\n",qPrint(nd->name()),filterClasses);
1878 return false;
1879}
1880
1881
A abstract class representing of a compound symbol.
Definition classdef.h:104
virtual QCString className() const =0
Returns the name of the class including outer classes, but not including namespaces.
CompoundType
The various compound types.
Definition classdef.h:109
@ Interface
Definition classdef.h:112
@ Exception
Definition classdef.h:115
virtual CompoundType compoundType() const =0
Returns the type of compound this is, i.e.
void writeDeclaration(OutputList &ol, const ClassDef::CompoundType *filter, const QCString &header, bool localNames) const
Definition classlist.cpp:53
const QCString & name() const override
const Definition * getAlias() const
DefinitionAliasMixin(const Definition *scope, const Definition *alias)
The common base class of all entity definitions found in the sources.
Definition definition.h:76
virtual const QCString & localName() const =0
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual bool isLinkable() const =0
virtual DefType definitionType() const =0
virtual QCString anchor() const =0
virtual bool isLinkableInProject() const =0
virtual bool isAnonymous() const =0
virtual bool isHidden() const =0
virtual const Definition * findInnerCompound(const QCString &name) const =0
virtual QCString qualifiedName() const =0
virtual CodeSymbolType codeSymbolType() const =0
virtual QCString getOutputFileBase() const =0
virtual const QCString & name() const =0
const QCString & name() const override
QCString getDefFileName() const override
void writeNavigationPath(OutputList &ol) const override
QCString briefFile() const override
QCString qualifiedName() const override
const RefItemVector & xrefListItems() const override
void setName(const QCString &name) override
QCString briefDescription(bool abbreviate=FALSE) const override
Definition * getOuterScope() const override
DefinitionMixin(const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
void setLocalName(const QCString &name) override
QCString inbodyDocumentation() const override
QCString documentation() const override
void writeDocAnchorsToTagFile(TextStream &fs) const override
SrcLangExt getLanguage() const override
virtual void setOuterScope(Definition *d)=0
static NamespaceLinkedMap * namespaceLinkedMap
Definition doxygen.h:115
static bool suppressDocWarnings
Definition doxygen.h:132
static MemberNameLinkedMap * functionNameLinkedMap
Definition doxygen.h:112
static NamespaceDefMutable * globalScope
Definition doxygen.h:121
static NamespaceAliasInfoMap namespaceAliasMap
Definition doxygen.h:113
A model of a file symbol.
Definition filedef.h:99
virtual void insertMember(MemberDef *md)=0
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1435
Container class representing a vector of objects with keys.
Definition linkedmap.h:232
bool add(const char *k, T *obj)
Definition linkedmap.h:284
A model of a class/file/namespace member symbol.
Definition memberdef.h:48
virtual const ClassDef * getClassDef() const =0
virtual MemberType memberType() const =0
virtual QCString memberTypeName() const =0
virtual void setSectionList(const Definition *container, const MemberList *sl)=0
virtual void setFileDef(FileDef *fd)=0
virtual void setNamespace(NamespaceDef *nd)=0
A list of MemberDef objects as shown in documentation sections.
Definition memberlist.h:109
int numDocMembers() const
Definition memberlist.h:122
void writeDeclarations(OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, const QCString &title, const QCString &subtitle, bool showEnumValues=FALSE, bool showInline=FALSE, const ClassDef *inheritedFrom=nullptr, MemberListType lt=MemberListType::PubMethods(), bool showSectionTitle=true) const
Writes the list of members to the output.
void writeTagFile(TextStream &, bool useQualifiedName=false, bool showNamespaceMembers=true)
MemberListType listType() const
Definition memberlist.h:114
void writeDocumentation(OutputList &ol, const QCString &scopeName, const Definition *container, const QCString &title, 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
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 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:314
void endTextBlock(bool paraBreak=FALSE)
Definition outputlist.h:673
void writeString(const QCString &text)
Definition outputlist.h:412
void startMemberDeclaration()
Definition outputlist.h:570
void disable(OutputType o)
void writeRuler()
Definition outputlist.h:522
void startGroupHeader(const QCString &id=QCString(), int extraLevels=0)
Definition outputlist.h:454
void enable(OutputType o)
void endContents()
Definition outputlist.h:621
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:671
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:743
void endQuickIndices()
Definition outputlist.h:605
void writePageOutline()
Definition outputlist.h:617
void writeLabel(const QCString &l, bool isLast)
Definition outputlist.h:741
void startLabels()
Definition outputlist.h:739
void startContents()
Definition outputlist.h:619
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 & prepend(const char *s)
Definition qcstring.h:407
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:55
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:9173
FileDef * toFileDef(Definition *d)
Definition filedef.cpp:1932
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, 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:477
int qstricmp_sort(const char *str1, const char *str2)
Definition qcstring.h:86
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
std::vector< RefItem * > RefItemVector
Definition reflist.h:133
Web server based search engine.
Represents of a member declaration list with configurable title and subtitle.
Definition layout.h:112
QCString title(SrcLangExt lang) const
Definition layout.cpp:1786
MemberListType type
Definition layout.h:118
Represents of a member definition list with configurable title.
Definition layout.h:132
MemberListType type
Definition layout.h:137
QCString title(SrcLangExt lang) const
Definition layout.cpp:1798
Definition layout.h:102
QCString title(SrcLangExt lang) const
Definition layout.cpp:1779
std::string context
Definition doxygen.h:78
std::string alias
Definition doxygen.h:77
CodeSymbolType
Definition types.h: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:4479
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:5318
void addGroupListToTitle(OutputList &ol, const Definition *d)
Definition util.cpp:5405
bool found
Definition util.cpp:984
QCString removeAnonymousScopes(const QCString &str)
Definition util.cpp:172
void createSubDirs(const Dir &d)
Definition util.cpp:4156
QCString stripScope(const QCString &name)
Definition util.cpp:4295
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:4020
QCString convertToXML(const QCString &s, bool keepEntities)
Definition util.cpp:4428
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
Definition util.cpp:6376
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5415
A bunch of utility functions.