diff options
Diffstat (limited to 'src/kvilib/core/kvi_pointerhashtable.h')
-rw-r--r-- | src/kvilib/core/kvi_pointerhashtable.h | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/kvilib/core/kvi_pointerhashtable.h b/src/kvilib/core/kvi_pointerhashtable.h index 9066c091..4a9b20d8 100644 --- a/src/kvilib/core/kvi_pointerhashtable.h +++ b/src/kvilib/core/kvi_pointerhashtable.h @@ -229,25 +229,25 @@ inline void * & kvi_hash_key_default(void *) return static_default; } -inline unsigned int kvi_hash_hash(const QString &szKey,bool bCaseSensitive) +inline unsigned int kvi_hash_hash(const TQString &szKey,bool bCaseSensitive) { unsigned int uResult = 0; - const QChar * p = KviQString::nullTerminatedArray(szKey); + const TQChar * p = KviTQString::nullTerminatedArray(szKey); if(!p)return 0; if(bCaseSensitive) { - while(p->unicode()) + while(p->tqunicode()) { - uResult += p->unicode(); + uResult += p->tqunicode(); p++; } } else { - while(p->unicode()) + while(p->tqunicode()) { #ifdef COMPILE_USE_QT4 - uResult += p->toLower().unicode(); + uResult += p->toLower().tqunicode(); #else - uResult += p->lower().unicode(); + uResult += p->lower().tqunicode(); #endif p++; } @@ -255,25 +255,25 @@ inline unsigned int kvi_hash_hash(const QString &szKey,bool bCaseSensitive) return uResult; } -inline bool kvi_hash_key_equal(const QString &szKey1,const QString &szKey2,bool bCaseSensitive) +inline bool kvi_hash_key_equal(const TQString &szKey1,const TQString &szKey2,bool bCaseSensitive) { if(bCaseSensitive) - return KviQString::equalCS(szKey1,szKey2); - return KviQString::equalCI(szKey1,szKey2); + return KviTQString::equalCS(szKey1,szKey2); + return KviTQString::equalCI(szKey1,szKey2); } -inline void kvi_hash_key_copy(const QString &szFrom,QString &szTo,bool) +inline void kvi_hash_key_copy(const TQString &szFrom,TQString &szTo,bool) { szTo = szFrom; } -inline void kvi_hash_key_destroy(QString &szKey,bool) +inline void kvi_hash_key_destroy(TQString &szKey,bool) { } -inline const QString & kvi_hash_key_default(QString *) +inline const TQString & kvi_hash_key_default(TQString *) { - return KviQString::empty; + return KviTQString::empty; } template<typename Key,typename T> class KviPointerHashTable; @@ -311,7 +311,7 @@ public: /// \endverbatim /// /// Implementations for the most likey Key data types are provided below. -/// KviPointerHashTable will automagically work with const char *,QString,KviStr +/// KviPointerHashTable will automagically work with const char *,TQString,KviStr /// and integer types as keys. /// /// For string Key types, the hash table may or may not be case sensitive. @@ -349,7 +349,7 @@ public: /// Places the hash table iterator at the position /// of the item found. /// - T * find(const Key & hKey) + T * tqfind(const Key & hKey) { m_uIteratorIdx = kvi_hash_hash(hKey,m_bCaseSensitive) % m_uSize; if(!m_pDataArray[m_uIteratorIdx])return 0; @@ -364,11 +364,11 @@ public: /// Returns the item associated to the key hKey /// or NULL if no such item exists in the hash table. /// Places the hash table iterator at the position - /// of the item found. This is an alias to find(). + /// of the item found. This is an alias to tqfind(). /// T * operator[](const Key & hKey) { - return find(hKey); + return tqfind(hKey); } /// @@ -427,7 +427,7 @@ public: /// The hash table iterator is placed at the newly inserted item. /// This is just an alias to insert() with a different name. /// - void replace(const Key & hKey,T * pData) + void tqreplace(const Key & hKey,T * pData) { insert(hKey,pData); } @@ -522,7 +522,7 @@ public: /// it's hash table entry, if found, and NULL otherwise. /// The hash table iterator is placed at the item found. /// - KviPointerHashTableEntry<Key,T> * findRef(const T * pRef) + KviPointerHashTableEntry<Key,T> * tqfindRef(const T * pRef) { for(m_uIteratorIdx = 0;m_uIteratorIdx<m_uSize;m_uIteratorIdx++) { @@ -540,7 +540,7 @@ public: /// /// Returns the entry pointed by the hash table iterator. /// This function must be preceeded by a call to firstEntry(), first() - /// or findRef(). + /// or tqfindRef(). /// KviPointerHashTableEntry<Key,T> * currentEntry() { @@ -568,7 +568,7 @@ public: /// Places the hash table iterator at the next entry /// and returns it. /// This function must be preceeded by a call to firstEntry(), first() - /// or findRef(). + /// or tqfindRef(). /// KviPointerHashTableEntry<Key,T> * nextEntry() { @@ -596,7 +596,7 @@ public: /// /// Returns the data value pointer pointed by the hash table iterator. /// This function must be preceeded by a call to firstEntry(), first() - /// or findRef(). + /// or tqfindRef(). /// T * current() { @@ -613,7 +613,7 @@ public: /// /// Returns the key pointed by the hash table iterator. /// This function must be preceeded by a call to firstEntry(), first() - /// or findRef(). + /// or tqfindRef(). /// const Key & currentKey() { @@ -648,7 +648,7 @@ public: /// Places the hash table iterator at the next entry /// and returns the associated data value pointer. /// This function must be preceeded by a call to firstEntry(), first() - /// or findRef(). + /// or tqfindRef(). /// T * next() { @@ -681,7 +681,7 @@ public: /// Removes all items in the hash table and then /// makes a complete shallow copy of the data contained in t. /// The removed items are deleted if autodeletion is enabled. - /// The hash table iterator is invalidated. + /// The hash table iterator is tqinvalidated. /// Does not change autodelete flag: make sure you not delete the items twice :) /// void copyFrom(KviPointerHashTable<Key,T> &t) @@ -693,7 +693,7 @@ public: /// /// Inserts a complete shallow copy of the data contained in t. - /// The hash table iterator is invalidated. + /// The hash table iterator is tqinvalidated. /// void insert(KviPointerHashTable<Key,T> &t) { |