membername.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 MEMBERNAME_H
19 #define MEMBERNAME_H
20 
21 #include <qlist.h>
22 #include "memberdef.h"
23 #include "sortdict.h"
24 
25 /** Class representing all MemberDef objects with the same name */
26 class MemberName : public QList<MemberDef>
27 {
28  public:
29  MemberName(const char *name);
30  ~MemberName();
31  const char *memberName() const { return name; }
32 
33  private:
34  int compareValues(const MemberDef *item1,const MemberDef *item2) const;
36 };
37 
38 /** Iterator for MemberDef objects in a MemberName list. */
39 class MemberNameIterator : public QListIterator<MemberDef>
40 {
41  public:
42  MemberNameIterator( const MemberName &list);
43 };
44 
45 /** Sorted dictionary of MemberName objects. */
46 class MemberNameSDict : public SDict<MemberName>
47 {
48  public:
51 
52  private:
53  int compareValues(const MemberName *item1,const MemberName *item2) const;
54 };
55 
56 /** Data associated with a MemberDef in an inheritance relation. */
57 struct MemberInfo
58 {
60  memberDef(md), prot(p), virt(v), inherited(inh), ambigClass(0) {}
65  bool inherited;
69 };
70 
71 /** Class representing all MemberInfo objects with the same name */
72 class MemberNameInfo : public QList<MemberInfo>
73 {
74  public:
75  MemberNameInfo(const char *name);
77  const char *memberName() const { return name; }
78  private:
79  int compareValues(const MemberInfo *item1,const MemberInfo *item2) const;
81 };
82 
83 /** Iterator for MemberInfo objects in a MemberNameInfo list. */
84 class MemberNameInfoIterator : public QListIterator<MemberInfo>
85 {
86  public:
88  : QListIterator<MemberInfo>(mnii) {}
89 };
90 
91 /** Sorted dictionary of MemberNameInfo objects. */
92 class MemberNameInfoSDict : public SDict<MemberNameInfo>
93 {
94  public:
97  private:
98  int compareValues(const MemberNameInfo *item1,const MemberNameInfo *item2) const
99  {
100  return qstricmp(item1->memberName(), item2->memberName());
101  }
102 };
103 
104 #endif
QCString name
Definition: membername.h:80
Specifier virt
Definition: membername.h:64
MemberName(const char *name)
Definition: membername.cpp:23
Protection prot
Definition: membername.h:63
MemberNameSDict(int size)
Definition: membername.h:49
MemberDef * memberDef
Definition: membername.h:62
int compareValues(const MemberNameInfo *item1, const MemberNameInfo *item2) const
Definition: membername.h:98
const char * memberName() const
Definition: membername.h:31
MemberNameInfoIterator(const MemberNameInfo &mnii)
Definition: membername.h:87
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
QCString ambiguityResolutionScope
Definition: membername.h:67
Definition: sortdict.h:73
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:567
Specifier
Definition: types.h:29
bool inherited
Definition: membername.h:65
p
Definition: test.py:223
const char * memberName() const
Definition: membername.h:77
QCString scopePath
Definition: membername.h:66
MemberInfo(MemberDef *md, Protection p, Specifier v, bool inh)
Definition: membername.h:59
static Specifier virt
Protection
Definition: types.h:26
ClassDef * ambigClass
Definition: membername.h:68
int compareValues(const MemberDef *item1, const MemberDef *item2) const
Definition: membername.cpp:33
QCString name
Definition: membername.h:35
MemberNameInfoSDict(int size)
Definition: membername.h:95
Definition: qlist.h:54