summaryrefslogtreecommitdiffstats
path: root/src/membername.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>1999-12-15 19:25:10 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>1999-12-15 19:25:10 (GMT)
commit322885a8700a209812bf5a94205260c9bef6ac1f (patch)
treecc1cd70cf5761ddf72ff114c0b65576c3f4c1d2a /src/membername.cpp
parent361bf7915be13b5c74688e33c427aea30641814c (diff)
downloadDoxygen-322885a8700a209812bf5a94205260c9bef6ac1f.zip
Doxygen-322885a8700a209812bf5a94205260c9bef6ac1f.tar.gz
Doxygen-322885a8700a209812bf5a94205260c9bef6ac1f.tar.bz2
initial version
Diffstat (limited to 'src/membername.cpp')
-rw-r--r--src/membername.cpp96
1 files changed, 96 insertions, 0 deletions
diff --git a/src/membername.cpp b/src/membername.cpp
new file mode 100644
index 0000000..2605f86
--- /dev/null
+++ b/src/membername.cpp
@@ -0,0 +1,96 @@
+/******************************************************************************
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997-1999 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * All output generated with Doxygen is not covered by this license.
+ *
+ */
+
+#include "membername.h"
+#include "classdef.h"
+#include "util.h"
+#include "filedef.h"
+
+MemberName::MemberName(const char *n) : QList<MemberDef>()
+{
+ name=n;
+}
+
+MemberName::~MemberName()
+{
+}
+
+int MemberName::compareItems(GCI item1, GCI item2)
+{
+ MemberDef *m1=(MemberDef *)item1;
+ MemberDef *m2=(MemberDef *)item2;
+ ClassDef *c1=m1->memberClass();
+ ClassDef *c2=m2->memberClass();
+ FileDef *f1=m1->getFileDef();
+ FileDef *f2=m2->getFileDef();
+ if (c1 && c2)
+ return stricmp(c1->name(),c2->name());
+ else if (f1 && f2)
+ return stricmp(f1->name(),f2->name());
+ else
+ return 0;
+}
+
+MemberNameInfo::MemberNameInfo(const char *n) : QList<MemberInfo>()
+{
+ name=n;
+ setAutoDelete(TRUE);
+}
+
+MemberNameInfo::~MemberNameInfo()
+{
+}
+
+int MemberNameInfo::compareItems(GCI item1, GCI item2)
+{
+ MemberInfo *m1=(MemberInfo *)item1;
+ MemberInfo *m2=(MemberInfo *)item2;
+ ClassDef *c1=m1->memberDef->memberClass();
+ ClassDef *c2=m2->memberDef->memberClass();
+ FileDef *f1=m1->memberDef->getFileDef();
+ FileDef *f2=m2->memberDef->getFileDef();
+ if (c1 && c2)
+ return stricmp(c1->name(),c2->name());
+ else if (f1 && f2)
+ return stricmp(f1->name(),f2->name());
+ else
+ return 0;
+}
+MemberNameIterator::MemberNameIterator(const MemberName &mnlist) :
+ QListIterator<MemberDef>(mnlist)
+{
+}
+
+MemberNameList::MemberNameList() : QList<MemberName>()
+{
+}
+
+MemberNameList::~MemberNameList()
+{
+}
+
+int MemberNameList::compareItems(GCI item1, GCI item2)
+{
+ MemberName *n1=(MemberName *)item1;
+ MemberName *n2=(MemberName *)item2;
+ return stricmp(n1->memberName(),n2->memberName());
+}
+
+MemberNameListIterator::MemberNameListIterator(const MemberNameList &mnlist) :
+ QListIterator<MemberName>(mnlist)
+{
+}
+