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