|
1 /****************************************************************************** |
|
2 * |
|
3 * |
|
4 * |
|
5 * Copyright (C) 1997-2008 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 MEMBERNAME_H |
|
19 #define MEMBERNAME_H |
|
20 |
|
21 #include <qlist.h> |
|
22 #include "memberdef.h" |
|
23 #include "sortdict.h" |
|
24 |
|
25 class MemberName : public QList<MemberDef> |
|
26 { |
|
27 public: |
|
28 MemberName(const char *name); |
|
29 ~MemberName(); |
|
30 const char *memberName() const { return name; } |
|
31 |
|
32 int compareItems(GCI item1,GCI item2); |
|
33 private: |
|
34 QCString name; |
|
35 }; |
|
36 |
|
37 class MemberNameIterator : public QListIterator<MemberDef> |
|
38 { |
|
39 public: |
|
40 MemberNameIterator( const MemberName &list); |
|
41 }; |
|
42 |
|
43 class MemberNameSDict : public SDict<MemberName> |
|
44 { |
|
45 public: |
|
46 MemberNameSDict(int size) : SDict<MemberName>(size) {} |
|
47 ~MemberNameSDict() {} |
|
48 |
|
49 int compareItems(GCI item1,GCI item2); |
|
50 }; |
|
51 |
|
52 struct MemberInfo |
|
53 { |
|
54 MemberInfo(MemberDef *md,Protection p,Specifier v,bool inh) : |
|
55 memberDef(md), prot(p), virt(v), inherited(inh), ambigClass(0) {} |
|
56 ~MemberInfo() {} |
|
57 MemberDef *memberDef; |
|
58 Protection prot; |
|
59 Specifier virt; |
|
60 bool inherited; |
|
61 QCString scopePath; |
|
62 QCString ambiguityResolutionScope; |
|
63 ClassDef *ambigClass; |
|
64 }; |
|
65 |
|
66 class MemberNameInfo : public QList<MemberInfo> |
|
67 { |
|
68 public: |
|
69 MemberNameInfo(const char *name); |
|
70 ~MemberNameInfo() {} |
|
71 const char *memberName() const { return name; } |
|
72 int compareItems(GCI item1,GCI item2); |
|
73 private: |
|
74 QCString name; |
|
75 }; |
|
76 |
|
77 class MemberNameInfoIterator : public QListIterator<MemberInfo> |
|
78 { |
|
79 public: |
|
80 MemberNameInfoIterator(const MemberNameInfo &mnii) |
|
81 : QListIterator<MemberInfo>(mnii) {} |
|
82 }; |
|
83 |
|
84 |
|
85 class MemberNameInfoSDict : public SDict<MemberNameInfo> |
|
86 { |
|
87 public: |
|
88 MemberNameInfoSDict(int size) : SDict<MemberNameInfo>(size) {} |
|
89 ~MemberNameInfoSDict() {} |
|
90 int compareItems(GCI item1,GCI item2) |
|
91 { return stricmp( |
|
92 ((MemberNameInfo *)item1)->memberName(), |
|
93 ((MemberNameInfo *)item2)->memberName() |
|
94 ); |
|
95 } |
|
96 }; |
|
97 |
|
98 #endif |