membername.cpp
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 #include "membername.h"
19 #include "classdef.h"
20 #include "util.h"
21 #include "filedef.h"
22 
24 {
25  name=n;
27 }
28 
30 {
31 }
32 
33 int MemberName::compareValues(const MemberDef *m1, const MemberDef *m2) const
34 {
35  ClassDef *c1=m1->getClassDef();
36  ClassDef *c2=m2->getClassDef();
37  FileDef *f1=m1->getFileDef();
38  FileDef *f2=m2->getFileDef();
39  if (c1 && c2)
40  return qstrcmp(c1->name(),c2->name());
41  else if (f1 && f2)
42  return qstrcmp(f1->name(),f2->name());
43  else
44  return 0;
45 }
46 
48 {
49  name=n;
51 }
52 
54 {
56  ClassDef *c2=m2->memberDef->getClassDef();
59  if (c1 && c2)
60  return qstrcmp(c1->name(),c2->name());
61  else if (f1 && f2)
62  return qstrcmp(f1->name(),f2->name());
63  else
64  return 0;
65 }
67  QListIterator<MemberDef>(mnlist)
68 {
69 }
70 
72 {
73  return qstricmp(n1->memberName()+getPrefixIndex(n1->memberName()),
75  );
76 }
77 
QCString name
Definition: membername.h:80
int compareValues(const MemberInfo *item1, const MemberInfo *item2) const
Definition: membername.cpp:53
MemberName(const char *name)
Definition: membername.cpp:23
MemberDef * memberDef
Definition: membername.h:62
int compareValues(const MemberName *item1, const MemberName *item2) const
Definition: membername.cpp:71
const char * memberName() const
Definition: membername.h:31
FileDef * getFileDef() const
Definition: memberdef.cpp:4075
const QCString & name() const
Definition: definition.h:114
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:567
QCString name() const
Definition: filedef.cpp:1193
static constexpr double m2
Definition: Units.h:72
std::void_t< T > n
A bunch of utility functions.
ClassDef * getClassDef() const
Definition: memberdef.cpp:4070
int getPrefixIndex(const QCString &name)
Definition: util.cpp:5144
MemberNameInfo(const char *name)
Definition: membername.cpp:47
MemberNameIterator(const MemberName &list)
Definition: membername.cpp:66
int compareValues(const MemberDef *item1, const MemberDef *item2) const
Definition: membername.cpp:33
Q_EXPORT int qstrcmp(const char *str1, const char *str2)
Definition: qcstring.h:95
void setAutoDelete(bool enable)
Definition: qlist.h:99
QCString name
Definition: membername.h:35
const bool TRUE
Definition: qglobal.h:371
Definition: qlist.h:54