Doxygen
Loading...
Searching...
No Matches
classlist.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// own include
19#include "classlist.h"
20
21// other includes
22#include "config.h"
23#include "groupdef.h"
24#include "language.h"
25#include "outputlist.h"
26
28{
29 bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
30 bool extractLocalClasses = Config_getBool(EXTRACT_LOCAL_CLASSES);
31 for (const auto &cd : *this)
32 {
33 if (!cd->isAnonymous() &&
34 (filter==nullptr || *filter==cd->compoundType())
35 )
36 {
37 bool isLink = cd->isLinkable();
38 if (isLink ||
39 (!hideUndocClasses &&
40 (!cd->isLocal() || extractLocalClasses)
41 )
42 )
43 {
44 return true;
45 }
46 }
47 }
48 return false;
49}
50
52 const DString &header,bool localNames) const
53{
54 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
55 bool found=false;
56 for (const auto &cd : *this)
57 {
58 //printf(" ClassLinkedRefMap::writeDeclaration for %s\n",cd->name().data());
59 if (!cd->isAnonymous() &&
60 !cd->isExtension() &&
61 (cd->protection()!=Protection::Private || extractPrivate) &&
62 (filter==nullptr || *filter==cd->compoundType())
63 )
64 {
65 //printf("writeDeclarationLink()\n");
66 cd->writeDeclarationLink(ol,found,header,localNames);
67 }
68 }
69 if (found) ol.endMemberList();
70}
71
73{
74 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
75
76 bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
77 bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
78 if (!inlineGroupedClasses && !inlineSimpleClasses) return;
79
80 bool found=false;
81
82 for (const auto &cd : *this)
83 {
84 //printf("%s:writeDocumentation() %p linkable=%d embedded=%d container=%p partOfGroups=%zu anonymous=%d\n",
85 // cd->name().data(),(void*)cd->getOuterScope(),cd->isLinkableInProject(),cd->isEmbeddedInOuterScope(),
86 // (void*)container,cd->partOfGroups().size(),cd->isAnonymous());
87
88 if (!cd->isAnonymous() &&
89 cd->isLinkableInProject() &&
90 cd->isEmbeddedInOuterScope() &&
91 !cd->isAlias() &&
92 (container==nullptr || cd->partOfGroups().empty()) // if container==nullptr -> show as part of the group docs, otherwise only show if not part of a group
93 )
94 {
95 //printf(" showing class %s\n",cd->name().data());
96 if (!found)
97 {
98 ol.writeRuler();
99 ol.startGroupHeader("inline_classes");
102 ol.endGroupHeader();
103 found=true;
104 }
105 cd->writeInlineDocumentation(ol);
106 }
107 }
108}
109
110
CompoundType
The various compound types.
Definition classdef.h:105
bool declVisible(const ClassDef::CompoundType *filter=nullptr) const
Definition classlist.cpp:27
void writeDocumentation(OutputList &ol, const Definition *container=nullptr) const
Definition classlist.cpp:72
void writeDeclaration(OutputList &ol, const ClassDef::CompoundType *filter, const DString &header, bool localNames) const
Definition classlist.cpp:51
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition dstring.h:84
The common base class of all entity definitions found in the sources.
Definition definition.h:77
virtual const GroupList & partOfGroups() const =0
Class representing a list of output generators that are written to in parallel.
Definition outputlist.h:311
void parseText(const DString &textStr)
void writeRuler()
Definition outputlist.h:517
void endMemberList()
Definition outputlist.h:479
void endGroupHeader(int extraLevels=0)
Definition outputlist.h:451
void startGroupHeader(const DString &id=DString(), int extraLevels=0)
Definition outputlist.h:449
virtual DString trClassDocumentation()=0
virtual DString trTypeDocumentation()=0
#define Config_getBool(name)
Definition config.h:33
Translator * theTranslator
Definition language.cpp:76