My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
reflist.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  *
4  *
5  *
6  * Copyright (C) 1997-2015 by Dimitri van Heesch.
7  *
8  * Permission to use, copy, modify, and distribute this software and its
9  * documentation under the terms of the GNU General Public License is hereby
10  * granted. No representations are made about the suitability of this software
11  * for any purpose. It is provided "as is" without express or implied warranty.
12  * See the GNU General Public License for more details.
13  *
14  * Documents produced by Doxygen are derivative works derived from the
15  * input used in their production; they are not affected by this license.
16  *
17  */
18 
19 #ifndef _REFLIST_H
20 #define _REFLIST_H
21 
22 #include <qintdict.h>
23 #include <qlist.h>
24 #include "sortdict.h"
25 
26 class Definition;
27 
29 struct RefItem
30 {
31  RefItem() : scope(0) {}
32  QCString text;
33  QCString listAnchor;
34 
35  QCString prefix;
37  QCString name;
38  QCString title;
39  QCString args;
40  //bool written;
41  QList<RefItem> extraItems;
42 };
43 
45 class SortedRefItems : public SDict<RefItem>
46 {
47  public:
48  SortedRefItems(int size=17) : SDict<RefItem>(size) {}
49  virtual ~SortedRefItems() {}
50  private:
51  int compareValues(const RefItem *r1,const RefItem *r2) const
52  {
53  return qstricmp(r1->title,r2->title);
54  }
55 };
56 
67 class RefList
68 {
69  public:
70  int addRefItem();
71  RefItem *getRefItem(int todoItemId);
74  QCString listName() const;
75  QCString fileName() const;
76  QCString pageTitle() const;
77  QCString sectionTitle() const;
78 
79  RefList(const char *listName,
80  const char *pageTitle,const char *secTitle
81  );
82  ~RefList();
83  void insertIntoList(const char *key,RefItem *item);
84  void generatePage();
85 
86  private:
87  int m_id;
88  QCString m_listName;
89  QCString m_fileName;
90  QCString m_pageTitle;
91  QCString m_secTitle;
93  QIntDict<RefItem> *m_dict;
94  QIntDictIterator<RefItem> *m_dictIterator;
95 };
96 
97 #endif