classlist.h
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 #ifndef CLASSLIST_H
19 #define CLASSLIST_H
20 
21 #include <qlist.h>
22 #include <qdict.h>
23 
24 #include "classdef.h"
25 #include "sortdict.h"
26 
27 class Definition;
28 
29 /** A list of ClassDef objects. */
30 class ClassList : public QList<ClassDef>
31 {
32  public:
33  ClassList();
34  ~ClassList();
35 
36  private:
37  int compareValues(const ClassDef *item1,const ClassDef *item2) const;
38 };
39 
40 /** An iterator for ClassDef objects in a ClassList. */
41 class ClassListIterator : public QListIterator<ClassDef>
42 {
43  public:
44  ClassListIterator(const ClassList &list);
45 };
46 
47 /** An unsorted dictionary of ClassDef objects. */
48 class ClassDict : public QDict<ClassDef>
49 {
50  public:
51  ClassDict(int size) : QDict<ClassDef>(size) {}
53 };
54 
55 /** A sorted dictionary of ClassDef objects. */
56 class ClassSDict : public SDict<ClassDef>
57 {
58  public:
61  void writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter=0,
62  const char *header=0,bool localNames=FALSE);
63  void writeDocumentation(OutputList &ol,Definition *container=0);
64  bool declVisible(const ClassDef::CompoundType *filter=0) const;
65  private:
66  int compareValues(const ClassDef *item1,const ClassDef *item2) const;
67 };
68 
69 class GenericsCollection : public QIntDict<ClassDef>
70 {
71  public:
74 };
75 
77 {
78  public:
79  GenericsSDict() : m_dict(17) { m_dict.setAutoDelete(TRUE); }
81  void insert(const QCString &key,ClassDef *cd);
82  ClassDef *find(const QCString &key);
83  private:
85 };
86 
87 #endif
SDict< GenericsCollection > m_dict
Definition: classlist.h:84
~ClassSDict()
Definition: classlist.h:60
int compareValues(const ClassDef *item1, const ClassDef *item2) const
Definition: classlist.cpp:50
const bool FALSE
Definition: qglobal.h:370
int find(const ClassDef *d) const
Definition: qlist.h:88
bool insert(uint i, const ClassDef *d)
Definition: qlist.h:70
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
Definition: sortdict.h:73
def key(type, name=None)
Definition: graph.py:13
CompoundType
Definition: classdef.h:63
~ClassDict()
Definition: classlist.h:52
const bool TRUE
Definition: qglobal.h:371
ClassDict(int size)
Definition: classlist.h:51
ClassSDict(int size=17)
Definition: classlist.h:59
Definition: qlist.h:54