ISLEman
reflist.h
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) {}
34 
40  //bool written;
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);
72  RefItem *getFirstRefItem();
73  RefItem *getNextRefItem();
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;
92  SortedRefItems *m_itemList;
93  QIntDict<RefItem> *m_dict;
94  QIntDictIterator<RefItem> *m_dictIterator;
95 };
96 
97 #endif
QCString listAnchor
anchor in the list
Definition: reflist.h:33
QCString prefix
type prefix for the name
Definition: reflist.h:35
QCString title
display name of the entity
Definition: reflist.h:38
List of cross-referenced items.
Definition: reflist.h:67
The common base class of all entity definitions found in the sources.
Definition: definition.h:92
QCString text
text of the item.
Definition: reflist.h:32
List of items sorted by title.
Definition: reflist.h:45
This struct represents an item in the list of references.
Definition: reflist.h:29
Ordered dictionary of elements of type T.
Definition: sortdict.h:73
QCString name
name of the entity containing the reference
Definition: reflist.h:37
Definition * scope
scope to use for references.
Definition: reflist.h:36
This is an alternative implementation of QCString.
Definition: qcstring.h:131
QCString args
optional arguments for the entity (if function)
Definition: reflist.h:39
QList< RefItem > extraItems
more items belonging to the same entity
Definition: reflist.h:41