Doxygen
classlist.cpp
浏览该文件的文档.
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==0 || *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  static 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()!=Private || extractPrivate) &&
64  (filter==0 || *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  static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
77 
78  static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
79  static 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==0 || cd->partOfGroups().empty()) // if container==0 -> 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();
104  ol.endGroupHeader();
105  found=TRUE;
106  }
108  if (cdm)
109  {
110  cdm->writeInlineDocumentation(ol);
111  }
112  }
113  }
114 }
115 
116 
outputlist.h
OutputList::endGroupHeader
void endGroupHeader(int extraLevels=0)
Definition: outputlist.h:171
ClassDefMutable
Definition: classdef.h:384
Definition
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
Private
@ Private
Definition: types.h:26
Translator::trClassDocumentation
virtual QCString trClassDocumentation()=0
ClassLinkedRefMap::writeDeclaration
void writeDeclaration(OutputList &ol, const ClassDef::CompoundType *filter, const QCString &header, bool localNames) const
Definition: classlist.cpp:53
ClassDef::CompoundType
CompoundType
The various compound types
Definition: classdef.h:107
Translator::trTypeDocumentation
virtual QCString trTypeDocumentation()=0
ClassLinkedRefMap::writeDocumentation
void writeDocumentation(OutputList &ol, const Definition *container=0) const
Definition: classlist.cpp:74
OutputList
Class representing a list of output generators that are written to in parallel.
Definition: outputlist.h:37
classlist.h
arguments.h
theTranslator
Translator * theTranslator
Definition: language.cpp:156
doxygen.h
OutputList::writeRuler
void writeRuler()
Definition: outputlist.h:237
language.h
defargs.h
TRUE
#define TRUE
Definition: qcstring.h:36
OutputList::endMemberList
void endMemberList()
Definition: outputlist.h:199
Definition::partOfGroups
virtual const GroupList & partOfGroups() const =0
OutputList::startGroupHeader
void startGroupHeader(int extraLevels=0)
Definition: outputlist.h:169
Config_getBool
#define Config_getBool(name)
Definition: config.h:33
OutputList::parseText
void parseText(const QCString &textStr)
Definition: outputlist.cpp:179
config.h
ClassLinkedRefMap::declVisible
bool declVisible(const ClassDef::CompoundType *filter=0) const
Definition: classlist.cpp:29
groupdef.h
ClassDefMutable::writeInlineDocumentation
virtual void writeInlineDocumentation(OutputList &ol) const =0
toClassDefMutable
ClassDefMutable * toClassDefMutable(Definition *d)
Definition: classdef.cpp:4944
util.h
A bunch of utility functions.
vhdldocgen.h
FALSE
#define FALSE
Definition: qcstring.h:33
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108