Public Member Functions | Private Member Functions | List of all members
ClassSDict Class Reference

#include <classlist.h>

Inheritance diagram for ClassSDict:
SDict< ClassDef >

Public Member Functions

 ClassSDict (int size=17)
 
 ~ClassSDict ()
 
void writeDeclaration (OutputList &ol, const ClassDef::CompoundType *filter=0, const char *header=0, bool localNames=FALSE)
 
void writeDocumentation (OutputList &ol, Definition *container=0)
 
bool declVisible (const ClassDef::CompoundType *filter=0) const
 
- Public Member Functions inherited from SDict< ClassDef >
 SDict (int size=17, bool caseSensitive=TRUE)
 
virtual ~SDict ()
 
void append (const char *key, const ClassDef *d)
 
void prepend (const char *key, const ClassDef *d)
 
bool remove (const char *key)
 
ClassDeftake (const char *key)
 
void sort ()
 
void inSort (const char *key, const ClassDef *d)
 
void insertAt (int i, const char *key, const ClassDef *d)
 
void setAutoDelete (bool val)
 
ClassDeffind (const char *key)
 
ClassDeffind (const QCString &key)
 
ClassDeffind (const QString &key)
 
int findAt (const QCString &key)
 
ClassDefoperator[] (const char *key) const
 
ClassDefat (uint i)
 
void clear ()
 
int count () const
 

Private Member Functions

int compareValues (const ClassDef *item1, const ClassDef *item2) const
 

Detailed Description

A sorted dictionary of ClassDef objects.

Definition at line 56 of file classlist.h.

Constructor & Destructor Documentation

ClassSDict::ClassSDict ( int  size = 17)
inline

Definition at line 59 of file classlist.h.

decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
ClassSDict::~ClassSDict ( )
inline

Definition at line 60 of file classlist.h.

60 {}

Member Function Documentation

int ClassSDict::compareValues ( const ClassDef item1,
const ClassDef item2 
) const
privatevirtual

Function that is used to compare two items when sorting. Overload this to properly sort items.

See also
inSort()

Reimplemented from SDict< ClassDef >.

Definition at line 55 of file classlist.cpp.

56 {
57  return compItems(item1,item2);
58 }
static int compItems(const ClassDef *c1, const ClassDef *c2)
Definition: classlist.cpp:37
bool ClassSDict::declVisible ( const ClassDef::CompoundType filter = 0) const

Definition at line 65 of file classlist.cpp.

66 {
67  static bool hideUndocClasses = Config_getBool("HIDE_UNDOC_CLASSES");
68  static bool extractLocalClasses = Config_getBool("EXTRACT_LOCAL_CLASSES");
69  if (count()>0)
70  {
71  ClassSDict::Iterator sdi(*this);
72  ClassDef *cd=0;
73  for (sdi.toFirst();(cd=sdi.current());++sdi)
74  {
75  if (cd->name().find('@')==-1 &&
76  (filter==0 || *filter==cd->compoundType())
77  )
78  {
79  bool isLink = cd->isLinkable();
80  if (isLink ||
81  (!hideUndocClasses &&
82  (!cd->isLocal() || extractLocalClasses)
83  )
84  )
85  {
86  return TRUE;
87  }
88  }
89  }
90  }
91  return FALSE;
92 }
CompoundType compoundType() const
Definition: classdef.cpp:4394
const bool FALSE
Definition: qglobal.h:370
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
int count() const
Definition: sortdict.h:284
const QCString & name() const
Definition: definition.h:114
bool isLocal() const
Definition: classdef.cpp:4384
bool isLinkable() const
Definition: classdef.cpp:2729
#define Config_getBool(val)
Definition: config.cpp:664
friend class Iterator
Definition: sortdict.h:289
const bool TRUE
Definition: qglobal.h:371
void ClassSDict::writeDeclaration ( OutputList ol,
const ClassDef::CompoundType filter = 0,
const char *  header = 0,
bool  localNames = FALSE 
)

Definition at line 94 of file classlist.cpp.

