diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2013-12-30 17:55:14 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2013-12-30 17:55:14 (GMT) |
commit | 6e51abf63021dc9fe32c05f003232fe68a08591d (patch) | |
tree | e9fe6f526e4a2b22b1a55659331c15750969a019 /src/sortdict.h | |
parent | 744d1ca52e25dfa9e3d656056d87ed7cb6320585 (diff) | |
download | Doxygen-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/sortdict.h')
-rw-r--r-- | src/sortdict.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/sortdict.h b/src/sortdict.h index e111075..fe51e24 100644 --- a/src/sortdict.h +++ b/src/sortdict.h @@ -73,7 +73,7 @@ const uint SDict_primes[] = template<class T> class SDict; template<class T> class SIntDict; -/** internal wrapper class that redirects compareItems() to the +/** internal wrapper class that redirects compareValues() to the * dictionary */ template<class T> @@ -82,9 +82,9 @@ class SList : public QList<T> public: SList(SDict<T> *owner) : m_owner(owner) {} virtual ~SList() {} - int compareItems(QCollection::Item item1,QCollection::Item item2) + int compareValues(const T *item1,const T *item2) const { - return m_owner->compareItems(item1,item2); + return m_owner->compareValues(item1,item2); } private: SDict<T> *m_owner; @@ -264,7 +264,7 @@ class SDict * Overload this to properly sort items. * \sa inSort() */ - virtual int compareItems(QCollection::Item item1,QCollection::Item item2) + virtual int compareValues(const T *item1,const T *item2) const { return item1!=item2; } @@ -421,7 +421,7 @@ class SDict }; }; -/** internal wrapper class that redirects compareItems() to the +/** internal wrapper class that redirects compareValues() to the * dictionary */ template<class T> @@ -430,11 +430,11 @@ class SIntList : public QList<T> public: SIntList(SIntDict<T> *owner) : m_owner(owner) {} virtual ~SIntList() {} - int compareItems(QCollection::Item item1,QCollection::Item item2) + private: + int compareValues(const T *item1,const T *item2) const { - return m_owner->compareItems(item1,item2); + return m_owner->compareValues(item1,item2); } - private: SIntDict<T> *m_owner; }; @@ -573,7 +573,7 @@ class SIntDict * Overload this to properly sort items. * \sa inSort() */ - virtual int compareItems(QCollection::Item item1,QCollection::Item item2) + virtual int compareValues(const T *item1,const T *item2) const { return item1!=item2; } |