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