96 {
97  static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
98  if (count()>0)
99  {
100  ClassSDict::Iterator sdi(*this);
101  ClassDef *cd=0;
102  bool found=FALSE;
103  for (sdi.toFirst();(cd=sdi.current());++sdi)
104  {
105  //printf(" ClassSDict::writeDeclaration for %s\n",cd->name().data());
106  if (cd->name().find('@')==-1 &&
107  !cd->isExtension() &&
108  (cd->protection()!=Private || extractPrivate) &&
109  (filter==0 || *filter==cd->compoundType())
110  )
111  {
112  cd->writeDeclarationLink(ol,found,header,localNames);
113  }
114  }
115  if (found) ol.endMemberList();
116  }
117 }
CompoundType compoundType() const
Definition: classdef.cpp:4394
bool isExtension() const
Definition: classdef.cpp:4709
const bool FALSE
Definition: qglobal.h:370
Definition: types.h:26
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
int count() const
Definition: sortdict.h:284
void writeDeclarationLink(OutputList &ol, bool &found, const char *header, bool localNames)
Definition: classdef.cpp:1847
Protection protection() const
Definition: classdef.cpp:4414
const QCString & name() const
Definition: definition.h:114
#define Config_getBool(val)
Definition: config.cpp:664
friend class Iterator
Definition: sortdict.h:289
void endMemberList()
Definition: outputlist.h:208
void ClassSDict::writeDocumentation ( OutputList ol,
Definition container = 0 
)

Definition at line 119 of file classlist.cpp.

120 {
121  static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
122 
123  static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
124  static bool inlineSimpleClasses = Config_getBool("INLINE_SIMPLE_STRUCTS");
125  if (!inlineGroupedClasses && !inlineSimpleClasses) return;
126 
127  if (count()>0)
128  {
129  bool found=FALSE;
130 
131  ClassSDict::Iterator sdi(*this);
132  ClassDef *cd=0;
133  for (sdi.toFirst();(cd=sdi.current());++sdi)
134  {
135  //printf("%s:writeDocumentation() %p linkable=%d embedded=%d container=%p partOfGroups=%d\n",
136  // cd->name().data(),cd->getOuterScope(),cd->isLinkableInProject(),cd->isEmbeddedInOuterScope(),
137  // container,cd->partOfGroups() ? cd->partOfGroups()->count() : 0);
138 
139  if (cd->name().find('@')==-1 &&
140  cd->isLinkableInProject() &&
141  cd->isEmbeddedInOuterScope() &&
142  (container==0 || cd->partOfGroups()==0) // if container==0 -> show as part of the group docs, otherwise only show if not part of a group
143  )
144  {
145  //printf(" showing class %s\n",cd->name().data());
146  if (!found)
147  {
148  ol.writeRuler();
149  ol.startGroupHeader();
152  ol.endGroupHeader();
153  found=TRUE;
154  }
155  cd->writeInlineDocumentation(ol);
156  }
157  }
158  }
159 }
void writeRuler()
Definition: outputlist.h:240
void endGroupHeader(int extraLevels=0)
Definition: outputlist.h:178
bool isLinkableInProject() const
Definition: classdef.cpp:2707
const bool FALSE
Definition: qglobal.h:370
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
int count() const
Definition: sortdict.h:284
GroupList * partOfGroups() const
bool parseText(const QCString &textStr)
Definition: outputlist.cpp:175
void writeInlineDocumentation(OutputList &ol)
Definition: classdef.cpp:1675
const QCString & name() const
Definition: definition.h:114
virtual QCString trClassDocumentation()=0
bool isEmbeddedInOuterScope() const
Definition: classdef.cpp:4630
#define Config_getBool(val)
Definition: config.cpp:664
void startGroupHeader(int extraLevels=0)
Definition: outputlist.h:176
Translator * theTranslator
Definition: language.cpp:157
friend class Iterator
Definition: sortdict.h:289
const bool TRUE
Definition: qglobal.h:371
virtual QCString trTypeDocumentation()=0

The documentation for this class was generated from the following files: