KVIrc
4.9.2
DeveloperAPIs
|
A fast pointer hash table iterator implementation. More...
#include <KviPointerHashTable.h>
Public Member Functions | |
T * | current () const |
Returs the value pointed by the iterator. More... | |
const Key & | currentKey () const |
Returs the key pointed by the iterator. More... | |
KviPointerHashTableIterator (const KviPointerHashTable< Key, T > &hTable) | |
Creates an iterator pointing to the first item in the hash table, if any. More... | |
bool | moveFirst () |
Moves the iterator to the first element of the hash table. More... | |
bool | moveLast () |
Moves the iterator to the last element of the hash table. More... | |
bool | moveNext () |
Moves the iterator to the next element of the hash table. More... | |
bool | movePrev () |
Moves the iterator to the previous element of the hash table. More... | |
T * | operator* () const |
Returs the value pointed by the iterator. More... | |
bool | operator++ () |
Moves the iterator to the next element of the hash table. More... | |
bool | operator-- () |
Moves the iterator to the previous element of the hash table. More... | |
void | operator= (const KviPointerHashTableIterator< Key, T > &src) |
Creates an iterator copy. More... | |
T * | toFirst () |
Moves the iterator to the first element of the hash table. More... | |
~KviPointerHashTableIterator () | |
Destroys the iterator. More... | |
Protected Attributes | |
const KviPointerHashTable< Key, T > * | m_pHashTable |
KviPointerListIterator < KviPointerHashTableEntry < Key, T > > * | m_pIterator |
unsigned int | m_uEntryIndex |
A fast pointer hash table iterator implementation.
|
inline |
Creates an iterator pointing to the first item in the hash table, if any.
hTable | The hash table |
References KviPointerHashTableIterator< Key, T >::m_pHashTable, KviPointerHashTableIterator< Key, T >::m_pIterator, KviPointerHashTableIterator< Key, T >::m_uEntryIndex, KviPointerHashTableIterator< Key, T >::moveFirst(), and NULL.
|
inline |
Destroys the iterator.
References KviPointerHashTableIterator< Key, T >::m_pIterator.
|
inline |
Returs the value pointed by the iterator.
If the iterator is not valid it returns a default constructed value This is an alias to operator *() with just a different name.
References KviPointerListIterator< T >::current(), KviPointerHashTableIterator< Key, T >::m_pIterator, and NULL.
Referenced by action_kvs_cmd_list(), ActionEditor::ActionEditor(), addon_kvs_cmd_list(), ClassEditorWidget::appendAllClassItems(), KviKvsHash::appendAsString(), KviStatusBar::appletsPopupAboutToShow(), KviStatusBar::appletsPopupActivated(), ClassEditorWidget::build(), KviStupidNotifyListManager::buildNickList(), KviIsOnNotifyListManager::buildNotifyList(), KviIsOnNotifyListManager::buildRegUserDict(), KviWatchNotifyListManager::buildRegUserDict(), KviKvsVariant::castToArray(), PluginManager::checkUnload(), KviSharedFilesManager::cleanup(), KviAvatarCache::cleanup(), KviModuleManager::cleanupUnusedModules(), KviKvsObjectController::clearUserClasses(), PopupEditorWidget::commit(), KviKvsAliasManager::completeCommand(), KviKvsKernel::completeFunction(), config_kvs_fnc_filelist(), config_kvs_fnc_id(), config_kvs_fnc_keylist(), config_kvs_fnc_open(), config_kvs_fnc_sectionlist(), KviApplication::connectionExists(), KviKvsVariant::convertToArray(), KviRegisteredUserDataBase::copyFrom(), KviUserIdentityManager::copyFrom(), KviCustomToolBarManager::createToolBarsVisibleAtStartup(), dcc_kvs_fnc_sessionList(), KviUserIdentityManager::defaultIdentity(), KviKvsScriptAddonManager::delayedLoad(), KviActionManager::delayedRegisterAccelerators(), KviKvsTimerManager::deleteAllTimers(), KviTrayIconWidget::doAway(), KviKvsTreeNodeSwitchList::dump(), KviKvsTreeNodeSwitchList::evaluate(), KviActionDrawer::fill(), KviTextIconWindow::fill(), KviTrayIconWidget::fillContextPopup(), RegisteredUserPropertiesDialog::fillData(), SharedFilesWindow::fillFileView(), AddonManagementDialog::fillListView(), OptionsWidget_servers::fillServerList(), OptionsWidget_textIcons::fillTable(), KviMainWindow::fillToolBarsPopup(), KviApplication::findConsole(), KviCustomToolBarManager::findDescriptorByInternalId(), KviApplication::findWindowByCaption(), KviCustomToolBarManager::firstExistingToolBar(), KviKvsObjectController::flushUserClasses(), KviKvsKernel::getAllFunctionsCommandsCore(), KviKvsModuleInterface::getAllFunctionsCommandsModule(), KviSoundPlayer::getAvailableSoundSystems(), KviModuleManager::hasLockedModules(), HttpFileTransfer::headersReceived(), KviApplication::heartbeat(), KviActionManager::killAllKvsUserActions(), KviClassEditorDialog::KviClassEditorDialog(), KviKvsHash::KviKvsHash(), KviKvsObjectClass::KviKvsObjectClass(), KviKvsCoreFunctions::KVSCF(), KviKvsCoreSimpleCommands::KVSCSC(), KviActionManager::listActionsByCategory(), KviRegisteredChannelDataBase::load(), KviKvsPopupManager::load(), KviCustomToolBarManager::load(), KviKvsAliasManager::load(), KviRegisteredUserDataBase::load(), KviActionManager::load(), KviAvatarCache::load(), KviUserIdentityManager::load(), KviIrcServerDataBase::load(), KviTextIconManager::load(), ClassEditorWidget::loadNotBuiltClasses(), KviIrcServerDataBase::makeCurrentServer(), KviUserListViewArea::mousePressEvent(), KviNotifyListManager::notifyOffLine(), KviNotifyListManager::notifyOnLine(), objects_kvs_fnc_classes(), objects_kvs_fnc_instances(), RegisteredUserEntryDialog::okClicked(), AliasEditorWidget::oneTimeSetup(), PopupEditorWidget::oneTimeSetup(), ClassEditorWidget::oneTimeSetup(), options_module_cleanup(), OptionsWidget_textEncoding::OptionsWidget_textEncoding(), package_kvs_fnc_info(), KviPackageWriter::packInternal(), KviUserListView::partAllButOne(), KviIrcUserDataBase::registeredDatabaseCleared(), KviIrcUserDataBase::registeredUserAdded(), KviIrcUserDataBase::registeredUserChanged(), RegisteredUserEntryDialog::RegisteredUserEntryDialog(), reguser_kvs_cmd_showlist(), reguser_kvs_fnc_list(), KviUserListView::removeAllEntries(), KviKvsAliasManager::removeNamespace(), KviConsoleWindow::resetAvatarForMatchingUsers(), KviApplication::resetAvatarForMatchingUsers(), KviApplication::restartLagMeters(), KviApplication::restartNotifyLists(), KviIrcUrl::run(), KviSharedFilesManager::save(), KviKvsPopupManager::save(), KviCustomToolBarManager::save(), KviKvsAliasManager::save(), KviConfigurationFile::save(), KviRegisteredUserDataBase::save(), KviActionManager::save(), KviKvsObjectClass::save(), KviUserIdentityManager::save(), KviAvatarCache::save(), KviKvsScriptAddonManager::save(), KviIrcServerDataBase::save(), KviTextIconManager::save(), ClassEditorWidget::saveNotBuiltClasses(), KviApplication::saveRecentChannels(), KviMainWindow::saveWindowProperties(), ClassEditorWidget::searchInheritedClasses(), ClassEditorWidget::searchReplace(), KviUserListView::select(), KviKvsHash::serialize(), serverdb_kvs_fnc_serverExists(), KviApplication::setAvatarFromOptions(), KviMainWindow::setButtonStyle(), KviMainWindow::setIconSize(), sharedfile_kvs_cmd_list(), SingleActionEditor::SingleActionEditor(), KviWatchNotifyListManager::start(), KviCustomToolBarManager::storeVisibilityState(), texticons_kvs_fnc_get(), KviPointerHashTableIterator< Key, T >::toFirst(), toolbar_kvs_fnc_list(), KviApplication::topmostConnectedConsole(), PluginManager::unloadAll(), KviModuleManager::unloadAllModules(), KviModuleExtensionManager::unregisterExtensionsByModule(), KviCustomToolBarManager::updateVisibleToolBars(), KviCustomToolBarManager::visibleToolBarCount(), window_kvs_fnc_list(), KviApplication::windowExists(), and KviActionManager::~KviActionManager().
|
inline |
Returs the key pointed by the iterator.
If the iterator is not valid it returns a default constructed value
References KviPointerListIterator< T >::current(), kvi_hash_key_default(), KviPointerHashTableIterator< Key, T >::m_pIterator, and NULL.
Referenced by KviIsOnNotifyListManager::buildNotifyList(), PluginManager::checkUnload(), KviSharedFilesManager::cleanup(), KviAvatarCache::cleanup(), PopupEditorWidget::commit(), KviKvsKernel::completeFunction(), config_kvs_fnc_filelist(), config_kvs_fnc_id(), config_kvs_fnc_keylist(), config_kvs_fnc_open(), config_kvs_fnc_sectionlist(), KviRegisteredUserDataBase::copyFrom(), KviKvsScriptAddonManager::delayedLoad(), KviKvsTreeNodeSwitchList::dump(), KviKvsTreeNodeSwitchList::evaluate(), KviTextIconWindow::fill(), RegisteredUserPropertiesDialog::fillData(), OptionsWidget_textIcons::fillTable(), KviKvsKernel::getAllFunctionsCommandsCore(), KviKvsModuleInterface::getAllFunctionsCommandsModule(), KviSoundPlayer::getAvailableSoundSystems(), HttpFileTransfer::headersReceived(), KviClassEditorDialog::KviClassEditorDialog(), KviKvsHash::KviKvsHash(), KviKvsObjectClass::KviKvsObjectClass(), KviRegisteredChannelDataBase::load(), KviKvsPopupManager::load(), KviCustomToolBarManager::load(), KviKvsAliasManager::load(), KviRegisteredUserDataBase::load(), KviActionManager::load(), KviAvatarCache::load(), KviUserIdentityManager::load(), KviIrcServerDataBase::load(), KviTextIconManager::load(), ClassEditorWidget::loadNotBuiltClasses(), objects_kvs_fnc_classes(), RegisteredUserEntryDialog::okClicked(), ClassEditorWidget::oneTimeSetup(), OptionsWidget_textEncoding::OptionsWidget_textEncoding(), package_kvs_fnc_info(), KviPackageWriter::packInternal(), KviUserListView::partAllButOne(), RegisteredUserEntryDialog::RegisteredUserEntryDialog(), reguser_kvs_cmd_showlist(), KviUserListView::removeAllEntries(), KviConsoleWindow::resetAvatarForMatchingUsers(), KviSharedFilesManager::save(), KviConfigurationFile::save(), KviRegisteredUserDataBase::save(), KviKvsObjectClass::save(), KviAvatarCache::save(), KviTextIconManager::save(), ClassEditorWidget::saveNotBuiltClasses(), KviApplication::saveRecentChannels(), KviMainWindow::saveWindowProperties(), KviKvsHash::serialize(), sharedfile_kvs_cmd_list(), KviWatchNotifyListManager::start(), texticons_kvs_fnc_get(), PluginManager::unloadAll(), and KviModuleExtensionManager::unregisterExtensionsByModule().
|
inline |
Moves the iterator to the first element of the hash table.
Returns true in case of success or false if the hash table is empty.
References KviPointerHashTableIterator< Key, T >::m_pHashTable, KviPointerHashTableIterator< Key, T >::m_pIterator, KviPointerHashTableIterator< Key, T >::m_uEntryIndex, KviPointerListIterator< T >::moveFirst(), and NULL.
Referenced by KviPointerHashTableIterator< Key, T >::KviPointerHashTableIterator(), OptionsWidget_textEncoding::OptionsWidget_textEncoding(), and KviPointerHashTableIterator< Key, T >::toFirst().
|
inline |
Moves the iterator to the last element of the hash table.
Returns true in case of success or false if the hash table is empty.
References KviPointerHashTableIterator< Key, T >::m_pHashTable, KviPointerHashTableIterator< Key, T >::m_pIterator, KviPointerHashTableIterator< Key, T >::m_uEntryIndex, KviPointerListIterator< T >::moveLast(), and NULL.
|
inline |
Moves the iterator to the next element of the hash table.
The iterator must be actually valid for this function to work. Returns true in case of success or false if there is no next item.
References KviPointerHashTableIterator< Key, T >::m_pHashTable, KviPointerHashTableIterator< Key, T >::m_pIterator, KviPointerHashTableIterator< Key, T >::m_uEntryIndex, KviPointerListIterator< T >::moveFirst(), KviPointerListIterator< T >::moveNext(), and NULL.
Referenced by PluginManager::checkUnload(), KviPointerHashTableIterator< Key, T >::operator++(), OptionsWidget_textEncoding::OptionsWidget_textEncoding(), package_kvs_fnc_info(), KviKvsAliasManager::removeNamespace(), and PluginManager::unloadAll().
|
inline |
Moves the iterator to the previous element of the hash table.
The iterator must be actually valid for this function to work. Returns true in case of success or false if there is no previous item.
References KviPointerHashTableIterator< Key, T >::m_pHashTable, KviPointerHashTableIterator< Key, T >::m_pIterator, KviPointerHashTableIterator< Key, T >::m_uEntryIndex, KviPointerListIterator< T >::moveLast(), KviPointerListIterator< T >::movePrev(), and NULL.
Referenced by KviPointerHashTableIterator< Key, T >::operator--().
|
inline |
Returs the value pointed by the iterator.
If the iterator is not valid it returns a default constructed value This is an alias to current() with just a different name.
References KviPointerListIterator< T >::current(), KviPointerHashTableIterator< Key, T >::m_pIterator, and NULL.
|
inline |
Moves the iterator to the next element of the hash table.
The iterator must be actually valid for this function to work. Returns true in case of success or false if there is no next item. This is just an alias to moveNext().
References KviPointerHashTableIterator< Key, T >::moveNext().
|
inline |
Moves the iterator to the previous element of the hash table.
The iterator must be actually valid for this function to work. Returns true in case of success or false if there is no previous item. This is just an alias to movePrev() with a different name.
References KviPointerHashTableIterator< Key, T >::movePrev().
|
inline |
Creates an iterator copy.
The new iterator points exactly to the item pointed by src.
src | The source pointer to copy from |
References KviPointerHashTableIterator< Key, T >::m_pHashTable, KviPointerHashTableIterator< Key, T >::m_pIterator, KviPointerHashTableIterator< Key, T >::m_uEntryIndex, and NULL.
|
inline |
Moves the iterator to the first element of the hash table.
Returns the first item found or NULL if the hash table is empty.
References KviPointerHashTableIterator< Key, T >::current(), KviPointerHashTableIterator< Key, T >::moveFirst(), and NULL.
Referenced by KviAvatarCache::cleanup(), and KviIrcServerDataBase::makeCurrentServer().
|
protected |
Referenced by KviPointerHashTableIterator< Key, T >::KviPointerHashTableIterator(), KviPointerHashTableIterator< Key, T >::moveFirst(), KviPointerHashTableIterator< Key, T >::moveLast(), KviPointerHashTableIterator< Key, T >::moveNext(), KviPointerHashTableIterator< Key, T >::movePrev(), and KviPointerHashTableIterator< Key, T >::operator=().
|
protected |
Referenced by KviPointerHashTableIterator< Key, T >::current(), KviPointerHashTableIterator< Key, T >::currentKey(), KviPointerHashTableIterator< Key, T >::KviPointerHashTableIterator(), KviPointerHashTableIterator< Key, T >::moveFirst(), KviPointerHashTableIterator< Key, T >::moveLast(), KviPointerHashTableIterator< Key, T >::moveNext(), KviPointerHashTableIterator< Key, T >::movePrev(), KviPointerHashTableIterator< Key, T >::operator*(), KviPointerHashTableIterator< Key, T >::operator=(), and KviPointerHashTableIterator< Key, T >::~KviPointerHashTableIterator().
|
protected |
Referenced by KviPointerHashTableIterator< Key, T >::KviPointerHashTableIterator(), KviPointerHashTableIterator< Key, T >::moveFirst(), KviPointerHashTableIterator< Key, T >::moveLast(), KviPointerHashTableIterator< Key, T >::moveNext(), KviPointerHashTableIterator< Key, T >::movePrev(), and KviPointerHashTableIterator< Key, T >::operator=().