summaryrefslogtreecommitdiffstats
path: root/src/namespacedef.h
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-12-30 17:55:14 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-12-30 17:55:14 (GMT)
commit6e51abf63021dc9fe32c05f003232fe68a08591d (patch)
treee9fe6f526e4a2b22b1a55659331c15750969a019 /src/namespacedef.h
parent744d1ca52e25dfa9e3d656056d87ed7cb6320585 (diff)
downloadDoxygen-6e51abf63021dc9fe32c05f003232fe68a08591d.zip
Doxygen-6e51abf63021dc9fe32c05f003232fe68a08591d.tar.gz
Doxygen-6e51abf63021dc9fe32c05f003232fe68a08591d.tar.bz2
Reduced and improved functionality of QList
- operations on current index and node (next(), prev(), last(), first()) have been removed. - access to internal nodes has been removed. - old QList has been renamed to QInternalList for use inside qtools only. - added type safe compare, new, and delete operations (compareValues(), newValue(), deleteValue()). - add compareValues also to QDict for consistency. - changed doxygen's implementation to comply with the new QList and QDict interface.
Diffstat (limited to 'src/namespacedef.h')
-rw-r--r--src/namespacedef.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/namespacedef.h b/src/namespacedef.h
index 2fe5e4a..c4afac9 100644
--- a/src/namespacedef.h
+++ b/src/namespacedef.h
@@ -137,14 +137,12 @@ class NamespaceDef : public Definition
/** A list of NamespaceDef objects. */
class NamespaceList : public QList<NamespaceDef>
-{
+{
public:
~NamespaceList() {}
- int compareItems(QCollection::Item item1,QCollection::Item item2)
+ int compareValues(const NamespaceDef *nd1,const NamespaceDef *nd2) const
{
- return qstricmp(((NamespaceDef *)item1)->name(),
- ((NamespaceDef *)item2)->name()
- );
+ return qstricmp(nd1->name(), nd2->name());
}
};
@@ -170,15 +168,14 @@ class NamespaceSDict : public SDict<NamespaceDef>
public:
NamespaceSDict(int size=17) : SDict<NamespaceDef>(size) {}
~NamespaceSDict() {}
- int compareItems(QCollection::Item item1,QCollection::Item item2)
- {
- return qstricmp(((NamespaceDef *)item1)->name(),
- ((NamespaceDef *)item2)->name()
- );
- }
void writeDeclaration(OutputList &ol,const char *title,
bool isConstantGroup=false, bool localName=FALSE);
bool declVisible() const;
+ private:
+ int compareValues(const NamespaceDef *item1,const NamespaceDef *item2) const
+ {
+ return qstricmp(item1->name(),item2->name());
+ }
};