Doxygen
Loading...
Searching...
No Matches
groupdef.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 <algorithm>
19#include <vector>
20
21#include <ctype.h>
22
23#include "groupdef.h"
24#include "classdef.h"
25#include "filedef.h"
26#include "classlist.h"
27#include "outputlist.h"
28#include "namespacedef.h"
29#include "language.h"
30#include "util.h"
31#include "memberlist.h"
32#include "message.h"
33#include "membergroup.h"
34#include "doxygen.h"
35#include "pagedef.h"
36#include "docparser.h"
37#include "searchindex.h"
38#include "dot.h"
40#include "vhdldocgen.h"
41#include "layout.h"
42#include "arguments.h"
43#include "entry.h"
44#include "membername.h"
45#include "dirdef.h"
46#include "config.h"
47#include "definitionimpl.h"
48#include "regex.h"
49#include "moduledef.h"
50
51//---------------------------------------------------------------------------
52
53class GroupDefImpl : public DefinitionMixin<GroupDef>
54{
55 public:
56 GroupDefImpl(const QCString &fileName,int line,const QCString &name,const QCString &title,const QCString &refFileName=QCString());
57 ~GroupDefImpl() override;
59
60 DefType definitionType() const override { return TypeGroup; }
62 QCString getOutputFileBase() const override;
63 QCString anchor() const override { return QCString(); }
64 QCString displayName(bool=TRUE) const override { return hasGroupTitle() ? m_title : DefinitionMixin::name(); }
65 QCString groupTitle() const override { return m_title; }
66 QCString groupTitleAsText() const override { return m_titleAsText; }
67 void setGroupTitle( const QCString &newtitle ) override;
68 bool hasGroupTitle( ) const override { return m_titleSet; }
69 void addFile(FileDef *def) override;
70 bool containsFile(const FileDef *def) const override;
71 bool addClass(ClassDef *def) override;
72 bool addConcept(ConceptDef *def) override;
73 bool addModule(ModuleDef *def) override;
74 bool addNamespace(NamespaceDef *def) override;
75 void addGroup(GroupDef *def) override;
76 void addPage(PageDef *def) override;
77 void addExample(PageDef *def) override;
78 void addDir(DirDef *dd) override;
79 bool insertMember(MemberDef *def,bool docOnly=FALSE) override;
80 void removeMember(MemberDef *md) override;
81 bool findGroup(const GroupDef *def) const override; // true if def is a subgroup of this group
82 void writeDocumentation(OutputList &ol) override;
83 void writeMemberPages(OutputList &ol, int hierarchyLevel) override;
84 void writeQuickMemberLinks(OutputList &ol,const MemberDef *currentMd) const override;
85 void writeTagFile(TextStream &) override;
86 size_t numDocMembers() const override;
87 bool isLinkableInProject() const override;
88 bool isLinkable() const override;
89 bool isVisibleInHierarchy() const override;
90 bool isASubGroup() const override;
91 void computeAnchors() override;
92 void countMembers() override;
93
94 void addMembersToMemberGroup() override;
96 void findSectionsInDocumentation() override;
97
98 void addListReferences() override;
99 void addRequirementReferences() override;
100 void sortMemberLists() override;
101 bool subGrouping() const override { return m_subGrouping; }
102
103 void setGroupScope(Definition *d) override { m_groupScope = d; }
104 Definition *getGroupScope() const override { return m_groupScope; }
105
106 MemberList *getMemberList(MemberListType lt) const override;
107 const MemberLists &getMemberLists() const override { return m_memberLists; }
108
109 /* user defined member groups */
110 const MemberGroupList &getMemberGroups() const override { return m_memberGroups; }
111
112 const FileList &getFiles() const override { return m_fileList; }
113 const ClassLinkedRefMap &getClasses() const override { return m_classes; }
114 const ConceptLinkedRefMap &getConcepts() const override { return m_concepts; }
115 const ModuleLinkedRefMap &getModules() const override { return m_modules; }
116 const NamespaceLinkedRefMap &getNamespaces() const override { return m_namespaces; }
117 const GroupList &getSubGroups() const override { return m_groups; }
118 const PageLinkedRefMap &getPages() const override { return m_pages; }
119 const DirList & getDirs() const override { return m_dirList; }
120 const PageLinkedRefMap &getExamples() const override { return m_examples; }
121 bool hasDetailedDescription() const override;
122 void sortSubGroups() override;
123 void writeSummaryLinks(OutputList &ol) const override;
124 void writePageNavigation(OutputList &ol) const override;
125
126 bool hasGroupGraph() const override;
127 void overrideGroupGraph(bool e) override;
128 private:
129 void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);
134 void writeGroupGraph(OutputList &ol);
135 void writeFiles(OutputList &ol,const QCString &title);
136 void writeNamespaces(OutputList &ol,const QCString &title);
137 void writeNestedGroups(OutputList &ol,const QCString &title);
138 void writeDirs(OutputList &ol,const QCString &title);
139 void writeClasses(OutputList &ol,const QCString &title);
140 void writeConcepts(OutputList &ol,const QCString &title);
141 void writeModules(OutputList &ol,const QCString &title);
144 void writeDetailedDescription(OutputList &ol,const QCString &title);
152 void updateLanguage(const Definition *);
153 void setGroupTitleLocal( const QCString &title);
154
155 QCString m_title; // title of the group
156 QCString m_titleAsText; // title of the group in plain text
157 bool m_titleSet; // true if title is not the same as the name
158 QCString m_fileName; // base name of the generated file
159 FileList m_fileList; // list of files in the group
160 ClassLinkedRefMap m_classes; // list of classes in the group
161 ConceptLinkedRefMap m_concepts; // list of concepts in the group
162 ModuleLinkedRefMap m_modules; // list of modules in the group
163 NamespaceLinkedRefMap m_namespaces; // list of namespaces in the group
164 GroupList m_groups; // list of sub groups.
165 PageLinkedRefMap m_pages; // list of pages in the group
166 PageLinkedRefMap m_examples; // list of examples in the group
167 DirList m_dirList; // list of directories in the group
174 bool m_hasGroupGraph = false;
175
176};
177
178std::unique_ptr<GroupDef> createGroupDef(const QCString &fileName,int line,const QCString &name,
179 const QCString &title,const QCString &refFileName)
180{
181 return std::make_unique<GroupDefImpl>(fileName,line,name,title,refFileName);
182}
183
184
185//---------------------------------------------------------------------------
186
187GroupDefImpl::GroupDefImpl(const QCString &df,int dl,const QCString &na,const QCString &t,
188 const QCString &refFileName) : DefinitionMixin(df,dl,1,na),
190{
191 if (!refFileName.isEmpty())
192 {
193 m_fileName=stripExtension(refFileName);
194 }
195 else
196 {
197 m_fileName = convertNameToFile(QCString("group_")+na);
198 }
200
201 //visited = 0;
202 m_groupScope = nullptr;
203 m_subGrouping=Config_getBool(SUBGROUPING);
204 m_hasGroupGraph=Config_getBool(GROUP_GRAPHS);
205}
206
210
212{
213 if ( !t.isEmpty())
214 {
215 m_title = t;
216 m_titleAsText = parseCommentAsText(this,nullptr,t,docFile(),docLine());
218 }
219 else
220 {
221 m_title = name();
222 m_title[0]=static_cast<char>(toupper(m_title[0]));
225 }
226}
227
229{
231}
232
233
235{
236 for (const auto &mg : m_memberGroups)
237 {
238 mg->distributeMemberGroupDocumentation();
239 }
240}
241
243{
247
248 for (const auto &mg : m_memberGroups)
249 {
250 mg->findSectionsInDocumentation(this);
251 }
252
253 for (auto &ml : m_memberLists)
254 {
255 if (ml->listType().isDeclaration())
256 {
257 ml->findSectionsInDocumentation(this);
258 }
259 }
260}
261
263{
264 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
265 if (def->isHidden()) return;
266 updateLanguage(def);
267 if (sortBriefDocs)
268 m_fileList.insert( std::upper_bound( m_fileList.begin(), m_fileList.end(), def,
269 [](const auto &fd1, const auto &fd2)
270 { return qstricmp_sort(fd1->name(),fd2->name())<0; }),
271 def);
272 else
273 m_fileList.push_back(def);
274}
275
277{
278 return std::find(m_fileList.cbegin(),m_fileList.cend(), def) != m_fileList.cend();
279}
280
282{
283 if (cd->isHidden()) return FALSE;
284 updateLanguage(cd);
285 QCString qn = cd->name();
286 if (m_classes.find(qn)==nullptr)
287 {
288 m_classes.add(qn,cd);
289 return TRUE;
290 }
291 return FALSE;
292}
293
295{
296 if (cd->isHidden()) return FALSE;
297 QCString qn = cd->name();
298 if (m_concepts.find(qn)==nullptr)
299 {
300 m_concepts.add(qn,cd);
301 return TRUE;
302 }
303 return FALSE;
304}
305
307{
308 if (mod->isHidden()) return false;
309 QCString qn = mod->name();
310 if (m_modules.find(qn)==nullptr)
311 {
312 m_modules.add(qn,mod);
313 return true;
314 }
315 return false;
316}
317
319{
320 //printf("adding namespace hidden=%d\n",def->isHidden());
321 if (def->isHidden()) return false;
322 if (m_namespaces.find(def->name())==nullptr)
323 {
324 updateLanguage(def);
325 m_namespaces.add(def->name(),def);
326 return true;
327 }
328 return false;
329}
330
332{
333 if (def->isHidden()) return;
334 m_dirList.push_back(def);
335}
336
338{
339 if (def->isHidden()) return;
340 //printf("Making page %s part of a group\n",qPrint(def->name));
341 m_pages.add(def->name(),def);
342 def->makePartOfGroup(this);
343}
344
346{
347 if (def->isHidden()) return;
348 m_examples.add(def->name(),def);
349}
350
351
353{
354 for (auto &ml : m_memberLists)
355 {
356 if (ml->listType().isDeclaration())
357 {
359 }
360 }
361}
362
363
365{
366 if (md->isHidden()) return FALSE;
367 updateLanguage(md);
368 //printf("GroupDef(%s)::insertMember(%s)\n", qPrint(title), qPrint(md->name()));
370 for (auto &srcMi : *mni)
371 {
372 const MemberDef *srcMd = srcMi->memberDef();
373 if (srcMd==md) return FALSE; // already added before!
374
375 bool sameScope = srcMd->getOuterScope()==md->getOuterScope() || // same class or namespace
376 // both inside a file => definition and declaration do not have to be in the same file
379
380 const ArgumentList &srcMdAl = srcMd->argumentList();
381 const ArgumentList &mdAl = md->argumentList();
382 const ArgumentList &tSrcMdAl = srcMd->templateArguments();
383 const ArgumentList &tMdAl = md->templateArguments();
384
385 if (srcMd->isFunction() && md->isFunction() && // both are a function
386 (tSrcMdAl.size()==tMdAl.size()) && // same number of template arguments
387 matchArguments2(srcMd->getOuterScope(),srcMd->getFileDef(),srcMd->typeString(),&srcMdAl,
388 md->getOuterScope(), md->getFileDef(), md->typeString(),&mdAl,
389 TRUE,srcMd->getLanguage()
390 ) && // matching parameters
391 sameScope // both are found in the same scope
392 )
393 {
395 if (mdm && srcMd->getGroupAlias()==nullptr)
396 {
397 mdm->setGroupAlias(srcMd);
398 }
399 else if (mdm && md!=srcMd->getGroupAlias())
400 {
401 mdm->setGroupAlias(srcMd->getGroupAlias());
402 }
403 return FALSE; // member is the same as one that is already added
404 }
405 }
406 mni->push_back(std::make_unique<MemberInfo>(md,md->protection(),md->virtualness(),false,false));
407 //printf("Added member!\n");
408 m_allMemberList.push_back(md);
409 switch(md->memberType())
410 {
412 if (!docOnly)
413 {
414 addMemberToList(MemberListType::DecVarMembers(),md);
415 }
416 addMemberToList(MemberListType::DocVarMembers(),md);
417 break;
419 if (!docOnly)
420 {
421 addMemberToList(MemberListType::DecFuncMembers(),md);
422 }
423 addMemberToList(MemberListType::DocFuncMembers(),md);
424 break;
426 if (!docOnly)
427 {
428 addMemberToList(MemberListType::DecTypedefMembers(),md);
429 }
430 addMemberToList(MemberListType::DocTypedefMembers(),md);
431 break;
433 if (!docOnly)
434 {
435 addMemberToList(MemberListType::DecEnumMembers(),md);
436 }
437 addMemberToList(MemberListType::DocEnumMembers(),md);
438 break;
440 if (!docOnly)
441 {
442 addMemberToList(MemberListType::DecEnumValMembers(),md);
443 }
444 addMemberToList(MemberListType::DocEnumValMembers(),md);
445 break;
447 if (!docOnly)
448 {
449 addMemberToList(MemberListType::DecDefineMembers(),md);
450 }
451 addMemberToList(MemberListType::DocDefineMembers(),md);
452 break;
454 if (!docOnly)
455 {
456 addMemberToList(MemberListType::DecSignalMembers(),md);
457 }
458 addMemberToList(MemberListType::DocSignalMembers(),md);
459 break;
460 case MemberType::Slot:
461 if (md->protection()==Protection::Public)
462 {
463 if (!docOnly)
464 {
465 addMemberToList(MemberListType::DecPubSlotMembers(),md);
466 }
467 addMemberToList(MemberListType::DocPubSlotMembers(),md);
468 }
469 else if (md->protection()==Protection::Protected)
470 {
471 if (!docOnly)
472 {
473 addMemberToList(MemberListType::DecProSlotMembers(),md);
474 }
475 addMemberToList(MemberListType::DocProSlotMembers(),md);
476 }
477 else
478 {
479 if (!docOnly)
480 {
481 addMemberToList(MemberListType::DecPriSlotMembers(),md);
482 }
483 addMemberToList(MemberListType::DocPriSlotMembers(),md);
484 }
485 break;
487 if (!docOnly)
488 {
489 addMemberToList(MemberListType::DecEventMembers(),md);
490 }
491 addMemberToList(MemberListType::DocEventMembers(),md);
492 break;
494 if (!docOnly)
495 {
496 addMemberToList(MemberListType::DecPropMembers(),md);
497 }
498 addMemberToList(MemberListType::DocPropMembers(),md);
499 break;
501 if (!docOnly)
502 {
503 addMemberToList(MemberListType::DecFriendMembers(),md);
504 }
505 addMemberToList(MemberListType::DocFriendMembers(),md);
506 break;
507 default:
508 err("GroupDefImpl::insertMembers(): "
509 "member '{}' (typeid='{}') with scope '{}' inserted in group scope '{}'!\n",
510 md->name(),md->memberTypeName(),
511 md->getClassDef() ? md->getClassDef()->name() : "",
512 name());
513 }
514 return TRUE;
515}
516
518{
519 // fprintf(stderr, "GroupDef(%s)::removeMember( %s )\n", qPrint(title), qPrint(md->name()));
521 if (mni)
522 {
524
525 removeMemberFromList(MemberListType::AllMembersList(),md);
526 switch(md->memberType())
527 {
529 removeMemberFromList(MemberListType::DecVarMembers(),md);
530 removeMemberFromList(MemberListType::DocVarMembers(),md);
531 break;
533 removeMemberFromList(MemberListType::DecFuncMembers(),md);
534 removeMemberFromList(MemberListType::DocFuncMembers(),md);
535 break;
537 removeMemberFromList(MemberListType::DecTypedefMembers(),md);
538 removeMemberFromList(MemberListType::DocTypedefMembers(),md);
539 break;
541 removeMemberFromList(MemberListType::DecEnumMembers(),md);
542 removeMemberFromList(MemberListType::DocEnumMembers(),md);
543 break;
545 removeMemberFromList(MemberListType::DecEnumValMembers(),md);
546 removeMemberFromList(MemberListType::DocEnumValMembers(),md);
547 break;
549 removeMemberFromList(MemberListType::DecDefineMembers(),md);
550 removeMemberFromList(MemberListType::DocDefineMembers(),md);
551 break;
553 removeMemberFromList(MemberListType::DecSignalMembers(),md);
554 removeMemberFromList(MemberListType::DocSignalMembers(),md);
555 break;
556 case MemberType::Slot:
557 if (md->protection()==Protection::Public)
558 {
559 removeMemberFromList(MemberListType::DecPubSlotMembers(),md);
560 removeMemberFromList(MemberListType::DocPubSlotMembers(),md);
561 }
562 else if (md->protection()==Protection::Protected)
563 {
564 removeMemberFromList(MemberListType::DecProSlotMembers(),md);
565 removeMemberFromList(MemberListType::DocProSlotMembers(),md);
566 }
567 else
568 {
569 removeMemberFromList(MemberListType::DecPriSlotMembers(),md);
570 removeMemberFromList(MemberListType::DocPriSlotMembers(),md);
571 }
572 break;
574 removeMemberFromList(MemberListType::DecEventMembers(),md);
575 removeMemberFromList(MemberListType::DocEventMembers(),md);
576 break;
578 removeMemberFromList(MemberListType::DecPropMembers(),md);
579 removeMemberFromList(MemberListType::DocPropMembers(),md);
580 break;
582 removeMemberFromList(MemberListType::DecFriendMembers(),md);
583 removeMemberFromList(MemberListType::DocFriendMembers(),md);
584 break;
585 default:
586 err("GroupDefImpl::removeMember(): unexpected member remove in file!\n");
587 }
588 }
589}
590
591bool GroupDefImpl::findGroup(const GroupDef *def) const
592{
593 if (this==def)
594 {
595 return TRUE;
596 }
597 for (const auto &gd : m_groups)
598 {
599 if (gd->findGroup(def))
600 {
601 return TRUE;
602 }
603 }
604 return FALSE;
605}
606
608{
609 //printf("adding group '%s' to group '%s'\n",qPrint(def->name()),qPrint(name()));
610 //if (Config_getBool(SORT_MEMBER_DOCS))
611 // groupList->inSort(def);
612 //else
613 m_groups.push_back(def);
614}
615
617{
618 return !partOfGroups().empty();
619}
620
622{
623 for (auto &ml : m_memberLists)
624 {
625 ml->countDecMembers();
626 ml->countDocMembers();
627 }
628 for (const auto &mg : m_memberGroups)
629 {
630 mg->countDecMembers();
631 mg->countDocMembers();
632 }
633}
634
636{
637 return m_fileList.size()+
638 m_classes.size()+
639 m_namespaces.size()+
640 m_groups.size()+
641 m_allMemberList.size()+
642 m_pages.size()+
643 m_examples.size();
644}
645
646/*! Compute the HTML anchor names for all members in the group */
648{
649 //printf("GroupDefImpl::computeAnchors()\n");
650 m_allMemberList.setAnchors();
651}
652
654{
657 tagFile << " <compound kind=\"group\">\n";
658 tagFile << " <name>" << convertToXML(name()) << "</name>\n";
659 tagFile << " <title>" << convertToXML(m_titleAsText) << "</title>\n";
660 tagFile << " <filename>" << fn << "</filename>\n";
661 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Group))
662 {
663 switch (lde->kind())
664 {
665 case LayoutDocEntry::GroupClasses:
666 {
667 for (const auto &cd : m_classes)
668 {
669 if (cd->isLinkableInProject())
670 {
671 tagFile << " <class kind=\"" << cd->compoundTypeString()
672 << "\">" << convertToXML(cd->name()) << "</class>\n";
673 }
674 }
675 }
676 break;
677 case LayoutDocEntry::GroupConcepts:
678 {
679 for (const auto &cd : m_concepts)
680 {
681 if (cd->isLinkableInProject())
682 {
683 tagFile << " <concept>" << convertToXML(cd->name())
684 << "</concept>\n";
685 }
686 }
687 }
688 break;
689 case LayoutDocEntry::GroupModules:
690 {
691 for (const auto &mod : m_modules)
692 {
693 if (mod->isLinkableInProject())
694 {
695 tagFile << " <module>" << convertToXML(mod->name())
696 << "</module>\n";
697 }
698 }
699 }
700 break;
701 case LayoutDocEntry::GroupNamespaces:
702 {
703 for (const auto &nd : m_namespaces)
704 {
705 if (nd->isLinkableInProject())
706 {
707 tagFile << " <namespace>" << convertToXML(nd->name())
708 << "</namespace>\n";
709 }
710 }
711 }
712 break;
713 case LayoutDocEntry::GroupFiles:
714 {
715 for (const auto &fd : m_fileList)
716 {
717 if (fd->isLinkableInProject())
718 {
719 tagFile << " <file path=\""
720 << convertToXML(stripFromPath(fd->getPath())) << "\">"
721 << convertToXML(fd->name()) << "</file>\n";
722 }
723 }
724 }
725 break;
726 case LayoutDocEntry::GroupPageDocs:
727 {
728 for (const auto &pd : m_pages)
729 {
730 QCString pageName = pd->getOutputFileBase();
731 if (pd->isLinkableInProject())
732 {
733 tagFile << " <page>" << convertToXML(pageName) << "</page>\n";
734 }
735 }
736 }
737 break;
738 case LayoutDocEntry::GroupDirs:
739 {
740 for (const auto &dd : m_dirList)
741 {
742 if (dd->isLinkableInProject())
743 {
744 tagFile << " <dir>" << convertToXML(dd->displayName()) << "</dir>\n";
745 }
746 }
747 }
748 break;
749 case LayoutDocEntry::GroupNestedGroups:
750 {
751 for (const auto &gd : m_groups)
752 {
753 if (gd->isVisible())
754 {
755 tagFile << " <subgroup>" << convertToXML(gd->name()) << "</subgroup>\n";
756 }
757 }
758 }
759 break;
760 case LayoutDocEntry::MemberDecl:
761 {
762 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
763 if (lmd)
764 {
765 MemberList * ml = getMemberList(lmd->type);
766 if (ml)
767 {
768 ml->writeTagFile(tagFile,true);
769 }
770 }
771 }
772 break;
773 case LayoutDocEntry::MemberGroups:
774 {
775 for (const auto &mg : m_memberGroups)
776 {
777 mg->writeTagFile(tagFile,true);
778 }
779 }
780 break;
781 default:
782 break;
783 }
784 }
786 tagFile << " </compound>\n";
787}
788
790{
792 {
794 if (m_pages.size()!=numDocMembers()) // not only pages -> classical layout
795 {
798 ol.writeRuler();
802 ol.writeAnchor(QCString(),"details");
804 }
805 else
806 {
807 ol.disableAllBut(OutputType::Man); // always print title for man page
808 }
809 ol.startGroupHeader("details");
810 ol.parseText(title);
811 ol.endGroupHeader();
813
814 // repeat brief description
815 ol.startTextBlock();
816 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
817 {
819 briefLine(),
820 this,
821 nullptr,
823 DocOptions());
824 }
825 // write separator between brief and details
826 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
827 !documentation().isEmpty())
828 {
832 ol.enableAll();
835 ol.writeString("\n\n");
837 }
838
839 // write detailed documentation
840 if (!documentation().isEmpty())
841 {
842 ol.generateDoc(docFile(),
843 docLine(),
844 this,
845 nullptr,
846 documentation()+"\n",
847 DocOptions()
848 .setIndexWords(true));
849 }
850
851 // write inbody documentation
852 if (!inbodyDocumentation().isEmpty())
853 {
855 inbodyLine(),
856 this,
857 nullptr,
858 inbodyDocumentation()+"\n",
859 DocOptions()
860 .setIndexWords(true));
861 }
863 ol.endTextBlock();
864 }
865}
866
868{
870 {
871 auto parser { createDocParser() };
872 auto ast { validatingParseDoc(*parser.get(),
873 briefFile(),
874 briefLine(),
875 this,
876 nullptr,
878 DocOptions()
879 .setIndexWords(true)
880 .setSingleLine(true))
881 };
882 if (!ast->isEmpty())
883 {
884 ol.startParagraph();
887 ol.writeString(" - ");
889 ol.writeDoc(ast.get(),this,nullptr);
892 ol.writeString(" \n");
894
895 if (hasDetailedDescription() && m_pages.size()!=numDocMembers()) // group with non-page members
896 {
898 ol.startTextLink(QCString(),"details");
899 ol.parseText(theTranslator->trMore());
900 ol.endTextLink();
901 }
903 ol.endParagraph();
904 }
905 }
906 ol.writeSynopsis();
907}
908
910{
911 if (Config_getBool(HAVE_DOT) && m_hasGroupGraph /*&& Config_getBool(GROUP_GRAPHS)*/)
912 {
913 DotGroupCollaboration graph(this);
914 if (graph.isTooBig())
915 {
916 warn_uncond("Group dependency graph for '{}' not generated, too many nodes ({}), threshold is {}. Consider increasing DOT_GRAPH_MAX_NODES.\n",
917 name(), graph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
918 }
919 else if (!graph.isTrivial())
920 {
921 msg("Generating dependency graph for group {}\n",qualifiedName());
924 //ol.startParagraph();
926 ol.parseText(theTranslator->trCollaborationDiagram(m_title));
927 ol.endGroupCollaboration(graph);
928 //ol.endParagraph();
930 }
931 }
932}
933
935{
936 // write list of files
937 if (!m_fileList.empty())
938 {
939 ol.startMemberHeader("files");
940 ol.parseText(title);
941 ol.endMemberHeader();
942 ol.startMemberList();
943 for (const auto &fd : m_fileList)
944 {
945 if (!fd->hasDocumentation()) continue;
947 QCString anc = fd->anchor();
948 if (anc.isEmpty()) anc=fd->docName(); else anc.prepend(fd->docName()+"_");
950 ol.docify(theTranslator->trFile(FALSE,TRUE)+" ");
952 ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fd->docName());
954 if (!fd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
955 {
956 ol.startMemberDescription(fd->getOutputFileBase());
958 briefLine(),
959 fd,
960 nullptr,
961 fd->briefDescription(),
962 DocOptions()
963 .setSingleLine(true));
965 }
967 }
968 ol.endMemberList();
969 }
970}
971
973{
974 // write list of namespaces
975 m_namespaces.writeDeclaration(ol,title);
976}
977
979{
980 // write list of groups
981 int count=0;
982 for (const auto &gd : m_groups)
983 {
984 if (gd->isVisible()) count++;
985 }
986 if (count>0)
987 {
988 ol.startMemberHeader("groups");
989 ol.parseText(title);
990 ol.endMemberHeader();
991 ol.startMemberList();
992 for (const auto &gd : m_groups)
993 {
994 if (gd->isVisible())
995 {
996 if (!gd->hasDocumentation()) continue;
998 QCString anc = gd->anchor();
999 if (anc.isEmpty()) anc=gd->name(); else anc.prepend(gd->name()+"_");
1001 ol.insertMemberAlign();
1002 ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),QCString(),gd->groupTitleAsText());
1004 if (!gd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
1005 {
1006 ol.startMemberDescription(gd->getOutputFileBase());
1008 briefLine(),
1009 gd,
1010 nullptr,
1011 gd->briefDescription(),
1012 DocOptions()
1013 .setSingleLine(true));
1015 }
1017 }
1018 }
1019 ol.endMemberList();
1020 }
1021}
1022
1024{
1025 // write list of directories
1026 if (!m_dirList.empty())
1027 {
1028 ol.startMemberHeader("dirs");
1029 ol.parseText(title);
1030 ol.endMemberHeader();
1031 ol.startMemberList();
1032 for(const auto dd : m_dirList)
1033 {
1034 if (!dd->hasDocumentation()) continue;
1036 QCString anc = dd->anchor();
1037 if (anc.isEmpty()) anc=dd->shortName(); else anc.prepend(dd->shortName()+"_");
1039 ol.parseText(theTranslator->trDir(FALSE,TRUE));
1040 ol.insertMemberAlign();
1041 ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),QCString(),dd->shortName());
1043 if (!dd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
1044 {
1045 ol.startMemberDescription(dd->getOutputFileBase());
1047 briefLine(),
1048 dd,
1049 nullptr,
1050 dd->briefDescription(),
1051 DocOptions()
1052 .setSingleLine(true));
1054 }
1056 }
1057
1058 ol.endMemberList();
1059 }
1060}
1061
1063{
1064 // write list of classes
1065 m_classes.writeDeclaration(ol,nullptr,title,FALSE);
1066}
1067
1069{
1070 // write list of concepts
1071 m_concepts.writeDeclaration(ol,title,FALSE);
1072}
1073
1075{
1076 // write list of modules
1077 m_modules.writeDeclaration(ol,title,FALSE);
1078}
1079
1080
1082{
1083 m_classes.writeDocumentation(ol);
1084}
1085
1087{
1088 for (const auto *pd : m_pages)
1089 {
1090 if (!pd->isReference())
1091 {
1092 const SectionInfo *si=nullptr;
1093 if (pd->hasTitle() && !pd->name().isEmpty() &&
1094 (si=SectionManager::instance().find(pd->name()))!=nullptr)
1095 {
1097 ol.docify(si->title());
1099 }
1100 ol.startTextBlock();
1101 ol.generateDoc(pd->docFile(),
1102 pd->docLine(),
1103 pd,
1104 nullptr,
1105 (pd->documentation()+pd->inbodyDocumentation()),
1106 DocOptions()
1107 .setIndexWords(true));
1108 ol.endTextBlock();
1109 }
1110 }
1111}
1112
1114{
1115 /* write user defined member groups */
1116 for (const auto &mg : m_memberGroups)
1117 {
1118 mg->writeDeclarations(ol,nullptr,nullptr,nullptr,this,nullptr);
1119 }
1120}
1121
1126
1131
1133{
1134 //printf("** GroupDefImpl::startMemberDocumentation()\n");
1135 if (Config_getBool(SEPARATE_MEMBER_PAGES))
1136 {
1137 ol.pushGeneratorState();
1140 }
1141}
1142
1144{
1145 //printf("** GroupDefImpl::endMemberDocumentation()\n");
1146 if (Config_getBool(SEPARATE_MEMBER_PAGES))
1147 {
1148 ol.popGeneratorState();
1150 }
1151}
1152
1154{
1155 // write Author section (Man only)
1156 ol.pushGeneratorState();
1158 ol.startGroupHeader();
1159 ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
1160 ol.endGroupHeader();
1161 ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString(PROJECT_NAME)));
1162 ol.popGeneratorState();
1163}
1164
1166{
1167 ol.pushGeneratorState();
1169 bool first=TRUE;
1170 SrcLangExt lang = getLanguage();
1171 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Group))
1172 {
1173 if ((lde->kind()==LayoutDocEntry::GroupClasses && m_classes.declVisible()) ||
1174 (lde->kind()==LayoutDocEntry::GroupConcepts && m_concepts.declVisible()) ||
1175 (lde->kind()==LayoutDocEntry::GroupModules && m_modules.declVisible()) ||
1176 (lde->kind()==LayoutDocEntry::GroupNamespaces && m_namespaces.declVisible(false)) ||
1177 (lde->kind()==LayoutDocEntry::GroupFiles && !m_fileList.empty()) ||
1178 (lde->kind()==LayoutDocEntry::GroupNestedGroups && !m_groups.empty()) ||
1179 (lde->kind()==LayoutDocEntry::GroupDirs && !m_dirList.empty())
1180 )
1181 {
1182 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
1183 if (ls)
1184 {
1185 QCString label = lde->kind()==LayoutDocEntry::GroupClasses ? "nested-classes" :
1186 lde->kind()==LayoutDocEntry::GroupConcepts ? "concepts" :
1187 lde->kind()==LayoutDocEntry::GroupModules ? "modules" :
1188 lde->kind()==LayoutDocEntry::GroupNamespaces ? "namespaces" :
1189 lde->kind()==LayoutDocEntry::GroupFiles ? "files" :
1190 lde->kind()==LayoutDocEntry::GroupNestedGroups ? "groups" :
1191 "dirs";
1192 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
1193 first=FALSE;
1194 }
1195 }
1196 else if (lde->kind()==LayoutDocEntry::MemberDecl)
1197 {
1198 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1199 if (lmd)
1200 {
1201 MemberList * ml = getMemberList(lmd->type);
1202 if (ml && ml->declVisible())
1203 {
1204 ol.writeSummaryLink(QCString(),ml->listType().toLabel(),lmd->title(lang),first);
1205 first=FALSE;
1206 }
1207 }
1208 }
1209 }
1210 if (!first)
1211 {
1212 ol.writeString(" </div>\n");
1213 }
1214 ol.popGeneratorState();
1215}
1216
1221
1223{
1224 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
1225 ol.pushGeneratorState();
1226
1227 // Find out how deep this group is nested. In case of multiple parents, use the first one.
1228 int hierarchyLevel = 0;
1229 const GroupDef *gd = this;
1230 while (!gd->partOfGroups().empty())
1231 {
1232 gd = gd->partOfGroups().front();
1233 ++hierarchyLevel;
1234 }
1235
1237 FALSE /* additionalIndices*/, QCString() /*altSidebarName*/, hierarchyLevel);
1238
1239 ol.startHeaderSection();
1240 bool writeOutlinePanel = generateTreeView && Config_getBool(PAGE_OUTLINE_PANEL);
1241 if (!writeOutlinePanel) writeSummaryLinks(ol);
1243 //1.{
1244 ol.pushGeneratorState();
1246 ol.generateDoc(docFile(),
1248 this,
1249 nullptr,
1250 m_title,
1251 DocOptions()
1252 .setIndexWords(true)
1253 .setSingleLine(true)
1254 .setAutolinkSupport(false));
1255 ol.popGeneratorState();
1256 //1.}
1257 addGroupListToTitle(ol,this);
1258 //2.{
1259 ol.pushGeneratorState();
1262 ol.popGeneratorState();
1263 //2.}
1264 //3.{
1265 ol.pushGeneratorState();
1268 if (!m_titleAsText.isEmpty())
1269 {
1270 ol.writeString(" - ");
1272 }
1273 ol.popGeneratorState();
1274 //3.}
1275 ol.endHeaderSection();
1276 ol.startContents();
1277
1278 //---------------------------------------- start flexible part -------------------------------
1279
1280 SrcLangExt lang=getLanguage();
1281 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Group))
1282 {
1283 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
1284 switch (lde->kind())
1285 {
1286 case LayoutDocEntry::BriefDesc:
1288 break;
1289 case LayoutDocEntry::MemberDeclStart:
1291 break;
1292 case LayoutDocEntry::GroupClasses:
1293 if (ls) writeClasses(ol,ls->title(lang));
1294 break;
1295 case LayoutDocEntry::GroupConcepts:
1296 if (ls) writeConcepts(ol,ls->title(lang));
1297 break;
1298 case LayoutDocEntry::GroupModules:
1299 if (ls) writeModules(ol,ls->title(lang));
1300 break;
1301 case LayoutDocEntry::GroupInlineClasses:
1303 break;
1304 case LayoutDocEntry::GroupNamespaces:
1305 if (ls) writeNamespaces(ol,ls->title(lang));
1306 break;
1307 case LayoutDocEntry::MemberGroups:
1309 break;
1310 case LayoutDocEntry::MemberDecl:
1311 {
1312 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1313 if (lmd)
1314 {
1315 writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
1316 }
1317 }
1318 break;
1319 case LayoutDocEntry::MemberDeclEnd:
1321 break;
1322 case LayoutDocEntry::DetailedDesc:
1323 if (ls) writeDetailedDescription(ol,ls->title(lang));
1324 break;
1325 case LayoutDocEntry::MemberDefStart:
1327 break;
1328 case LayoutDocEntry::MemberDef:
1329 {
1330 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1331 if (lmd)
1332 {
1333 writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
1334 }
1335 }
1336 break;
1337 case LayoutDocEntry::MemberDefEnd:
1339 break;
1340 case LayoutDocEntry::GroupNestedGroups:
1341 if (ls) writeNestedGroups(ol,ls->title(lang));
1342 break;
1343 case LayoutDocEntry::GroupPageDocs:
1345 break;
1346 case LayoutDocEntry::GroupDirs:
1347 if (ls) writeDirs(ol,ls->title(lang));
1348 break;
1349 case LayoutDocEntry::GroupFiles:
1350 if (ls) writeFiles(ol,ls->title(lang));
1351 break;
1352 case LayoutDocEntry::GroupGraph:
1353 writeGroupGraph(ol);
1354 break;
1355 case LayoutDocEntry::AuthorSection:
1357 break;
1358 case LayoutDocEntry::ClassIncludes:
1359 case LayoutDocEntry::ClassInheritanceGraph:
1360 case LayoutDocEntry::ClassNestedClasses:
1361 case LayoutDocEntry::ClassCollaborationGraph:
1362 case LayoutDocEntry::ClassAllMembersLink:
1363 case LayoutDocEntry::ClassUsedFiles:
1364 case LayoutDocEntry::ClassInlineClasses:
1365 case LayoutDocEntry::NamespaceNestedNamespaces:
1366 case LayoutDocEntry::NamespaceNestedConstantGroups:
1367 case LayoutDocEntry::NamespaceClasses:
1368 case LayoutDocEntry::NamespaceConcepts:
1369 case LayoutDocEntry::NamespaceInterfaces:
1370 case LayoutDocEntry::NamespaceStructs:
1371 case LayoutDocEntry::NamespaceExceptions:
1372 case LayoutDocEntry::NamespaceInlineClasses:
1373 case LayoutDocEntry::ConceptDefinition:
1374 case LayoutDocEntry::FileClasses:
1375 case LayoutDocEntry::FileConcepts:
1376 case LayoutDocEntry::FileInterfaces:
1377 case LayoutDocEntry::FileStructs:
1378 case LayoutDocEntry::FileExceptions:
1379 case LayoutDocEntry::FileNamespaces:
1380 case LayoutDocEntry::FileConstantGroups:
1381 case LayoutDocEntry::FileIncludes:
1382 case LayoutDocEntry::FileIncludeGraph:
1383 case LayoutDocEntry::FileIncludedByGraph:
1384 case LayoutDocEntry::FileSourceLink:
1385 case LayoutDocEntry::FileInlineClasses:
1386 case LayoutDocEntry::ModuleExports:
1387 case LayoutDocEntry::ModuleClasses:
1388 case LayoutDocEntry::ModuleConcepts:
1389 case LayoutDocEntry::ModuleUsedFiles:
1390 case LayoutDocEntry::DirSubDirs:
1391 case LayoutDocEntry::DirFiles:
1392 case LayoutDocEntry::DirGraph:
1393 err("Internal inconsistency: member '{}' should not be part of "
1394 "LayoutDocManager::Group entry list\n",lde->entryToString());
1395 break;
1396 }
1397 }
1398
1399 //---------------------------------------- end flexible part -------------------------------
1400
1401 for (auto &subgd : getSubGroups())
1402 {
1403 if (!subgd->isReference())
1404 {
1405 if (subgd->partOfGroups().front() == this)
1406 {
1407 ol.writePageLink(subgd->getOutputFileBase(), FALSE);
1408 }
1409 else
1410 {
1411 // Could write a note explaining that the subgroup belongs to another
1412 // group and add a link here.
1413 }
1414 }
1415 }
1416 if (generateTreeView && Config_getBool(PAGE_OUTLINE_PANEL))
1417 {
1418 ol.pushGeneratorState();
1420 ol.endContents();
1421 ol.writeString("</div><!-- doc-content -->\n");
1423 ol.writeString("</div><!-- container -->\n");
1424 ol.popGeneratorState();
1425 endFile(ol,true,true);
1426 }
1427 else
1428 {
1429 endFile(ol);
1430 }
1431
1432 ol.popGeneratorState();
1433
1434 if (Config_getBool(SEPARATE_MEMBER_PAGES))
1435 {
1436 m_allMemberList.sort();
1437 writeMemberPages(ol, hierarchyLevel + 1);
1438 }
1439}
1440
1441void GroupDefImpl::writeMemberPages(OutputList &ol, int hierarchyLevel)
1442{
1443 ol.pushGeneratorState();
1445
1446 for (const auto &ml : m_memberLists)
1447 {
1448 if (ml->listType().isDocumentation())
1449 {
1450 ml->writeDocumentationPage(ol,name(),this,hierarchyLevel);
1451 }
1452 }
1453
1454 ol.popGeneratorState();
1455}
1456
1458{
1459 bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
1460
1461 ol.writeString(" <div class=\"navtab\">\n");
1462 ol.writeString(" <table>\n");
1463
1464 for (const auto *md : m_allMemberList)
1465 {
1466 if (md->getGroupDef()==this && md->isLinkable() && !md->isEnumValue())
1467 {
1468 if (md->isLinkableInProject())
1469 {
1470 QCString fn = md->getOutputFileBase();
1472 if (md==currentMd) // selected item => highlight
1473 {
1474 ol.writeString(" <tr><td class=\"navtabHL\">");
1475 }
1476 else
1477 {
1478 ol.writeString(" <tr><td class=\"navtab\">");
1479 }
1480 ol.writeString("<span class=\"label\"><a ");
1481 ol.writeString("href=\"");
1482 if (createSubDirs) ol.writeString("../../");
1483 ol.writeString(fn+"#"+md->anchor());
1484 ol.writeString("\">");
1485 ol.writeString(convertToHtml(md->localName()));
1486 ol.writeString("</a></span>");
1487 ol.writeString("</td></tr>\n");
1488 }
1489 }
1490 }
1491 ol.writeString(" </table>\n");
1492 ol.writeString(" </div>\n");
1493}
1494
1495
1496
1497//---- helper functions ------------------------------------------------------
1498
1499void addClassToGroups(const Entry *root,ClassDef *cd)
1500{
1501 for (const Grouping &g : root->groups)
1502 {
1503 GroupDef *gd=nullptr;
1504 if (!g.groupname.isEmpty()) gd=Doxygen::groupLinkedMap->find(g.groupname);
1505 if (gd && gd->addClass(cd))
1506 {
1508 if (cdm)
1509 {
1510 cdm->makePartOfGroup(gd);
1511 }
1512 //printf("Compound %s: in group %s\n",qPrint(cd->name()),gd->groupTitle());
1513 }
1514 else if (!gd && g.pri == Grouping::GROUPING_INGROUP)
1515 {
1516 warn(root->fileName, root->startLine,
1517 "Found non-existing group '{}' for the command '{}', ignoring command",
1519 );
1520 }
1521 }
1522}
1523
1525{
1526 for (const Grouping &g : root->groups)
1527 {
1529 if (gd && gd->addConcept(cd))
1530 {
1532 if (cdm)
1533 {
1534 cdm->makePartOfGroup(gd);
1535 }
1536 //printf("Compound %s: in group %s\n",qPrint(cd->name()),gd->groupTitle());
1537 }
1538 else if (!gd && g.pri == Grouping::GROUPING_INGROUP)
1539 {
1540 warn(root->fileName, root->startLine,
1541 "Found non-existing group '{}' for the command '{}', ignoring command",
1543 );
1544 }
1545 }
1546}
1547
1548void addModuleToGroups(const Entry *root,ModuleDef *mod)
1549{
1550 for (const Grouping &g : root->groups)
1551 {
1553 if (gd && gd->addModule(mod))
1554 {
1555 mod->makePartOfGroup(gd);
1556 //printf("Module %s: in group %s\n",qPrint(mod->name()),gd->groupTitle());
1557 }
1558 else if (!gd && g.pri == Grouping::GROUPING_INGROUP)
1559 {
1560 warn(root->fileName, root->startLine,
1561 "Found non-existing group '{}' for the command '{}', ignoring command",
1563 );
1564 }
1565 }
1566}
1567
1568
1570{
1571 //printf("root->groups.size()=%zu\n",root->groups.size());
1572 for (const Grouping &g : root->groups)
1573 {
1574 GroupDef *gd=nullptr;
1575 if (!g.groupname.isEmpty()) gd=Doxygen::groupLinkedMap->find(g.groupname);
1576 //printf("group '%s' gd=%p\n",qPrint(g.groupname),(void*)gd);
1577 if (gd && gd->addNamespace(nd))
1578 {
1580 if (ndm)
1581 {
1582 ndm->makePartOfGroup(gd);
1583 }
1584 //printf("Namespace %s: in group %s\n",qPrint(nd->name()),qPrint(gd->name()));
1585 }
1586 else if (!gd && g.pri == Grouping::GROUPING_INGROUP)
1587 {
1588 warn(root->fileName, root->startLine,
1589 "Found non-existing group '{}' for the command '{}', ignoring command",
1591 );
1592 }
1593 }
1594}
1595
1596void addDirToGroups(const Entry *root,DirDef *dd)
1597{
1598 //printf("*** root->groups.size()=%d\n",root->groups.size());
1599 for (const Grouping &g : root->groups)
1600 {
1602 //printf("group '%s'\n",qPrint(g->groupname));
1603 if (gd)
1604 {
1605 gd->addDir(dd);
1606 dd->makePartOfGroup(gd);
1607 //printf("Dir %s: in group %s\n",qPrint(dd->name()),qPrint(g->groupname));
1608 }
1609 else if (!gd && g.pri == Grouping::GROUPING_INGROUP)
1610 {
1611 warn(root->fileName, root->startLine,
1612 "Found non-existing group '{}' for the command '{}', ignoring command",
1614 );
1615 }
1616 }
1617}
1618
1619void addGroupToGroups(const Entry *root,GroupDef *subGroup)
1620{
1621 //printf("addGroupToGroups for %s groups=%d\n",qPrint(root->name),root->groups.size());
1622 for (const Grouping &g : root->groups)
1623 {
1625 if (gd)
1626 {
1627 if (gd==subGroup)
1628 {
1629 warn(root->fileName,root->startLine,"Refusing to add group {} to itself",
1630 gd->name());
1631 }
1632 else if (subGroup->findGroup(gd))
1633 {
1634 warn(root->fileName,root->startLine,"Refusing to add group {} to group {}, since the latter is already a "
1635 "subgroup of the former", subGroup->name(),gd->name());
1636 }
1637 else if (!gd->findGroup(subGroup))
1638 {
1639 gd->addGroup(subGroup);
1640 subGroup->makePartOfGroup(gd);
1641 }
1642 }
1643 else if (!gd && g.pri == Grouping::GROUPING_INGROUP)
1644 {
1645 warn(root->fileName, root->startLine,
1646 "Found non-existing group '{}' for the command '{}', ignoring command",
1648 );
1649 }
1650 }
1651}
1652
1653/*! Add a member to the group with the highest priority */
1654void addMemberToGroups(const Entry *root,MemberDef *md)
1655{
1656 //printf("addMemberToGroups: Root %p = %s, md %p=%s groups=%zu\n",
1657 // root, qPrint(root->name), md, qPrint(md->name()), root->groups.size() );
1658
1659 // Search entry's group list for group with highest pri.
1661 GroupDef *fgd=nullptr;
1662 for (const Grouping &g : root->groups)
1663 {
1664 GroupDef *gd=nullptr;
1665 if (!g.groupname.isEmpty()) gd=Doxygen::groupLinkedMap->find(g.groupname);
1666 if (gd && g.pri >= pri)
1667 {
1668 if (fgd && gd!=fgd && g.pri==pri)
1669 {
1670 warn(root->fileName, root->startLine,
1671 "Member {} found in multiple {} groups! "
1672 "The member will be put in group {}, and not in group {}",
1673 md->name(), Grouping::getGroupPriName( pri ),
1674 gd->name(), fgd->name()
1675 );
1676 }
1677
1678 fgd = gd;
1679 pri = g.pri;
1680 }
1681 else if (!gd && g.pri == Grouping::GROUPING_INGROUP)
1682 {
1683 warn(root->fileName, root->startLine,
1684 "Found non-existing group '{}' for the command '{}', ignoring command",
1686 );
1687 }
1688 }
1689 //printf("fgd=%p\n",fgd);
1690
1691 // put member into group defined by this entry?
1692 if (fgd)
1693 {
1694 GroupDef *mgd = md->getGroupDef();
1695 //printf("mgd=%p\n",mgd);
1696 bool insertit = FALSE;
1697 if (mgd==nullptr)
1698 {
1699 insertit = TRUE;
1700 }
1701 else if (mgd!=fgd)
1702 {
1703 bool moveit = FALSE;
1704
1705 // move member from one group to another if
1706 // - the new one has a higher priority
1707 // - the new entry has the same priority, but with docs where the old one had no docs
1708 if (md->getGroupPri()<pri)
1709 {
1710 moveit = TRUE;
1711 }
1712 else
1713 {
1714 if (md->getGroupPri()==pri)
1715 {
1716 if (!root->doc.isEmpty() && !md->getGroupHasDocs())
1717 {
1718 moveit = TRUE;
1719 }
1720 else if (!root->doc.isEmpty() && md->getGroupHasDocs())
1721 {
1723 "Member documentation for {} found several times in {} groups!\n"
1724 "{}:{}: The member will remain in group {}, and won't be put into group {}",
1725 md->name(), Grouping::getGroupPriName( pri ),
1726 root->fileName, root->startLine,
1727 mgd->name(), fgd->name()
1728 );
1729 }
1730 }
1731 }
1732
1733 if (moveit)
1734 {
1735 //printf("removeMember\n");
1736 mgd->removeMember(md);
1737 insertit = TRUE;
1738 }
1739 }
1740
1741 if (insertit)
1742 {
1743 //printf("insertMember found at %s line %d: %s: related %s\n",
1744 // qPrint(md->getDefFileName()),md->getDefLine(),
1745 // qPrint(md->name()),qPrint(root->relates));
1746 bool success = fgd->insertMember(md);
1747 if (success)
1748 {
1750 if (mdm)
1751 {
1752 //printf("insertMember successful\n");
1753 mdm->setGroupDef(fgd,pri,root->fileName,root->startLine,!root->doc.isEmpty());
1755 if (cdm)
1756 {
1757 cdm->setGroupDefForAllMembers(fgd,pri,root->fileName,root->startLine,root->doc.length() != 0);
1758 }
1759 if (mdm->isEnumerate() && mdm->getGroupDef() && md->isStrong())
1760 {
1761 for (const auto &emd : mdm->enumFieldList())
1762 {
1764 if (emdm && emdm->getGroupDef()==nullptr)
1765 {
1766 emdm->setGroupDef(mdm->getGroupDef(),mdm->getGroupPri(),
1767 mdm->getGroupFileName(),mdm->getGroupStartLine(),
1768 mdm->getGroupHasDocs());
1769 }
1770 }
1771 }
1772 }
1773 }
1774 }
1775 }
1776}
1777
1778
1779void addExampleToGroups(const Entry *root,PageDef *eg)
1780{
1781 for (const Grouping &g : root->groups)
1782 {
1784 if (gd)
1785 {
1786 gd->addExample(eg);
1787 eg->makePartOfGroup(gd);
1788 //printf("Example %s: in group %s\n",qPrint(eg->name()),s->data());
1789 }
1790 else if (!gd && g.pri == Grouping::GROUPING_INGROUP)
1791 {
1792 warn(root->fileName, root->startLine,
1793 "Found non-existing group '{}' for the command '{}', ignoring command",
1795 );
1796 }
1797 }
1798}
1799
1801{
1802 return m_fileName;
1803}
1804
1806{
1809 theTranslator->trGroup(TRUE,TRUE),
1811 QCString(),
1812 nullptr
1813 );
1814 for (const auto &mg : m_memberGroups)
1815 {
1816 mg->addListReferences(this);
1817 }
1818 for (auto &ml : m_memberLists)
1819 {
1820 if (ml->listType().isDocumentation())
1821 {
1822 ml->addListReferences(this);
1823 }
1824 }
1825}
1826
1828{
1830 for (const auto &mg : m_memberGroups)
1831 {
1832 mg->addRequirementReferences(this);
1833 }
1834 for (auto &ml : m_memberLists)
1835 {
1836 if (ml->listType().isDocumentation())
1837 {
1838 ml->addRequirementReferences(this);
1839 }
1840 }
1841}
1842
1844{
1845 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
1846 bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
1847 const auto &ml = m_memberLists.get(lt,MemberListContainer::Group);
1848 ml->setNeedsSorting(
1849 (ml->listType().isDeclaration() && sortBriefDocs) ||
1850 (ml->listType().isDocumentation() && sortMemberDocs));
1851 ml->push_back(md);
1852}
1853
1854// performs a partial reordering to group elements together with the same scope
1855template<class Vec>
1856static void groupClassesWithSameScope(Vec &vec)
1857{
1858 bool done=false;
1859 while (!done) // for each iteration
1860 {
1861 done=true;
1862 for (size_t i=0; i<vec.size(); i++) // go through all items
1863 {
1864 std::string qni = vec[i]->name().str();
1865 size_t posi = qni.rfind("::");
1866 if (posi!=std::string::npos)
1867 {
1868 std::string scope = qni.substr(0,posi);
1869 auto it = std::find_if( vec.begin(), vec.end(),
1870 [&](typename Vec::Ptr &cd)
1871 { return cd->name().str()==scope; });
1872 if (it!=vec.end())
1873 {
1874 size_t idx = std::distance(vec.begin(),it);
1875 if (i<idx) // parent scope located after child scope
1876 {
1877 // to avoid reordering elements with the same parent
1878 // we skip to the last one with the same scope
1879 size_t k = idx;
1880 while (k<vec.size() && vec[k]->name().str().substr(0,posi)==scope)
1881 {
1882 idx = k;
1883 k++;
1884 }
1885 // swap the items such that i is inserted after idx
1886 for (size_t j=i; j<idx; j++)
1887 {
1888 std::swap(vec[j],vec[j+1]);
1889 }
1890 done=false;
1891 }
1892 else if (idx<i && vec[i-1]->name().str().substr(0,posi)!=scope)
1893 {
1894 // parent scope is found before the item, and the item
1895 // has some other item with a different scope in front of it
1896 // move idx to the end of range with the same scope
1897 while (idx<i && vec[idx]->name().str().substr(0,posi)==scope)
1898 {
1899 idx++;
1900 }
1901 // swap the items such that i is just after idx
1902 for (size_t j=idx; j<i; j++)
1903 {
1904 std::swap(vec[j],vec[j+1]);
1905 }
1906 done=false;
1907 }
1908 }
1909 }
1910 }
1911 }
1912}
1913
1915{
1916 for (auto &ml : m_memberLists)
1917 {
1918 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
1919 }
1920 if (Config_getBool(SORT_BRIEF_DOCS))
1921 {
1922 std::stable_sort(m_dirList.begin(), m_dirList.end(), compareDirDefs);
1923
1924 auto classComp = [](const ClassLinkedRefMap::Ptr &c1,const ClassLinkedRefMap::Ptr &c2)
1925 {
1926 return Config_getBool(SORT_BY_SCOPE_NAME) ?
1927 qstricmp_sort(c1->name(), c2->name())<0 :
1928 qstricmp_sort(c1->className(), c2->className())<0;
1929 };
1930 std::stable_sort(m_classes.begin(), m_classes.end(), classComp);
1931
1932 auto namespaceComp = [](const NamespaceLinkedRefMap::Ptr &n1,const NamespaceLinkedRefMap::Ptr &n2)
1933 {
1934 return qstricmp_sort(n1->name(),n2->name())<0;
1935 };
1936
1937 std::stable_sort(m_namespaces.begin(),m_namespaces.end(),namespaceComp);
1938
1939 auto moduleComp = [](const ModuleLinkedRefMap::Ptr &m1,const ModuleLinkedRefMap::Ptr &m2)
1940 {
1941 return qstricmp_sort(m1->name(),m2->name())<0;
1942 };
1943
1944 std::stable_sort(m_modules.begin(), m_modules.end(), moduleComp);
1945
1946 auto conceptComp = [](const ConceptLinkedRefMap::Ptr &c1,const ConceptLinkedRefMap::Ptr &c2)
1947 {
1948 return qstricmp_sort(c1->name(),c2->name())<0;
1949 };
1950
1951 std::stable_sort(m_concepts.begin(), m_concepts.end(), conceptComp);
1952
1953 std::stable_sort(m_dirList.begin(), m_dirList.end(), compareDirDefs);
1954 std::stable_sort(m_fileList.begin(), m_fileList.end(), compareFileDefs);
1955
1956 }
1957 else
1958 {
1961 }
1962}
1963
1965{
1966 for (auto &ml : m_memberLists)
1967 {
1968 if (ml->listType()==lt)
1969 {
1970 return ml.get();
1971 }
1972 }
1973 return nullptr;
1974}
1975
1977{
1978 bool optimizeVhdl = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
1979
1980 MemberList * ml = getMemberList(lt);
1981 if (optimizeVhdl && ml)
1982 {
1983 VhdlDocGen::writeVhdlDeclarations(ml,ol,this,nullptr,nullptr,nullptr,nullptr);
1984 return;
1985 }
1986 if (ml)
1987 {
1988 ml->writeDeclarations(ol,nullptr,nullptr,nullptr,this,nullptr,title,QCString());
1989 }
1990}
1991
1993{
1994 MemberList * ml = getMemberList(lt);
1995 if (ml) ml->writeDocumentation(ol,name(),this,title,ml->listType().toLabel());
1996}
1997
1999{
2000 MemberList *ml = getMemberList(lt);
2001 if (ml) ml->remove(md);
2002}
2003
2005{
2006 std::stable_sort(m_groups.begin(),
2007 m_groups.end(),
2008 [](const auto &g1,const auto &g2)
2009 { return g1->groupTitle() < g2->groupTitle(); });
2010}
2011
2012static bool hasNonReferenceNestedGroupRec(const GroupDef *gd,int level)
2013{
2014 if (level>30)
2015 {
2016 err("Possible recursive group relation while inside {}\n",gd->name());
2017 return false;
2018 }
2019 bool found=gd->isLinkableInProject();
2020 if (found)
2021 {
2022 return true;
2023 }
2024 else
2025 {
2026 for (const auto &igd : gd->getSubGroups())
2027 {
2028 found = found || hasNonReferenceNestedGroupRec(igd,level+1);
2029 if (found) break;
2030 }
2031 }
2032 return found;
2033}
2034
2036{
2037 bool allExternals = Config_getBool(EXTERNAL_GROUPS);
2038 return (allExternals || hasNonReferenceNestedGroupRec(this,0)) && isLinkable();
2039}
2040
2042{
2043 return !isReference() && isLinkable();
2044}
2045
2047{
2048 return hasUserDocumentation();
2049}
2050
2051// let the "programming language" for a group depend on what is inserted into it.
2052// First item that has an associated languages determines the language for the whole group.
2054{
2055 if (getLanguage()==SrcLangExt::Unknown && d->getLanguage()!=SrcLangExt::Unknown)
2056 {
2058 }
2059}
2060
2062{
2063 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
2064 return ((!briefDescription().isEmpty() && repeatBrief) ||
2065 !documentation().isEmpty() ||
2066 !inbodyDocumentation().isEmpty() ||
2068}
2069
2071{
2073}
2074
2076{
2077 return m_hasGroupGraph;
2078}
2079
2080// --- Cast functions
2081
2083{
2084 if (d==nullptr) return nullptr;
2085 if (d && typeid(*d)==typeid(GroupDefImpl))
2086 {
2087 return static_cast<GroupDef*>(d);
2088 }
2089 else
2090 {
2091 return nullptr;
2092 }
2093}
2094
2096{
2097 if (d==nullptr) return nullptr;
2098 if (d && typeid(*d)==typeid(GroupDefImpl))
2099 {
2100 return static_cast<const GroupDef*>(d);
2101 }
2102 else
2103 {
2104 return nullptr;
2105 }
2106}
2107
2108
This class represents an function or template argument list.
Definition arguments.h:65
size_t size() const
Definition arguments.h:100
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.
virtual void setGroupDefForAllMembers(GroupDef *g, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs)=0
The common base class of all entity definitions found in the sources.
Definition definition.h:77
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual DefType definitionType() const =0
virtual bool isLinkableInProject() const =0
virtual bool isHidden() const =0
virtual const GroupList & partOfGroups() const =0
virtual Definition * getOuterScope() const =0
virtual const QCString & name() const =0
bool isReference() const override
const QCString & name() const override
bool hasUserDocumentation() const override
QCString inbodyFile() const override
bool hasBriefDescription() const override
QCString docFile() const override
bool hasRequirementRefs() const override
QCString briefFile() const override
QCString qualifiedName() const override
void setLanguage(SrcLangExt lang) override
void writeRequirementRefs(OutputList &ol) const override
const RefItemVector & xrefListItems() const override
QCString briefDescription(bool abbreviate=FALSE) const override
DefinitionMixin(const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
const GroupList & partOfGroups() const override
int getStartBodyLine() const override
QCString inbodyDocumentation() const override
int docLine() const override
int inbodyLine() const override
int briefLine() const override
QCString documentation() const override
void writeDocAnchorsToTagFile(TextStream &fs) const override
SrcLangExt getLanguage() const override
virtual void makePartOfGroup(GroupDef *gd)=0
A model of a directory symbol.
Definition dirdef.h:110
A list of directories.
Definition dirdef.h:180
Representation of a group collaboration graph.
static bool suppressDocWarnings
Definition doxygen.h:130
static GroupLinkedMap * groupLinkedMap
Definition doxygen.h:114
Represents an unstructured piece of information, about an entity found in the sources.
Definition entry.h:117
QCString fileName
file this entry was extracted from
Definition entry.h:224
std::vector< Grouping > groups
list of groups this entry belongs to
Definition entry.h:222
int startLine
start line of entry in the source
Definition entry.h:225
QCString doc
documentation block (partly parsed)
Definition entry.h:201
A model of a file symbol.
Definition filedef.h:99
A model of a group of symbols.
Definition groupdef.h:52
virtual void addDir(DirDef *dd)=0
virtual void addExample(PageDef *def)=0
virtual const GroupList & getSubGroups() const =0
virtual bool addClass(ClassDef *def)=0
virtual bool addModule(ModuleDef *def)=0
virtual void removeMember(MemberDef *md)=0
virtual bool addNamespace(NamespaceDef *def)=0
virtual void addGroup(GroupDef *def)=0
virtual bool insertMember(MemberDef *def, bool docOnly=FALSE)=0
virtual bool findGroup(const GroupDef *def) const =0
virtual bool addConcept(ConceptDef *def)=0
ConceptLinkedRefMap m_concepts
Definition groupdef.cpp:161
FileList m_fileList
Definition groupdef.cpp:159
const ModuleLinkedRefMap & getModules() const override
Definition groupdef.cpp:115
void endMemberDeclarations(OutputList &ol)
void startMemberDocumentation(OutputList &ol)
void setGroupScope(Definition *d) override
Definition groupdef.cpp:103
bool isLinkable() const override
bool addNamespace(NamespaceDef *def) override
Definition groupdef.cpp:318
Definition * getGroupScope() const override
Definition groupdef.cpp:104
bool hasGroupTitle() const override
Definition groupdef.cpp:68
QCString groupTitle() const override
Definition groupdef.cpp:65
QCString anchor() const override
Definition groupdef.cpp:63
void removeMemberFromList(MemberListType lt, MemberDef *md)
bool hasGroupGraph() const override
void writeSummaryLinks(OutputList &ol) const override
void startMemberDeclarations(OutputList &ol)
void writeNamespaces(OutputList &ol, const QCString &title)
Definition groupdef.cpp:972
bool findGroup(const GroupDef *def) const override
Definition groupdef.cpp:591
void writeDirs(OutputList &ol, const QCString &title)
~GroupDefImpl() override
Definition groupdef.cpp:207
QCString displayName(bool=TRUE) const override
Definition groupdef.cpp:64
void sortMemberLists() override
NamespaceLinkedRefMap m_namespaces
Definition groupdef.cpp:163
void writeInlineClasses(OutputList &ol)
CodeSymbolType codeSymbolType() const override
Definition groupdef.cpp:61
QCString groupTitleAsText() const override
Definition groupdef.cpp:66
const MemberGroupList & getMemberGroups() const override
Definition groupdef.cpp:110
void removeMember(MemberDef *md) override
Definition groupdef.cpp:517
void setGroupTitleLocal(const QCString &title)
Definition groupdef.cpp:211
void addPage(PageDef *def) override
Definition groupdef.cpp:337
void writeMemberDeclarations(OutputList &ol, MemberListType lt, const QCString &title)
void writeModules(OutputList &ol, const QCString &title)
MemberList * getMemberList(MemberListType lt) const override
bool isASubGroup() const override
Definition groupdef.cpp:616
bool subGrouping() const override
Definition groupdef.cpp:101
ModuleLinkedRefMap m_modules
Definition groupdef.cpp:162
GroupDefImpl(const QCString &fileName, int line, const QCString &name, const QCString &title, const QCString &refFileName=QCString())
Definition groupdef.cpp:187
void addGroup(GroupDef *def) override
Definition groupdef.cpp:607
void addDir(DirDef *dd) override
Definition groupdef.cpp:331
MemberGroupList m_memberGroups
Definition groupdef.cpp:172
bool addModule(ModuleDef *def) override
Definition groupdef.cpp:306
void addMembersToMemberGroup() override
Definition groupdef.cpp:352
PageLinkedRefMap m_examples
Definition groupdef.cpp:166
void writeTagFile(TextStream &) override
Definition groupdef.cpp:653
MemberList m_allMemberList
Definition groupdef.cpp:168
void writeGroupGraph(OutputList &ol)
Definition groupdef.cpp:909
bool isVisibleInHierarchy() const override
void writeAuthorSection(OutputList &ol)
void endMemberDocumentation(OutputList &ol)
DirList m_dirList
Definition groupdef.cpp:167
void sortSubGroups() override
QCString m_fileName
Definition groupdef.cpp:158
bool m_subGrouping
Definition groupdef.cpp:173
bool addClass(ClassDef *def) override
Definition groupdef.cpp:281
GroupList m_groups
Definition groupdef.cpp:164
void updateLanguage(const Definition *)
void findSectionsInDocumentation() override
Definition groupdef.cpp:242
const GroupList & getSubGroups() const override
Definition groupdef.cpp:117
bool insertMember(MemberDef *def, bool docOnly=FALSE) override
Definition groupdef.cpp:364
const DirList & getDirs() const override
Definition groupdef.cpp:119
void addMemberListToGroup(MemberList *, bool(MemberDef::*)() const)
const PageLinkedRefMap & getExamples() const override
Definition groupdef.cpp:120
void addFile(FileDef *def) override
Definition groupdef.cpp:262
bool hasDetailedDescription() const override
void overrideGroupGraph(bool e) override
const FileList & getFiles() const override
Definition groupdef.cpp:112
void writePageDocumentation(OutputList &ol)
const NamespaceLinkedRefMap & getNamespaces() const override
Definition groupdef.cpp:116
const PageLinkedRefMap & getPages() const override
Definition groupdef.cpp:118
void writeMemberGroups(OutputList &ol)
Definition * m_groupScope
Definition groupdef.cpp:170
ClassLinkedRefMap m_classes
Definition groupdef.cpp:160
void writeMemberPages(OutputList &ol, int hierarchyLevel) override
const MemberLists & getMemberLists() const override
Definition groupdef.cpp:107
QCString getOutputFileBase() const override
const ClassLinkedRefMap & getClasses() const override
Definition groupdef.cpp:113
void writePageNavigation(OutputList &ol) const override
bool m_hasGroupGraph
Definition groupdef.cpp:174
MemberNameInfoLinkedMap m_allMemberNameInfoLinkedMap
Definition groupdef.cpp:169
void writeFiles(OutputList &ol, const QCString &title)
Definition groupdef.cpp:934
void writeMemberDocumentation(OutputList &ol, MemberListType lt, const QCString &title)
void writeConcepts(OutputList &ol, const QCString &title)
bool addConcept(ConceptDef *def) override
Definition groupdef.cpp:294
DefType definitionType() const override
Definition groupdef.cpp:60
void writeNestedGroups(OutputList &ol, const QCString &title)
Definition groupdef.cpp:978
void writeDetailedDescription(OutputList &ol, const QCString &title)
Definition groupdef.cpp:789
void distributeMemberGroupDocumentation() override
Definition groupdef.cpp:234
void computeAnchors() override
Definition groupdef.cpp:647
void writeQuickMemberLinks(OutputList &ol, const MemberDef *currentMd) const override
void addRequirementReferences() override
void addListReferences() override
QCString m_title
Definition groupdef.cpp:155
bool containsFile(const FileDef *def) const override
Definition groupdef.cpp:276
PageLinkedRefMap m_pages
Definition groupdef.cpp:165
void countMembers() override
Definition groupdef.cpp:621
QCString m_titleAsText
Definition groupdef.cpp:156
bool isLinkableInProject() const override
MemberLists m_memberLists
Definition groupdef.cpp:171
size_t numDocMembers() const override
Definition groupdef.cpp:635
void addMemberToList(MemberListType lt, MemberDef *md)
const ConceptLinkedRefMap & getConcepts() const override
Definition groupdef.cpp:114
void writeDocumentation(OutputList &ol) override
void setGroupTitle(const QCString &newtitle) override
Definition groupdef.cpp:228
void writeBriefDescription(OutputList &ol)
Definition groupdef.cpp:867
void addExample(PageDef *def) override
Definition groupdef.cpp:345
void writeClasses(OutputList &ol, const QCString &title)
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1437
A model of a class/file/namespace member symbol.
Definition memberdef.h:48
virtual QCString typeString() const =0
virtual bool getGroupHasDocs() const =0
virtual const ClassDef * getClassDef() const =0
virtual const MemberDef * getGroupAlias() const =0
virtual const ArgumentList & templateArguments() const =0
virtual GroupDef * getGroupDef()=0
virtual const MemberVector & enumFieldList() const =0
virtual const FileDef * getFileDef() const =0
virtual const ArgumentList & argumentList() const =0
virtual int getGroupStartLine() const =0
virtual bool isFunction() const =0
virtual ClassDef * getClassDefOfAnonymousType() const =0
virtual Grouping::GroupPri_t getGroupPri() const =0
virtual Protection protection() const =0
virtual bool isEnumerate() const =0
virtual MemberType memberType() const =0
virtual QCString memberTypeName() const =0
virtual QCString getGroupFileName() const =0
virtual bool isStrong() const =0
virtual Specifier virtualness(int count=0) const =0
virtual void setGroupAlias(const MemberDef *md)=0
virtual void setGroupDef(GroupDef *gd, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs, MemberDef *member=nullptr)=0
A list of MemberDef objects as shown in documentation sections.
Definition memberlist.h:125
void writeDeclarations(OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, const QCString &title, const QCString &subtitle, bool showEnumValues=FALSE, bool showInline=FALSE, const ClassDef *inheritedFrom=nullptr, MemberListType lt=MemberListType::PubMethods(), bool showSectionTitle=true) const
Writes the list of members to the output.
void writeTagFile(TextStream &, bool useQualifiedName=false, bool showNamespaceMembers=true)
MemberListType listType() const
Definition memberlist.h:130
void writeDocumentation(OutputList &ol, const QCString &scopeName, const Definition *container, const QCString &title, const QCString &anchor, bool showEnumValues=FALSE, bool showInline=FALSE) const
bool declVisible() const
Wrapper class for the MemberListType type.
Definition types.h:346
constexpr const char * toLabel() const noexcept
Definition types.h:402
void push_back(Ptr &&p)
Definition membername.h:141
void remove(const MemberDef *md)
Definition memberlist.h:84
An abstract interface of a namespace symbol.
Class representing a list of output generators that are written to in parallel.
Definition outputlist.h:315
void writeDoc(const IDocNodeAST *ast, const Definition *ctx, const MemberDef *md, int sectionLevel=-1)
Definition outputlist.h:383
void endTextBlock(bool paraBreak=FALSE)
Definition outputlist.h:672
void writeString(const QCString &text)
Definition outputlist.h:411
void startMemberDeclaration()
Definition outputlist.h:569
void endTitleHead(const QCString &fileName, const QCString &name)
Definition outputlist.h:405
void endSection(const QCString &lab, SectionType t)
Definition outputlist.h:588
void disable(OutputType o)
void startTitleHead(const QCString &fileName)
Definition outputlist.h:403
void writeRuler()
Definition outputlist.h:521
void endGroupCollaboration(DotGroupCollaboration &g)
Definition outputlist.h:666
void startGroupHeader(const QCString &id=QCString(), int extraLevels=0)
Definition outputlist.h:453
void enable(OutputType o)
void endContents()
Definition outputlist.h:620
void endHeaderSection()
Definition outputlist.h:467
void endMemberDescription()
Definition outputlist.h:567
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
Definition outputlist.h:439
void startGroupCollaboration()
Definition outputlist.h:664
void startMemberDescription(const QCString &anchor, const QCString &inheritId=QCString(), bool typ=false)
Definition outputlist.h:565
void startHeaderSection()
Definition outputlist.h:465
void docify(const QCString &s)
Definition outputlist.h:437
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, const DocOptions &options)
void startParagraph(const QCString &classDef=QCString())
Definition outputlist.h:407
void startTextBlock(bool dense=FALSE)
Definition outputlist.h:670
void endParagraph()
Definition outputlist.h:409
void startMemberSections()
Definition outputlist.h:461
void startMemberList()
Definition outputlist.h:481
void endTextLink()
Definition outputlist.h:444
void endMemberItem(OutputGenerator::MemberItemType type)
Definition outputlist.h:495
void endMemberList()
Definition outputlist.h:483
void writeSynopsis()
Definition outputlist.h:592
void pushGeneratorState()
void insertMemberAlign(bool templ=FALSE)
Definition outputlist.h:517
void disableAllBut(OutputType o)
void popGeneratorState()
void writeSummaryLink(const QCString &file, const QCString &anchor, const QCString &title, bool first)
Definition outputlist.h:614
void writeAnchor(const QCString &fileName, const QCString &name)
Definition outputlist.h:523
void endGroupHeader(int extraLevels=0)
Definition outputlist.h:455
void writePageOutline()
Definition outputlist.h:616
void startContents()
Definition outputlist.h:618
void endMemberDeclaration(const QCString &anchor, const QCString &inheritId)
Definition outputlist.h:571
void writePageLink(const QCString &name, bool first)
Definition outputlist.h:389
void enableAll()
void endMemberHeader()
Definition outputlist.h:471
void startMemberItem(const QCString &anchor, OutputGenerator::MemberItemType type, const QCString &id=QCString())
Definition outputlist.h:493
void parseText(const QCString &textStr)
void startSection(const QCString &lab, const QCString &title, SectionType t)
Definition outputlist.h:586
void startTextLink(const QCString &file, const QCString &anchor)
Definition outputlist.h:442
void startMemberHeader(const QCString &anchor, int typ=2)
Definition outputlist.h:469
void endMemberSections()
Definition outputlist.h:463
A model of a page symbol.
Definition pagedef.h:26
This is an alternative implementation of QCString.
Definition qcstring.h:101
QCString & prepend(const char *s)
Definition qcstring.h:422
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:166
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:163
static RequirementManager & instance()
void addRequirementRefsForSymbol(const Definition *symbol)
class that provide information about a section.
Definition section.h:58
QCString label() const
Definition section.h:69
QCString title() const
Definition section.h:70
static SectionManager & instance()
returns a reference to the singleton
Definition section.h:179
static constexpr int Subsection
Definition section.h:34
Text streaming class that buffers data.
Definition textstream.h:36
static void writeVhdlDeclarations(const MemberList *, OutputList &, const GroupDef *, const ClassDef *, const FileDef *, const NamespaceDef *, const ModuleDef *)
ClassDefMutable * toClassDefMutable(Definition *d)
ConceptDefMutable * toConceptDefMutable(Definition *d)
#define Config_getInt(name)
Definition config.h:34
#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
bool compareDirDefs(const DirDef *item1, const DirDef *item2)
Definition dirdef.cpp:1232
void docFindSections(const QCString &input, const Definition *d, const QCString &fileName)
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, const DocOptions &options)
IDocParserPtr createDocParser()
factory function to create a parser
Definition docparser.cpp:55
static void writeTagFile()
bool compareFileDefs(const FileDef *fd1, const FileDef *fd2)
Definition filedef.cpp:1959
void addNamespaceToGroups(const Entry *root, NamespaceDef *nd)
void addGroupToGroups(const Entry *root, GroupDef *subGroup)
void addClassToGroups(const Entry *root, ClassDef *cd)
void addDirToGroups(const Entry *root, DirDef *dd)
static void groupClassesWithSameScope(Vec &vec)
void addModuleToGroups(const Entry *root, ModuleDef *mod)
std::unique_ptr< GroupDef > createGroupDef(const QCString &fileName, int line, const QCString &name, const QCString &title, const QCString &refFileName)
Definition groupdef.cpp:178
GroupDef * toGroupDef(Definition *d)
void addConceptToGroups(const Entry *root, ConceptDef *cd)
static bool hasNonReferenceNestedGroupRec(const GroupDef *gd, int level)
void addExampleToGroups(const Entry *root, PageDef *eg)
void addMemberToGroups(const Entry *root, MemberDef *md)
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const QCString &navPath)
Definition index.cpp:429
void startFile(OutputList &ol, const QCString &name, bool isSource, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel, const QCString &allMembersFile)
Definition index.cpp:403
Translator * theTranslator
Definition language.cpp:71
MemberDefMutable * toMemberDefMutable(Definition *d)
#define warn_uncond(fmt,...)
Definition message.h:122
#define warn(file, line, fmt,...)
Definition message.h:97
#define msg(fmt,...)
Definition message.h:94
#define err(fmt,...)
Definition message.h:127
NamespaceDefMutable * toNamespaceDefMutable(Definition *d)
int qstricmp_sort(const char *str1, const char *str2)
Definition qcstring.h:86
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
Web server based search engine.
Grouping info.
Definition types.h:227
QCString groupname
name of the group
Definition types.h:257
static constexpr const char * getGroupPriName(GroupPri_t priority) noexcept
Definition types.h:240
GroupPri_t
Grouping priority.
Definition types.h:230
@ GROUPING_LOWEST
Definition types.h:231
@ GROUPING_INGROUP
membership in group was defined by @ingroup
Definition types.h:236
GroupPri_t pri
priority of this definition
Definition types.h:258
Represents of a member declaration list with configurable title and subtitle.
Definition layout.h:112
QCString title(SrcLangExt lang) const
Definition layout.cpp:1788
MemberListType type
Definition layout.h:118
Represents of a member definition list with configurable title.
Definition layout.h:132
MemberListType type
Definition layout.h:137
QCString title(SrcLangExt lang) const
Definition layout.cpp:1800
Definition layout.h:102
QCString title(SrcLangExt lang) const
Definition layout.cpp:1781
CodeSymbolType
Definition types.h:481
@ Enumeration
Definition types.h:557
@ EnumValue
Definition types.h:558
@ Variable
Definition types.h:555
@ Property
Definition types.h:563
@ Typedef
Definition types.h:556
@ Function
Definition types.h:554
MemberListContainer
Definition types.h:472
SrcLangExt
Definition types.h:207
bool matchArguments2(const Definition *srcScope, const FileDef *srcFileScope, const QCString &srcReturnType, const ArgumentList *srcAl, const Definition *dstScope, const FileDef *dstFileScope, const QCString &dstReturnType, const ArgumentList *dstAl, bool checkCV, SrcLangExt lang)
Definition util.cpp:2031
QCString convertToHtml(const QCString &s, bool keepEntities)
Definition util.cpp:3984
QCString parseCommentAsText(const Definition *scope, const MemberDef *md, const QCString &doc, const QCString &fileName, int lineNr)
Definition util.cpp:5389
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:4845
void addGroupListToTitle(OutputList &ol, const Definition *d)
Definition util.cpp:4932
void createSubDirs(const Dir &d)
Definition util.cpp:3661
static QCString stripFromPath(const QCString &p, const StringVector &l)
Definition util.cpp:298
QCString convertToXML(const QCString &s, bool keepEntities)
Definition util.cpp:3933
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:4942
A bunch of utility functions.