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