KVIrc  4.9.2
DeveloperAPIs
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
KviPointerList< T > Class Template Reference

A template double linked list of pointers. More...

#include <KviPointerList.h>

Public Member Functions

void append (const T *d)
 Appends an item at the end of the list. More...
 
void append (KviPointerList< T > *l)
 Appends all the items from the list l to this list. More...
 
T * at (int idx)
 Returns the item at index position. More...
 
bool autoDelete ()
 Returns the autodelete flag. More...
 
void clear ()
 Removes all the items from the list. More...
 
void copyFrom (KviPointerList< T > *l)
 Clears the list and inserts all the items from the list l. More...
 
unsigned int count () const
 Returns the count of the items in the list. More...
 
T * current ()
 Returns the current iteration item. More...
 
int findRef (const T *d)
 Returns the position of an item. More...
 
T * first ()
 Returns the first item in the list. More...
 
void insert (int iIndex, const T *d)
 Inserts the item d at the position specified by iIndex. More...
 
void insertAfter (const T *ref, const T *d)
 Inserts the item d after the item ref. More...
 
void insertBefore (const T *ref, const T *d)
 Inserts the item d before the item ref. More...
 
void inSort (T *t)
 Inserts the item respecting the sorting order inside the list. More...
 
void invert ()
 Inverts the elements in the list. More...
 
bool isEmpty () const
 Returns true if the list is empty. More...
 
KviPointerListIterator< T > iteratorAt (int idx)
 Returns an iterator pointing to the item at the specified index. More...
 
KviPointerListIterator< T > iteratorAtCurrent ()
 Returns an iterator pointing to the current item in the list. More...
 
KviPointerListIterator< T > iteratorAtFirst ()
 Returns an iterator pointing to the first item of the list. More...
 
KviPointerListIterator< T > iteratorAtLast ()
 Returns an iterator pointing to the first item of the list. More...
 
KviPointerListIterator< T > iteratorAtRef (const T *d)
 Returns an iterator pointing to the item with pointer d. More...
 
 KviPointerList (bool bAutoDelete=true)
 Creates a template list. More...
 
T * last ()
 Returns the last item in the list. More...
 
void merge (KviPointerList< T > *src)
 Inserts the list src inside this list. More...
 
T * next ()
 Returns the next item in the list. More...
 
KviPointerList< T > & operator= (KviPointerList< T > &l)
 Clears the list and inserts all the items from the list l. More...
 
void prepend (KviPointerList< T > *l)
 Prepends all the items from the list l to this list. More...
 
void prepend (const T *d)
 Inserts the item d in the head position. More...
 
T * prev ()
 Returns the previous item in the list. More...
 
bool remove (int iIndex)
 Removes the item at zero-based position iIndex. More...
 
bool removeCurrent ()
 Removes the current iteration item. More...
 
bool removeFirst ()
 Removes the first item (if any) More...
 
bool removeLast ()
 Removes the firstitem (if any) More...
 
bool removeRef (const T *d)
 Removes the item pointed by d (if found in the list) More...
 
T * safeCurrent ()
 Returns the current iteration item. More...
 
void setAutoDelete (bool bAutoDelete)
 Sets the autodelete flag. More...
 
void sort ()
 Sorts this list in ascending order. More...
 
void swap (KviPointerList< T > *src)
 Swap the lists. More...
 
T * takeFirst ()
 Removes the first element from the list. More...
 
T * takeLast ()
 Removes the last item (if any) and returns it. This function obviously never deletes the item (regadless of autoDeletion()). More...
 
virtual ~KviPointerList ()
 Destroys the list. More...
 

Protected Member Functions

void grabFirstAndPrepend (KviPointerList< T > *src)
 Grabs the first element from the list src and puts it as the first element of this list. More...
 
void insertBeforeSafe (KviPointerListNode *ref, const T *d)
 Inserts the item d before the item ref. More...
 
void removeCurrentSafe ()
 Removes the current iteration item assuming that it is valid. More...
 

Protected Attributes

bool m_bAutoDelete
 
KviPointerListNodem_pAux
 
KviPointerListNodem_pHead
 
KviPointerListNodem_pTail
 
unsigned int m_uCount
 

Friends

class KviPointerListIterator< T >
 

Detailed Description

template<typename T>
class KviPointerList< T >

A template double linked list of pointers.

The main advantage of this type of list is speed. Insertion of pointers is very fast when compared to the typical "copy constructor" call used in the "plain type" template list implementations.

Iterating over pointers is also very fast and this class contains an internal iterator that allows to write loops in a compact and clean way. See the first(), next(), current() and findRef() functions for the description of this feature.

There is also a non-const external iterator that you can use to traverse the list concurrently. There is no const iterator (and no const access methods) since the list provides the autoDelete() method which vould implicitly violate constness. If you have to deal with const objects then you need to use a QList instead.

Your objects also do not need to support copy constructors or >= operators. This class will work fine without them as opposed to a plain QList.

This class also supports automatic deletion of the inseted items. See the setAutoDelete() and autoDelete() members for the description of the feature.

Typcal usage:

*   KviPointerList<MyClass> list();
*   list.append(new MyClass());
*   list.append(new MyClass());
*   ...
*   for(MyClass * c = list.first(); c; c = list.next()) doSomethingWith(c);
*   delete list; // autodelete is set to true in the constructor
* 
Warning
This class is absolutely NOT thread safe. You must protect concurrent access from multiple threads by using an external synchronization tool (such as KviMutex).

Constructor & Destructor Documentation

template<typename T>
KviPointerList< T >::KviPointerList ( bool  bAutoDelete = true)
inline

Creates a template list.

Parameters
bAutoDeleteThe state of autoDelete()
Returns
KviPointerList<T>
template<typename T>
virtual KviPointerList< T >::~KviPointerList ( )
inlinevirtual

Destroys the list.

If autoDelete() is set to true, all the items are deleted

Member Function Documentation

template<typename T>
void KviPointerList< T >::append ( const T *  d)
inline

Appends an item at the end of the list.

Parameters
dThe item to append
Returns
void

Referenced by DccBroker::activeVideoExecute(), DccBroker::activeVideoManage(), DccBroker::activeVoiceExecute(), DccBroker::activeVoiceManage(), KviCustomToolBarDescriptor::addAction(), BanFrame::addBan(), KviOptionsWidget::addBoolSelector(), KviOptionsWidget::addColorSelector(), ScriptEditorWidgetColorOptions::addColorSelector(), KviOptionsWidget::addDirectorySelector(), KviKvsPopupMenu::addEpilogue(), KviPackageWriter::addFileInternal(), KviOptionsWidget::addFileSelector(), KviOptionsWidget::addFontSelector(), KviKvsTreeNodeSpecialCommandClass::addFunctionDefinition(), KviKvsEvent::addHandler(), KviKvsTreeNodeInstructionBlock::addInstruction(), KviKvsTreeNodeDataList::addItem(), KviKvsPopupMenu::addItemInternal(), KviKvsTreeNodeSpecialCommandSwitch::addLabel(), KviKvsTreeNodeSpecialCommandDefpopupLabelPopup::addLabel(), KviRegisteredUser::addMask(), KviOptionsWidget::addMircTextColorSelector(), KviOptionsWidget::addOptionsWidget(), KviOptionsWidget::addPasswordSelector(), KviOptionsWidget::addPixmapSelector(), KviIdentityProfileSet::addProfile(), KviKvsPopupMenu::addPrologue(), KviKvsEventManager::addRawHandler(), KviNickServRuleSet::addRule(), KviOptionsWidget::addSoundSelector(), KviOptionsWidget::addStringListSelector(), KviOptionsWidget::addStringSelector(), KviOptionsWidget::addUIntSelector(), KviOptionsWidget::addUShortIntSelector(), KviMainWindow::addWindow(), AliasEditorWidget::aliasRefresh(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::append(), append_mask_to_list(), KviDnsResolverResult::appendAddress(), ClassEditorWidget::appendAllClassItems(), ClassEditorWidget::appendAllClassItemsRecursive(), AliasEditorWidget::appendAllItems(), AliasEditorWidget::appendAllItemsRecursive(), KviDnsResolverResult::appendHostname(), AliasEditorWidget::appendSelectedAliasItems(), AliasEditorWidget::appendSelectedAliasItemsRecursive(), ClassEditorWidget::appendSelectedClassItems(), ClassEditorWidget::appendSelectedClassItemsRecursive(), AliasEditorWidget::appendSelectedItems(), AliasEditorWidget::appendSelectedItemsRecursive(), ClassEditorWidget::build(), KviIsOnNotifyListManager::buildIsOnList(), KviStupidNotifyListManager::buildNickList(), KviIsOnNotifyListManager::buildNotifyList(), KviIsOnNotifyListManager::buildUserhostList(), KviSharedFilesManager::cleanup(), KviAvatarCache::cleanup(), KviModuleManager::cleanupUnusedModules(), KviKvsEvent::clearScriptHandlers(), KviKvsObjectController::clearUserClasses(), CodeTesterWindow::CodeTesterWindow(), KviConsoleWindow::completeChannel(), KviKvsAliasManager::completeCommand(), KviApplication::completeDirectory(), KviKvsKernel::completeFunction(), KviKvsKernel::completeModuleCommand(), KviKvsKernel::completeModuleFunction(), KviModuleManager::completeModuleNames(), KviUserListView::completeNickBashLike(), KviConsoleWindow::completeServer(), KviKvsObject::connectSignal(), KviNickServRuleSet::copyFrom(), KviIdentityProfileSet::copyFrom(), KviKvsPopupMenu::copyFrom(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::copyFrom(), KviShortcut::create(), DccFileTransfer::DccFileTransfer(), ActionEditor::deleteActions(), KviKvsTimerManager::deleteAllTimers(), LogViewWindow::deleteCurrent(), KviSharedFilesManager::doInsert(), KviKvsObject::emitSignal(), KviSensitiveThread::enqueueEvent(), DccBroker::executeChat(), ClassEditorWidget::exportClasses(), LogViewWindow::exportLog(), KviCustomToolBarDescriptor::fillToolBar(), findFrame(), KviKvsReport::findLineColAndListing(), DccBroker::handleChatRequest(), KviIsOnNotifyListManager::handleIsOn(), KviIsOnNotifyListManager::handleUserhost(), HelpWidget::HelpWidget(), HelpWindow::HelpWindow(), HttpFileTransfer::HttpFileTransfer(), KviIrcServerDataBase::importFromMircIni(), ListWindow::importList(), KviPointerHashTable< QString, KviActionCategory >::insert(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::insert(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::insertAfter(), KviClassicWindowList::insertButton(), KviMediaManager::insertMediaType(), KviTalWizard::insertPage(), KviIrcNetwork::insertServer(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::inSort(), KviMainWindow::installAccelerators(), KviChannelWindow::internalMask(), KviKvsObject::killAllChildrenWithClass(), KviActionManager::killAllKvsUserActions(), KviKvsObjectController::killAllObjectsWithClass(), KviThreadManager::killPendingEventsByReceiver(), KviFileTransferManager::killTerminatedTransfers(), KviAsyncAvatarSelectionDialog::KviAsyncAvatarSelectionDialog(), KviIrcMessage::KviIrcMessage(), KviKvsCallbackFileDialog::KviKvsCallbackFileDialog(), KviKvsCallbackImageDialog::KviKvsCallbackImageDialog(), KviKvsCallbackMessageBox::KviKvsCallbackMessageBox(), KviKvsCallbackTextInput::KviKvsCallbackTextInput(), KviKvsVariantList::KviKvsVariantList(), KviToolBarGraphicalApplet::KviToolBarGraphicalApplet(), KviLagMeter::lagCheckAbort(), KviLagMeter::lagCheckRegister(), LinksWindow::LinksWindow(), KviActionManager::listActionsByCategory(), ListWindow::ListWindow(), KviProxyDataBase::load(), KviKvsPopupManager::load(), KviKvsAliasManager::load(), KviCustomToolBarDescriptor::load(), KviIrcServerDataBase::load(), KviTextIconManager::load(), KviFile::load(), loadBanList(), ClassEditorWidget::loadNotBuiltClasses(), KviNickServRuleSet::loadPrivate(), KviIdentityProfileSet::loadPrivate(), KviKvsEventManager::loadRawEvents(), loadUrlList(), mediaplayer_module_init(), AliasEditorWidget::newItem(), AliasEditorWidget::oneTimeSetup(), options_module_cleanup(), ThemeManagementDialog::packTheme(), KviKvsParser::parseBindingOperationParameter(), KviKvsParser::parseCommaSeparatedParameterListNoTree(), KviKvsParser::parseExpressionOperandCore(), KviKvsParser::parseOperationRightSide(), KviKvsParser::parseSpecialCommandUnset(), DccBroker::passiveVideoExecute(), DccBroker::passiveVoiceExecute(), ListWindow::processData(), KviHttpRequest::processHeader(), KviStatusBar::queueMessage(), LogViewWindow::recurseDirectory(), DccBroker::recvFileManage(), KviAction::registerAction(), KviStatusBarAppletDescriptor::registerApplet(), KviIrcConnection::registerChannel(), KviKvsObject::registerChild(), KviKvsObjectClass::registerChildClass(), KviKvsObject::registerConnection(), KviIrcContext::registerContextWindow(), KviIrcContext::registerDataStreamMonitor(), KviIrcContext::registerDeadChannel(), KviIrcContext::registerDeadQuery(), KviModuleExtensionManager::registerExtension(), KviMainWindow::registerModuleExtensionToolBar(), KviKvsObjectController::registerObject(), KviModuleExtensionDescriptor::registerObject(), KviKvsAsyncOperationManager::registerOperation(), KviIrcConnection::registerQuery(), KviThreadManager::registerSlaveThread(), KviSoundPlayer::registerSoundThread(), KviFileTransferManager::registerTransfer(), RegistrationWizard::RegistrationWizard(), KviKvsEventManager::removeAllModuleAppHandlers(), KviKvsEventManager::removeAllModuleRawHandlers(), KviKvsEventManager::removeAllScriptRawHandlers(), KviMaskEditor::removeClicked(), KviChannelListSelector::removeClicked(), ClassEditorWidget::removeItem(), ClassEditorWidget::removeItemChildren(), AliasEditorWidget::renameItem(), DccBroker::renameOverwriteResume(), KviKvsRunTimeContext::report(), KviIdentDaemon::run(), KviKvsTimerManager::scheduleKill(), ScriptEditorImplementation::ScriptEditorImplementation(), ScriptEditorWidgetColorOptions::ScriptEditorWidgetColorOptions(), ClassEditorWidget::searchInheritedClasses(), DccChatThread::sendRawData(), KviDnsResolver::slotHostLookupTerminated(), SlowPasteController::SlowPasteController(), SocketSpyWindow::SocketSpyWindow(), spellchecker_reload_dicts(), KviCustomToolBar::syncDescriptor(), theme_kvs_cmd_pack(), torrent_module_init(), KviModuleManager::unloadAllModules(), KviModuleExtensionManager::unregisterExtensionsByModule(), url_module_init(), urllist_module_event_onUrl(), and UserWindow::UserWindow().

template<typename T>
void KviPointerList< T >::append ( KviPointerList< T > *  l)
inline

Appends all the items from the list l to this list.

Parameters
lThe source list where to get items
Returns
void
template<typename T>
T* KviPointerList< T >::at ( int  idx)
inline
template<typename T>
bool KviPointerList< T >::autoDelete ( )
inline

Returns the autodelete flag.

Returns
bool
template<typename T>
void KviPointerList< T >::clear ( )
inline
template<typename T>
void KviPointerList< T >::copyFrom ( KviPointerList< T > *  l)
inline

Clears the list and inserts all the items from the list l.

Parameters
lThe source list to copy from
Returns
void

Referenced by KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::operator=().

template<typename T>
unsigned int KviPointerList< T >::count ( ) const
inline

Returns the count of the items in the list.

Returns
unsigned int

Referenced by KviInputHistory::add(), KviKvsPopupMenu::addEpilogue(), KviKvsPopupMenu::addItem(), KviKvsPopupMenu::addLabel(), KviKvsPopupMenu::addPopup(), KviKvsPopupMenu::addPrologue(), KviKvsPopupMenu::addSeparator(), ClassEditorWidget::build(), DccBroker::canUnload(), KviAvatarCache::cleanup(), codetester_module_can_unload(), AliasEditorWidget::commit(), KviInputEditor::completion(), DccBroker::dccBoxCount(), DccBroker::dccWindowsCount(), LogViewWindow::deleteCurrent(), KviClassicWindowList::doLayout(), editor_module_can_unload(), AliasEditorWidget::exportAliases(), ClassEditorWidget::exportClasses(), RegisteredUsersDialog::exportClicked(), LogViewWindow::exportLog(), KviCustomToolBarDescriptor::fillToolBar(), KviKvsObject::function_childCount(), KviConsoleWindow::getWindowListTipText(), KviStupidNotifyListManager::handleIsOn(), KviSoundPlayer::havePlayingSounds(), KviInputEditor::historyNext(), KviInputEditor::historyPrev(), KviDnsResolver::hostnameCount(), KviStatusBar::insertPermanentWidgetAtTheEnd(), KviDnsResolver::ipAddressCount(), KviKvsTreeNodeDataList::item(), KviKvsTreeNodeCompositeData::KviKvsTreeNodeCompositeData(), KviLagMeter::lagCheckRegister(), ThemeFunctions::packageThemes(), KviPackageWriter::packInternal(), KviKvsParser::parseBindingOperationParameter(), KviKvsParser::parseExpressionOperandCore(), KviKvsParser::parseOperationRightSide(), KviKvsParser::parseSpecialCommandUnset(), PackThemeDataWidget::parseThemes(), KviStatusBar::queueMessage(), reguser_kvs_cmd_showlist(), reguser_kvs_fnc_list(), KviCustomToolBarDescriptor::removeAction(), KviMaskEditor::removeClicked(), ClassEditorWidget::removeItemChildren(), KviRegisteredUserDataBase::removeMaskByPointer(), KviSharedFilesManager::removeSharedFile(), ClassEditorWidget::renameClass(), ClassEditorWidget::renameFunction(), ClassEditorWidget::renameNamespace(), KviInputEditor::returnPressed(), HttpFileTransfer::runningTransfers(), KviProxyDataBase::save(), KviMediaManager::save(), KviNickServRuleSet::save(), KviCustomToolBarDescriptor::save(), KviInputHistory::save(), KviFile::save(), KviIdentityProfileSet::save(), KviStatusBar::save(), KviKvsPopupMenu::save(), saveBanList(), saveUrlList(), OptionsDialog::searchInSelectors(), AliasEditorWidget::searchReplace(), KviInputEditor::sendKvs(), KviInputEditor::sendPlain(), KviChannelWindow::setModeInList(), LogViewWindow::setupItemList(), KviLagMeter::timerEvent(), DccFileTransfer::transferCount(), ClassEditorWidget::updateClassHierarchy(), and KviMainWindow::~KviMainWindow().

template<typename T>
T* KviPointerList< T >::current ( )
inline
template<typename T>
int KviPointerList< T >::findRef ( const T *  d)
inline
template<typename T>
T* KviPointerList< T >::first ( )
inline

Returns the first item in the list.

Sets the iteration pointer to the first item in the list and returns that item (or 0 if the list is empty)

Returns
T *

Referenced by KviIrcContextDisplayAction::activeContextChanged(), KviConnectAction::activeContextStateChanged(), KviIrcContextDisplayAction::activeContextStateChanged(), KviGoAwayAction::activeContextStateChanged(), KviRegisteredUserDataBase::addMask(), AliasEditorWidget::aliasExists(), AliasEditorWidget::aliasRefresh(), KviModuleExtensionManager::allocateExtension(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::append(), append_mask_to_list(), KviStatusBar::appletAt(), KviMainWindow::applyOptions(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::at(), auto_detect_player(), auto_detect_torrent_client(), KviApplication::autoConnectToServers(), avatar_module_cleanup(), KviConsoleWindow::avatarChangedUpdateWindows(), BanFrame::BanFrame(), AliasEditorWidget::buildAliasesFile(), KviIsOnNotifyListManager::buildIsOnList(), KviIsOnNotifyListManager::buildUserhostList(), chan_kvs_fnc_banexceptionlist(), chan_kvs_fnc_banlist(), chan_kvs_fnc_invitelist(), chan_kvs_fnc_masklist(), chan_kvs_fnc_matchban(), chan_kvs_fnc_matchbanexception(), chan_kvs_fnc_matchinvite(), chan_kvs_fnc_matchmask(), chan_kvs_fnc_matchqban(), check_url(), KviSharedFilesManager::cleanup(), KviAvatarCache::cleanup(), KviModuleManager::cleanupUnusedModules(), UrlDialog::clear(), KviKvsObjectController::clearInstances(), KviKvsPopupMenu::clearMenuContents(), KviKvsEvent::clearScriptHandlers(), KviKvsObjectController::clearUserClasses(), KviIrcConnection::closeAllChannels(), KviIrcContext::closeAllContextWindows(), KviIrcContext::closeAllDeadChannels(), KviIrcContext::closeAllDeadQueries(), KviIrcConnection::closeAllQueries(), KviMainWindow::closeEvent(), KviMainWindow::closeWindow(), codetester_module_cleanup(), OptionsWidget_proxy::commit(), KviOptionsWidget::commitSelectors(), KviKvsKernel::completeFunction(), KviKvsKernel::completeModuleCommand(), KviKvsKernel::completeModuleFunction(), KviInputEditor::completion(), KviMainWindow::consoleCount(), context_kvs_fnc_list(), KviNickServRuleSet::copyFrom(), KviIdentityProfileSet::copyFrom(), KviKvsPopupMenu::copyFrom(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::copyFrom(), KviIrcNetwork::currentServer(), ActionEditor::deleteActions(), KviKvsTimerManager::deleteAllTimers(), OptionsInstanceManager::deleteInstanceTree(), KviSensitiveThread::dequeueEvent(), dialog_module_cleanup(), KviKvsDnsManager::dnsLookupTerminated(), KviSharedFilesManager::doInsert(), KviClassicWindowList::doLayout(), HttpFileTransfer::done(), DccFileTransfer::done(), KviStatusBar::dragMoveEvent(), KviKvsTreeNodeCompositeData::dump(), KviKvsTreeNodeSpecialCommandUnset::dump(), KviKvsTreeNodeInstructionBlock::dump(), KviKvsTreeNodeDataList::dump(), KviKvsTreeNodeSpecialCommandClass::dump(), KviKvsTreeNodeSpecialCommandSwitch::dump(), KviKvsTreeNodeSpecialCommandDefpopupLabelPopup::dump(), editor_module_cleanup(), KviKvsObject::emitSignal(), KviKvsTreeNodeSpecialCommandUnset::execute(), KviKvsTreeNodeSpecialCommandClass::execute(), KviKvsTreeNodeSpecialCommandSwitch::execute(), KviKvsPopupMenu::executeEpilogues(), KviKvsPopupMenu::executePrologues(), ClassEditorWidget::exportClasses(), RegisteredUsersDialog::exportClicked(), AliasEditorWidget::exportSelectionInSinglesFiles(), ClassEditorWidget::exportSelectionInSinglesFiles(), CustomizeToolBarsDialog::exportToolBar(), KviKvsTreeNodeSpecialCommandDefpopupLabelPopup::fill(), OptionsWidget_proxy::fillProxyList(), OptionsWidget_servers::fillServerList(), KviCustomToolBarDescriptor::fillToolBar(), KviMainWindow::fillToolBarsPopup(), FileTransferWindow::fillTransferView(), OptionsWidget_mediaTypes::fillTreeWidget(), OptionsDialog::fillTreeWidget(), KviIrcConnection::findChannel(), KviKvsObject::findChild(), KviKvsPopupMenu::findChildPopupByName(), KviIrcContext::findDeadChannel(), KviIrcContext::findDeadQuery(), KviRegisteredUserDataBase::findExactMask(), KviModuleExtensionManager::findExtensionDescriptor(), KviTalWizardPrivate::findFirstEnabledPage(), findFrame(), OptionsInstanceManager::findInstanceEntry(), KviRegisteredUser::findMask(), KviRegisteredUserDataBase::findMatchingMask(), KviMediaManager::findMediaTypeByFileMask(), KviMediaManager::findMediaTypeByIanaType(), KviMediaManager::findMediaTypeForRegularFile(), KviIdentityProfileSet::findName(), KviIdentityProfileSet::findNetwork(), KviTalWizardPrivate::findPage(), KviProxyDataBase::findProxy(), KviIrcConnection::findQuery(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::findRef(), KviIrcNetwork::findServer(), KviInputEditor::findSpellCheckerBlockAtCursor(), KviPointerHashTable< QString, KviActionCategory >::first(), KviMainWindow::firstConsole(), KviIrcContext::firstDeadChannel(), KviIrcContext::firstDeadQuery(), KviPointerHashTable< QString, KviActionCategory >::firstEntry(), KviDnsResolver::firstHostname(), KviDnsResolver::firstIpAddress(), KviClassicWindowList::firstItem(), KviMainWindow::firstNotConnectedConsole(), ListWindow::flush(), KviMainWindow::freeAccelleratorKeySequence(), KviKvsObject::function_children(), KviIrcConnection::gatherChannelAndPasswordPairs(), KviIrcConnection::gatherQueryNames(), KviKvsPopupMenu::generateDefPopupCore(), KviIrcConnection::getCommonChannels(), OptionsInstanceManager::getInstance(), KviIsOnNotifyListManager::handleIsOn(), DccFileTransfer::handleResumeAccepted(), DccFileTransfer::handleResumeRequest(), KviIsOnNotifyListManager::handleUserhost(), KviIrcConnection::heartbeat(), help_module_cleanup(), OptionsWidget_servers::importPopupAboutToShow(), KviClassicWindowList::insertButton(), KviMediaManager::insertMediaType(), KviChannelWindow::internalMask(), IrcNetworkDetailsWidget::IrcNetworkDetailsWidget(), IrcServerDetailsWidget::IrcServerDetailsWidget(), RegisteredUsersDialog::itemPressed(), KviIrcConnection::keepChannelsOpenAfterDisconnect(), KviIrcConnection::keepQueriesOpenAfterDisconnect(), KviKvsObject::killAllChildrenWithClass(), KviKvsObjectController::killAllObjectsWithClass(), KviFileTransferManager::killAllTransfers(), KviThreadManager::killPendingEventsByReceiver(), KviFileTransferManager::killTerminatedTransfers(), KviKvsTreeNodeCompositeData::KviKvsTreeNodeCompositeData(), KviKvsTreeNodeSpecialCommandUnset::KviKvsTreeNodeSpecialCommandUnset(), KviMaskEditor::KviMaskEditor(), KviKvsCoreSimpleCommands::KVSCSC(), KviLagMeter::lagCheckAbort(), KviLagMeter::lagCheckComplete(), lamerizer_module_cleanup(), links_module_cleanup(), list_module_cleanup(), KviProxyDataBase::load(), KviKvsPopupManager::load(), KviKvsAliasManager::load(), KviIrcServerDataBase::load(), KviTextIconManager::load(), ClassEditorWidget::loadNotBuiltClasses(), loadUrlList(), KviSharedFilesManager::lookupSharedFile(), KviKvsAsyncDnsOperation::lookupTerminated(), KviIrcServerDataBase::makeCurrentBestServerInNetwork(), KviIrcServerDataBase::makeCurrentServer(), KviRegisteredUser::matches(), KviRegisteredUser::matchesFixed(), KviNickServRuleSet::matchRule(), mediaplayer_module_ctrl(), mediaplayer_module_init(), KviMainWindow::moduleExtensionToolBar(), MP_KVS_COMMAND(), MP_KVS_FUNCTION(), AliasEditorWidget::namespaceExists(), KviPointerHashTable< QString, KviActionCategory >::next(), KviPointerHashTable< QString, KviActionCategory >::nextEntry(), DccFileTransfer::nonFailedTransferWithLocalFileName(), RegisteredUserEntryDialog::notifyCheckClicked(), ScriptEditorWidgetColorOptions::okClicked(), RawEditorWidget::oneTimeSetup(), options_kvs_cmd_pages(), options_module_cleanup(), OptionsWidget_identityProfile::OptionsWidget_identityProfile(), OptionsWidget_nickServ::OptionsWidget_nickServ(), ThemeFunctions::packageThemes(), KviPackageWriter::packInternal(), KviKvsParser::parseBindingOperationParameter(), KviKvsParser::parseExpressionOperandCore(), KviIrcServerParser::parseLiteralChghost(), KviIrcServerParser::parseLiteralNick(), KviIrcServerParser::parseLiteralQuit(), KviKvsParser::parseOperationRightSide(), KviKvsParser::parseSpecialCommandDefpopupLabelPopup(), PackThemeDataWidget::parseThemes(), SinglePopupEditor::populateMenu(), UrlDialog::popup(), KviHttpRequest::processHeader(), KviIrcServer::proxyServer(), KviStatusBar::queueMessage(), KviInputEditor::rebuildTextBlocks(), KviMainWindow::recreateWindowList(), RegisteredUserEntryDialog::RegisteredUserEntryDialog(), reguser_kvs_cmd_showlist(), reguser_kvs_fnc_mask(), reguser_module_cleanup(), KviTalWizardPrivate::reindexPages(), KviKvsTreeNodeInstructionBlock::releaseFirst(), KviKvsTreeNodeDataList::releaseFirst(), KviAction::reloadImages(), UrlDialog::remove(), KviCustomToolBarDescriptor::removeAction(), KviKvsEventManager::removeAllModuleAppHandlers(), KviKvsEventManager::removeAllModuleRawHandlers(), KviKvsEventManager::removeAllScriptRawHandlers(), BanFrame::removeBan(), KviKvsPopupMenu::removeItemByName(), KviRegisteredUserDataBase::removeMaskByPointer(), KviChannelWindow::removeMasks(), AliasEditorWidget::removeSelectedItems(), KviSharedFilesManager::removeSharedFile(), KviRegisteredUserDataBase::removeUser(), KviKvsReport::report(), rijndael_module_cleanup(), rot13_module_cleanup(), KviIrcUrl::run(), KviIdentDaemon::run(), DccFileTransfer::runningTransfersCount(), KviProxyDataBase::save(), KviMediaManager::save(), KviNickServRuleSet::save(), KviCustomToolBarDescriptor::save(), KviRegisteredUserDataBase::save(), KviInputHistory::save(), KviFile::save(), KviIdentityProfileSet::save(), KviStatusBar::save(), KviKvsPopupMenu::save(), saveBanList(), KviMainWindow::saveModuleExtensionToolBars(), saveUrlList(), serverdb_kvs_fnc_serverExists(), KviClassicWindowList::setActiveItem(), KviAction::setEnabled(), KviIrcConnection::setEncoding(), LogViewWindow::setupItemList(), KviKvsPopupMenu::setupMenuContents(), KviStatusBar::showFirstMessageInQueue(), socketspy_module_cleanup(), spaste_find_controller(), spaste_kvs_cmd_stop(), spaste_module_cleanup(), KviSoundPlayer::stopAllSoundThreads(), TC_KVS_COMMAND(), TC_KVS_FUNCTION(), term_module_cleanup(), KviLagMeter::timerEvent(), toolbar_kvs_fnc_items(), torrent_module_init(), KviKvsEventManager::triggerHandlers(), DccChatThread::tryFlushOutBuffers(), KviIrcConnection::unhighlightAllChannels(), KviIrcConnection::unhighlightAllQueries(), KviModuleManager::unloadAllModules(), KviModuleExtensionManager::unregisterExtensionsByModule(), KviMenuBar::updateActionsToolsPopup(), KviClassicWindowList::updateActivityMeter(), KviMenuBar::updateModulesToolsPopup(), KviProxyDataBase::updateProxyIp(), KviMainWindow::updatePseudoTransparency(), url_kvs_cmd_list(), url_module_cleanup(), urllist_module_event_onUrl(), window_module_cleanup(), DccBroker::~DccBroker(), KviAction::~KviAction(), KviIrcContext::~KviIrcContext(), KviKvsAsyncOperationManager::~KviKvsAsyncOperationManager(), KviKvsObject::~KviKvsObject(), KviKvsObjectClass::~KviKvsObjectClass(), KviKvsObjectController::~KviKvsObjectController(), KviMainWindow::~KviMainWindow(), KviModuleExtensionDescriptor::~KviModuleExtensionDescriptor(), KviStatusBarAppletDescriptor::~KviStatusBarAppletDescriptor(), and KviThreadManager::~KviThreadManager().

template<typename T>
void KviPointerList< T >::grabFirstAndPrepend ( KviPointerList< T > *  src)
inlineprotected

Grabs the first element from the list src and puts it as the first element of this list.

Parameters
srcThe source list
Returns
void

Referenced by KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::sort().

template<typename T>
void KviPointerList< T >::insert ( int  iIndex,
const T *  d 
)
inline

Inserts the item d at the position specified by iIndex.

The position is zero-based. If the specified position is out of the list then the item is appended. Note that this function costs O(n). It's really better to use insertAfter() or insertBefore(), if possible.

Parameters
iIndexThe index where to insert the item
dThe item to insert
Returns
void

Referenced by KviInputHistory::add(), append_mask_to_list(), KviAvatarCache::cleanup(), KviSharedFilesManager::doInsert(), OptionsDialog::fillTreeWidget(), OptionsInstanceManager::getInstance(), KviClassicWindowList::insertButton(), KviMediaManager::insertMediaType(), KviTalWizard::insertPage(), KviInputEditor::returnPressed(), KviInputEditor::sendKvs(), and KviInputEditor::sendPlain().

template<typename T>
void KviPointerList< T >::insertAfter ( const T *  ref,
const T *  d 
)
inline

Inserts the item d after the item ref.

If ref is not found in the list, the item is inserted at the end Also sets the current iteration pointer to the newly inserted item

Parameters
refThe index item
dThe item to insert after ref
Returns
void
template<typename T>
void KviPointerList< T >::insertBefore ( const T *  ref,
const T *  d 
)
inline

Inserts the item d before the item ref.

If ref is not found in the list, the item is inserted at the beginning. Also sets the current iteration pointer to the newly inserted item

Parameters
refThe index item
dThe item to insert before ref
Returns
void
template<typename T>
void KviPointerList< T >::insertBeforeSafe ( KviPointerListNode ref,
const T *  d 
)
inlineprotected

Inserts the item d before the item ref.

If ref is not found in the list, it inserts d at the beginning Also sets the current iteration pointer to the newly inserted item

Parameters
refThe source list node
dThe item to insert
Returns
void

Referenced by KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::insert(), and KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::inSort().

template<typename T>
void KviPointerList< T >::inSort ( T *  t)
inline

Inserts the item respecting the sorting order inside the list.

The list itself must be already sorted for this to work correctly. There must be a int kvi_compare(const T *p1, const T * p2) that returns a value less than, equal to or greater than zero when the item p1 is considered lower than, equal to or greater than p2.

Parameters
tThe item to insert
Returns
void

Referenced by KviStatusBar::appletsPopupActivated(), and KviStatusBar::registerApplet().

template<typename T>
void KviPointerList< T >::invert ( )
inline

Inverts the elements in the list.

Returns
void
template<typename T>
bool KviPointerList< T >::isEmpty ( ) const
inline

Returns true if the list is empty.

Returns
bool

Referenced by avatar_module_can_unload(), KviKvsEvent::clearScriptHandlers(), KviNickServRuleSet::copyFrom(), KviIdentityProfileSet::copyFrom(), ActionEditor::deleteActions(), dialog_module_can_unload(), KviKvsObject::disconnectSignal(), KviIsOnNotifyListManager::handleIsOn(), KviIsOnNotifyListManager::handleUserhost(), help_module_can_unload(), lamerizer_module_can_unload(), links_module_can_unload(), list_module_can_unload(), KviNickServRuleSet::loadPrivate(), KviIdentityProfileSet::loadPrivate(), KviIrcServerDataBase::makeCurrentBestServerInNetwork(), KviStatusBar::messageTimerFired(), KviIsOnNotifyListManager::newIsOnSession(), KviIsOnNotifyListManager::newNotifySession(), KviIsOnNotifyListManager::newUserhostSession(), ThemeManagementDialog::packTheme(), KviInputEditor::rebuildTextBlocks(), reguser_module_can_unload(), KviKvsEvent::removeHandler(), rijndael_module_can_unload(), rot13_module_can_unload(), KviNickServRuleSet::save(), KviIdentityProfileSet::save(), ScriptEditorImplementation::ScriptEditorImplementation(), LogViewWindow::setupItemList(), KviDnsResolver::slotHostLookupTerminated(), socketspy_module_can_unload(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::sort(), spaste_module_can_unload(), spellchecker_kvs_check(), spellchecker_kvs_suggestions(), spellchecker_module_cleanup(), spellchecker_reload_dicts(), KviStupidNotifyListManager::start(), theme_kvs_cmd_pack(), KviKvsObject::unregisterConnection(), KviIrcContext::unregisterContextWindow(), KviIrcContext::unregisterDataStreamMonitor(), KviIrcContext::unregisterDeadChannel(), KviIrcContext::unregisterDeadQuery(), KviFileTransferManager::unregisterTransfer(), KviMenuBar::updateActionsToolsPopup(), KviMenuBar::updateToolsPopup(), window_module_can_unload(), KviToolBarGraphicalApplet::~KviToolBarGraphicalApplet(), and ScriptEditorImplementation::~ScriptEditorImplementation().

template<typename T>
KviPointerListIterator<T> KviPointerList< T >::iteratorAt ( int  idx)
inline

Returns an iterator pointing to the item at the specified index.

Parameters
idxThe index of the element to return
Returns
KviPointerListIterator<T>
template<typename T>
KviPointerListIterator<T> KviPointerList< T >::iteratorAtCurrent ( )
inline

Returns an iterator pointing to the current item in the list.

A call to this function MUST be preceded by a call to first(),last(),at() or findRef()

Returns
KviPointerListIterator<T>
template<typename T>
KviPointerListIterator<T> KviPointerList< T >::iteratorAtFirst ( )
inline

Returns an iterator pointing to the first item of the list.

Returns
KviPointerListIterator<T>
template<typename T>
KviPointerListIterator<T> KviPointerList< T >::iteratorAtLast ( )
inline

Returns an iterator pointing to the first item of the list.

Returns
KviPointerListIterator<T>
template<typename T>
KviPointerListIterator<T> KviPointerList< T >::iteratorAtRef ( const T *  d)
inline

Returns an iterator pointing to the item with pointer d.

Parameters
dThe element to find
Returns
KviPointerListIterator<T>
template<typename T>
T* KviPointerList< T >::last ( )
inline
template<typename T>
void KviPointerList< T >::merge ( KviPointerList< T > *  src)
inline

Inserts the list src inside this list.

It respects the sort order. The src list elements are removed.

Parameters
srcThe list to insert
Returns
void

Referenced by KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::sort().

template<typename T>
T* KviPointerList< T >::next ( )
inline

Returns the next item in the list.

Sets the iteration pointer to the next item in the list and returns that item (or 0 if the end of the list has been reached) A call to this function MUST be preceded by a succesfull call to first(),last(),at() or findRef().

Returns
T *

Referenced by KviIrcContextDisplayAction::activeContextChanged(), KviConnectAction::activeContextStateChanged(), KviIrcContextDisplayAction::activeContextStateChanged(), KviGoAwayAction::activeContextStateChanged(), KviRegisteredUserDataBase::addMask(), AliasEditorWidget::aliasExists(), AliasEditorWidget::aliasRefresh(), KviModuleExtensionManager::allocateExtension(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::append(), append_mask_to_list(), KviStatusBar::appletAt(), KviMainWindow::applyOptions(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::at(), auto_detect_player(), auto_detect_torrent_client(), KviApplication::autoConnectToServers(), KviConsoleWindow::avatarChangedUpdateWindows(), BanFrame::BanFrame(), AliasEditorWidget::buildAliasesFile(), chan_kvs_fnc_banexceptionlist(), chan_kvs_fnc_banlist(), chan_kvs_fnc_invitelist(), chan_kvs_fnc_masklist(), chan_kvs_fnc_matchban(), chan_kvs_fnc_matchbanexception(), chan_kvs_fnc_matchinvite(), chan_kvs_fnc_matchmask(), chan_kvs_fnc_matchqban(), check_url(), KviSharedFilesManager::cleanup(), KviAvatarCache::cleanup(), KviModuleManager::cleanupUnusedModules(), UrlDialog::clear(), KviKvsPopupMenu::clearMenuContents(), KviKvsEvent::clearScriptHandlers(), KviKvsObjectController::clearUserClasses(), KviMainWindow::closeEvent(), KviMainWindow::closeWindow(), KviOptionsWidget::commitSelectors(), KviKvsKernel::completeFunction(), KviKvsKernel::completeModuleCommand(), KviKvsKernel::completeModuleFunction(), KviInputEditor::completion(), KviMainWindow::consoleCount(), context_kvs_fnc_list(), KviNickServRuleSet::copyFrom(), KviIdentityProfileSet::copyFrom(), KviKvsPopupMenu::copyFrom(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::copyFrom(), ActionEditor::deleteActions(), KviKvsTimerManager::deleteAllTimers(), OptionsInstanceManager::deleteInstanceTree(), KviKvsDnsManager::dnsLookupTerminated(), KviSharedFilesManager::doInsert(), KviClassicWindowList::doLayout(), KviKvsTreeNodeCompositeData::dump(), KviKvsTreeNodeSpecialCommandUnset::dump(), KviKvsTreeNodeInstructionBlock::dump(), KviKvsTreeNodeDataList::dump(), KviKvsTreeNodeSpecialCommandClass::dump(), KviKvsTreeNodeSpecialCommandSwitch::dump(), KviKvsTreeNodeSpecialCommandDefpopupLabelPopup::dump(), KviKvsObject::emitSignal(), KviKvsTreeNodeSpecialCommandUnset::execute(), KviKvsTreeNodeSpecialCommandClass::execute(), KviKvsTreeNodeSpecialCommandSwitch::execute(), KviKvsPopupMenu::executeEpilogues(), KviKvsPopupMenu::executePrologues(), ClassEditorWidget::exportClasses(), RegisteredUsersDialog::exportClicked(), AliasEditorWidget::exportSelectionInSinglesFiles(), ClassEditorWidget::exportSelectionInSinglesFiles(), CustomizeToolBarsDialog::exportToolBar(), KviKvsTreeNodeSpecialCommandDefpopupLabelPopup::fill(), OptionsWidget_proxy::fillProxyList(), OptionsWidget_servers::fillServerList(), KviCustomToolBarDescriptor::fillToolBar(), KviMainWindow::fillToolBarsPopup(), FileTransferWindow::fillTransferView(), OptionsWidget_mediaTypes::fillTreeWidget(), OptionsDialog::fillTreeWidget(), LogViewWindow::filterNext(), KviPointerHashTable< QString, KviActionCategory >::find(), KviIrcConnection::findChannel(), KviKvsObject::findChild(), KviKvsPopupMenu::findChildPopupByName(), KviIrcContext::findDeadChannel(), KviIrcContext::findDeadQuery(), KviRegisteredUserDataBase::findExactMask(), KviModuleExtensionManager::findExtensionDescriptor(), KviTalWizardPrivate::findFirstEnabledPage(), OptionsInstanceManager::findInstanceEntry(), KviRegisteredUser::findMask(), KviRegisteredUserDataBase::findMatchingMask(), KviMediaManager::findMediaTypeByFileMask(), KviMediaManager::findMediaTypeByIanaType(), KviMediaManager::findMediaTypeForRegularFile(), KviIdentityProfileSet::findName(), KviIdentityProfileSet::findNetwork(), KviTalWizardPrivate::findNextEnabledPage(), KviTalWizardPrivate::findPage(), KviProxyDataBase::findProxy(), KviIrcConnection::findQuery(), KviPointerHashTable< QString, KviActionCategory >::findRef(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::findRef(), KviKvsEventManager::findScriptAppHandler(), KviKvsEventManager::findScriptRawHandler(), KviIrcNetwork::findServer(), KviInputEditor::findSpellCheckerBlockAtCursor(), KviMainWindow::firstConsole(), KviMainWindow::firstNotConnectedConsole(), KviMainWindow::freeAccelleratorKeySequence(), KviKvsObject::function_children(), KviIrcConnection::gatherChannelAndPasswordPairs(), KviIrcConnection::gatherQueryNames(), KviKvsPopupMenu::generateDefPopupCore(), KviIrcConnection::getCommonChannels(), OptionsInstanceManager::getInstance(), KviIsOnNotifyListManager::handleIsOn(), DccFileTransfer::handleResumeAccepted(), DccFileTransfer::handleResumeRequest(), KviIsOnNotifyListManager::handleUserhost(), KviIrcConnection::heartbeat(), OptionsWidget_servers::importPopupAboutToShow(), KviPointerHashTable< QString, KviActionCategory >::insert(), KviClassicWindowList::insertButton(), KviMediaManager::insertMediaType(), KviChannelWindow::internalMask(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::invert(), IrcNetworkDetailsWidget::IrcNetworkDetailsWidget(), IrcServerDetailsWidget::IrcServerDetailsWidget(), RegisteredUsersDialog::itemPressed(), KviKvsObject::killAllChildrenWithClass(), KviKvsObjectController::killAllObjectsWithClass(), KviThreadManager::killPendingEventsByReceiver(), KviFileTransferManager::killTerminatedTransfers(), KviKvsTreeNodeCompositeData::KviKvsTreeNodeCompositeData(), KviKvsTreeNodeSpecialCommandUnset::KviKvsTreeNodeSpecialCommandUnset(), KviMaskEditor::KviMaskEditor(), KviKvsCoreSimpleCommands::KVSCSC(), KviLagMeter::lagCheckAbort(), KviLagMeter::lagCheckComplete(), KviKvsPopupManager::load(), KviKvsAliasManager::load(), KviTextIconManager::load(), ClassEditorWidget::loadNotBuiltClasses(), loadUrlList(), KviSharedFilesManager::lookupSharedFile(), KviKvsAsyncDnsOperation::lookupTerminated(), KviIrcServerDataBase::makeCurrentBestServerInNetwork(), KviIrcServerDataBase::makeCurrentServer(), KviRegisteredUser::matches(), KviRegisteredUser::matchesFixed(), KviNickServRuleSet::matchRule(), mediaplayer_module_ctrl(), mediaplayer_module_init(), KviMainWindow::moduleExtensionToolBar(), MP_KVS_COMMAND(), MP_KVS_FUNCTION(), AliasEditorWidget::namespaceExists(), KviPointerHashTable< QString, KviActionCategory >::next(), KviPointerHashTable< QString, KviActionCategory >::nextEntry(), KviClassicWindowList::nextItem(), DccFileTransfer::nonFailedTransferWithLocalFileName(), RegisteredUserEntryDialog::notifyCheckClicked(), ScriptEditorWidgetColorOptions::okClicked(), RawEditorWidget::oneTimeSetup(), options_kvs_cmd_pages(), options_module_cleanup(), OptionsWidget_identityProfile::OptionsWidget_identityProfile(), OptionsWidget_nickServ::OptionsWidget_nickServ(), ThemeFunctions::packageThemes(), KviPackageWriter::packInternal(), KviIrcServerParser::parseLiteralChghost(), KviIrcServerParser::parseLiteralNick(), KviIrcServerParser::parseLiteralQuit(), KviKvsParser::parseSpecialCommandDefpopupLabelPopup(), PackThemeDataWidget::parseThemes(), SinglePopupEditor::populateMenu(), UrlDialog::popup(), KviHttpRequest::processHeader(), KviIrcServer::proxyServer(), KviInputEditor::rebuildTextBlocks(), KviMainWindow::recreateWindowList(), RegisteredUserEntryDialog::RegisteredUserEntryDialog(), reguser_kvs_cmd_showlist(), reguser_kvs_fnc_mask(), KviTalWizardPrivate::reindexPages(), KviAction::reloadImages(), UrlDialog::remove(), KviPointerHashTable< QString, KviActionCategory >::remove(), KviCustomToolBarDescriptor::removeAction(), KviKvsEventManager::removeAllModuleAppHandlers(), KviKvsEventManager::removeAllModuleRawHandlers(), KviKvsEventManager::removeAllScriptRawHandlers(), BanFrame::removeBan(), KviKvsPopupMenu::removeItemByName(), KviRegisteredUserDataBase::removeMaskByPointer(), KviChannelWindow::removeMasks(), KviKvsEventManager::removeModuleAppHandler(), KviKvsEventManager::removeModuleRawHandler(), KviPointerHashTable< QString, KviActionCategory >::removeRef(), KviKvsEventManager::removeScriptAppHandler(), KviKvsEventManager::removeScriptRawHandler(), AliasEditorWidget::removeSelectedItems(), KviSharedFilesManager::removeSharedFile(), KviKvsReport::report(), KviIrcUrl::run(), KviIdentDaemon::run(), DccFileTransfer::runningTransfersCount(), KviProxyDataBase::save(), KviMediaManager::save(), KviNickServRuleSet::save(), KviCustomToolBarDescriptor::save(), KviRegisteredUserDataBase::save(), KviInputHistory::save(), KviFile::save(), KviIdentityProfileSet::save(), KviStatusBar::save(), KviKvsPopupMenu::save(), KviKvsEventManager::saveAppEvents(), saveBanList(), KviMainWindow::saveModuleExtensionToolBars(), KviKvsEventManager::saveRawEvents(), saveUrlList(), KviStupidNotifyListManager::sendIsOn(), serverdb_kvs_fnc_serverExists(), KviClassicWindowList::setActiveItem(), KviAction::setEnabled(), KviIrcConnection::setEncoding(), KviKvsPopupMenu::setupMenuContents(), spaste_find_controller(), TC_KVS_COMMAND(), TC_KVS_FUNCTION(), toolbar_kvs_fnc_items(), torrent_module_init(), KviKvsEventManager::triggerHandlers(), KviIrcConnection::unhighlightAllChannels(), KviIrcConnection::unhighlightAllQueries(), KviModuleManager::unloadAllModules(), KviModuleExtensionManager::unregisterExtensionsByModule(), KviMenuBar::updateActionsToolsPopup(), KviClassicWindowList::updateActivityMeter(), KviMenuBar::updateModulesToolsPopup(), KviProxyDataBase::updateProxyIp(), KviMainWindow::updatePseudoTransparency(), KviConsoleWindow::updateUri(), url_kvs_cmd_list(), url_module_cleanup(), urllist_module_event_onUrl(), and KviAction::~KviAction().

template<typename T>
KviPointerList<T>& KviPointerList< T >::operator= ( KviPointerList< T > &  l)
inline

Clears the list and inserts all the items from the list l.

This is just an alias to copyFrom(l)

Parameters
lThe source list to copy from
Returns
KviPointerList<T> &
template<typename T>
void KviPointerList< T >::prepend ( KviPointerList< T > *  l)
inline
template<typename T>
void KviPointerList< T >::prepend ( const T *  d)
inline

Inserts the item d in the head position.

Parameters
dThe element to insert
Returns
void
template<typename T>
T* KviPointerList< T >::prev ( )
inline

Returns the previous item in the list.

Sets the iteration pointer to the previous item in the list and returns that item (or 0 if the beginning of the list has been reached). A call to this function MUST be preceded by a succesfull call to first(),last(),at() or findRef()

Returns
T *

Referenced by KviStatusBar::dragMoveEvent(), KviHistoryWindow::fill(), KviTalWizardPrivate::findLastEnabledPage(), KviTalWizardPrivate::findPrevEnabledPage(), OptionsInstanceManager::getInstance(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::prepend(), KviClassicWindowList::prevItem(), KviStatusBar::recalcMinimumHeight(), and KviChannelWindow::removeMasks().

template<typename T>
bool KviPointerList< T >::remove ( int  iIndex)
inline

Removes the item at zero-based position iIndex.

Does nothing and returns false if iIndex is out of the list. Please note that this function costs O(n).

Parameters
iIndexThe index where to remove the item
Returns
bool

Referenced by KviCustomToolBarDescriptor::removeAction().

template<typename T>
bool KviPointerList< T >::removeCurrent ( )
inline

Removes the current iteration item.

Returns true if the current iteration item was valid (and was removed) and false otherwise.

Returns
bool

Referenced by BanFrame::removeBan().

template<typename T>
void KviPointerList< T >::removeCurrentSafe ( )
inlineprotected
template<typename T>
bool KviPointerList< T >::removeFirst ( )
inline
template<typename T>
bool KviPointerList< T >::removeLast ( )
inline

Removes the firstitem (if any)

The item is deleted if autoDelete() is set to true

Returns
bool

Referenced by KviInputHistory::add(), KviInputEditor::returnPressed(), KviInputEditor::sendKvs(), and KviInputEditor::sendPlain().

template<typename T>
bool KviPointerList< T >::removeRef ( const T *  d)
inline

Removes the item pointed by d (if found in the list)

The item is deleted if the autoDelete() flag is set to true) Returns true if the item was in the list and false otherwise.

Parameters
dThe pointer to the item to delete
Returns
bool

Referenced by KviAction::actionDestroyed(), KviStatusBar::appletsPopupActivated(), KviOptionsWidget::childEvent(), KviOptionsWidget::childOptionsWidgetDestroyed(), KviKvsEvent::clearScriptHandlers(), KviMainWindow::closeWindow(), KviKvsObject::disconnectSignal(), KviOptionsWidget::eventFilter(), KviCustomToolBarDescriptor::fillToolBar(), KviMainWindow::freeAccelleratorKeySequence(), KviIsOnNotifyListManager::handleIsOn(), KviIsOnNotifyListManager::handleUserhost(), KviChannelWindow::internalMask(), KviLagMeter::lagCheckAbort(), UrlDialog::remove(), KviPointerHashTable< QString, KviActionCategory >::remove(), KviCustomToolBarDescriptor::removeAction(), KviKvsEvent::removeHandler(), AliasEditorWidget::removeItem(), KviClassicWindowList::removeItem(), KviKvsPopupMenu::removeItemByName(), AliasEditorWidget::removeItemChildren(), KviRegisteredUser::removeMask(), KviRegisteredUserDataBase::removeMaskByPointer(), KviKvsEventManager::removeModuleRawHandler(), KviPointerHashTable< QString, KviActionCategory >::removeRef(), KviKvsEventManager::removeScriptRawHandler(), KviOptionsWidget::removeSelector(), KviSharedFilesManager::removeSharedFile(), KviIdentDaemon::run(), KviStatusBarAppletDescriptor::unregisterApplet(), KviStatusBar::unregisterApplet(), KviIrcConnection::unregisterChannel(), KviKvsObject::unregisterChild(), KviKvsObjectClass::unregisterChildClass(), KviKvsObject::unregisterConnection(), KviIrcContext::unregisterContextWindow(), KviIrcContext::unregisterDataStreamMonitor(), DccBroker::unregisterDccBox(), DccBroker::unregisterDccWindow(), KviIrcContext::unregisterDeadChannel(), KviIrcContext::unregisterDeadQuery(), KviMainWindow::unregisterModuleExtensionToolBar(), KviKvsObjectController::unregisterObject(), KviModuleExtensionDescriptor::unregisterObject(), KviKvsAsyncOperationManager::unregisterOperation(), KviIrcConnection::unregisterQuery(), KviThreadManager::unregisterSlaveThread(), KviSoundPlayer::unregisterSoundThread(), KviFileTransferManager::unregisterTransfer(), CodeTesterWindow::~CodeTesterWindow(), DccFileTransfer::~DccFileTransfer(), HelpWidget::~HelpWidget(), HelpWindow::~HelpWindow(), HttpFileTransfer::~HttpFileTransfer(), KviAsyncAvatarSelectionDialog::~KviAsyncAvatarSelectionDialog(), KviKvsCallbackFileDialog::~KviKvsCallbackFileDialog(), KviKvsCallbackImageDialog::~KviKvsCallbackImageDialog(), KviKvsCallbackMessageBox::~KviKvsCallbackMessageBox(), KviKvsCallbackTextInput::~KviKvsCallbackTextInput(), KviToolBarGraphicalApplet::~KviToolBarGraphicalApplet(), LinksWindow::~LinksWindow(), ListWindow::~ListWindow(), RegistrationWizard::~RegistrationWizard(), ScriptEditorImplementation::~ScriptEditorImplementation(), SlowPasteController::~SlowPasteController(), SocketSpyWindow::~SocketSpyWindow(), and UserWindow::~UserWindow().

template<typename T>
T* KviPointerList< T >::safeCurrent ( )
inline

Returns the current iteration item.

A call to this function should be preceded by a call to first(),last(),at() or findRef(). This function will return a NULL pointer if the current item has been invalidated due to a remove operation.

Returns
T *
template<typename T>
void KviPointerList< T >::setAutoDelete ( bool  bAutoDelete)
inline

Sets the autodelete flag.

When this flag is on (default), all the items are deleted when removed from the list (or when the list is destroyed or cleared explicitly)

Parameters
bAutoDeleteThe state of the autoDelete()
Returns
void

Referenced by KviIrcConnectionAsyncData< KviAsyncWhoisInfo >::add(), KviKvsEvent::addHandler(), KviRegisteredUserDataBase::addMask(), KviIdentityProfileSet::addProfile(), KviKvsEventManager::addRawHandler(), KviNickServRuleSet::addRule(), KviSharedFilesManager::addSharedFile(), AliasEditorWidget::AliasEditorWidget(), AliasEditorWidget::aliasExists(), AliasEditorWidget::aliasRefresh(), avatar_module_init(), ClassEditorWidget::build(), KviIsOnNotifyListManager::buildIsOnList(), KviIsOnNotifyListManager::buildUserhostList(), KviSharedFilesManager::cleanup(), KviAvatarCache::cleanup(), KviModuleManager::cleanupUnusedModules(), KviProxyDataBase::clear(), KviKvsObjectController::clearInstances(), KviKvsEvent::clearScriptHandlers(), KviKvsObjectController::clearUserClasses(), codetester_module_init(), KviKvsKernel::completeCommandAllocateResult(), KviKvsKernel::completeFunction(), KviKvsKernel::completeFunctionAllocateResult(), KviKvsKernel::completeModuleCommand(), KviKvsKernel::completeModuleFunction(), KviInputEditor::completion(), KviKvsObject::connectSignal(), KviNickServRuleSet::copyFrom(), KviIdentityProfileSet::copyFrom(), DccBroker::DccBroker(), DccChatThread::DccChatThread(), ActionEditor::deleteActions(), KviKvsTimerManager::deleteAllTimers(), LogViewWindow::deleteCurrent(), dialog_module_init(), editor_module_init(), KviKvsObject::emitSignal(), AliasEditorWidget::exportAliases(), ClassEditorWidget::exportClasses(), LogViewWindow::exportLog(), KviCustomToolBarDescriptor::fillToolBar(), OptionsDialog::fillTreeWidget(), OptionsInstanceManager::getInstance(), KviIsOnNotifyListManager::handleIsOn(), KviIsOnNotifyListManager::handleUserhost(), help_module_init(), ListWindow::importList(), HttpFileTransfer::init(), DccFileTransfer::init(), KviKvsObject::killAllChildrenWithClass(), KviActionManager::killAllKvsUserActions(), KviKvsObjectController::killAllObjectsWithClass(), KviThreadManager::killPendingEventsByReceiver(), KviFileTransferManager::killTerminatedTransfers(), KviClassicWindowList::KviClassicWindowList(), KviCustomToolBarDescriptor::KviCustomToolBarDescriptor(), KviDnsResolverResult::KviDnsResolverResult(), KviInputEditor::KviInputEditor(), KviInputHistory::KviInputHistory(), KviIrcConnection::KviIrcConnection(), KviIrcMessage::KviIrcMessage(), KviIrcNetwork::KviIrcNetwork(), KviIsOnNotifyListManager::KviIsOnNotifyListManager(), KviKvsAsyncOperationManager::KviKvsAsyncOperationManager(), KviKvsObject::KviKvsObject(), KviKvsObjectClass::KviKvsObjectClass(), KviKvsObjectController::KviKvsObjectController(), KviKvsPopupMenu::KviKvsPopupMenu(), KviKvsTreeNodeCompositeData::KviKvsTreeNodeCompositeData(), KviKvsTreeNodeDataList::KviKvsTreeNodeDataList(), KviKvsTreeNodeInstructionBlock::KviKvsTreeNodeInstructionBlock(), KviKvsTreeNodeSpecialCommandClass::KviKvsTreeNodeSpecialCommandClass(), KviKvsTreeNodeSpecialCommandDefpopupLabelPopup::KviKvsTreeNodeSpecialCommandDefpopupLabelPopup(), KviKvsTreeNodeSpecialCommandSwitch::KviKvsTreeNodeSpecialCommandSwitch(), KviKvsVariantList::KviKvsVariantList(), KviLagMeter::KviLagMeter(), KviMainWindow::KviMainWindow(), KviMediaManager::KviMediaManager(), KviModuleExtensionDescriptor::KviModuleExtensionDescriptor(), KviOptionsWidget::KviOptionsWidget(), KviPackageWriter::KviPackageWriter(), KviProxyDataBase::KviProxyDataBase(), KviRegisteredUser::KviRegisteredUser(), KviRegisteredUserDataBase::KviRegisteredUserDataBase(), KviSensitiveThread::KviSensitiveThread(), KviSoundPlayer::KviSoundPlayer(), KviStatusBar::KviStatusBar(), KviStatusBarAppletDescriptor::KviStatusBarAppletDescriptor(), KviStupidNotifyListManager::KviStupidNotifyListManager(), KviTalWizard::KviTalWizard(), KviThreadManager::KviThreadManager(), KviToolBarGraphicalApplet::KviToolBarGraphicalApplet(), KviLagMeter::lagCheckAbort(), lamerizer_module_init(), links_module_init(), list_module_init(), KviActionManager::listActionsByCategory(), ListWindow::ListWindow(), KviKvsPopupManager::load(), KviKvsAliasManager::load(), KviIrcServerDataBase::load(), KviTextIconManager::load(), ClassEditorWidget::loadNotBuiltClasses(), KviNickServRuleSet::loadPrivate(), KviIdentityProfileSet::loadPrivate(), KviKvsEventManager::loadRawEvents(), mediaplayer_module_init(), AliasEditorWidget::namespaceExists(), options_module_cleanup(), ThemeManagementDialog::packTheme(), KviKvsParser::parseBindingOperationParameter(), KviKvsParser::parseCommaSeparatedParameterListNoTree(), KviKvsParser::parseExpressionOperandCore(), KviKvsParser::parseOperationRightSide(), KviKvsParser::parseSpecialCommandUnset(), KviHttpRequest::processHeader(), KviInputEditor::rebuildTextBlocks(), KviAction::registerAction(), KviKvsObject::registerConnection(), KviIrcContext::registerContextWindow(), KviIrcContext::registerDataStreamMonitor(), KviIrcContext::registerDeadChannel(), KviIrcContext::registerDeadQuery(), KviModuleExtensionManager::registerExtension(), KviFileTransferManager::registerTransfer(), reguser_module_init(), KviKvsTreeNodeInstructionBlock::releaseFirst(), KviKvsTreeNodeDataList::releaseFirst(), KviKvsEventManager::removeAllModuleAppHandlers(), KviKvsEventManager::removeAllModuleRawHandlers(), KviKvsEventManager::removeAllScriptRawHandlers(), KviMaskEditor::removeClicked(), KviChannelListSelector::removeClicked(), ClassEditorWidget::removeItemChildren(), AliasEditorWidget::removeSelectedItems(), ClassEditorWidget::removeSelectedItems(), ClassEditorWidget::renameClass(), ClassEditorWidget::renameFunction(), ClassEditorWidget::renameNamespace(), KviKvsParser::report(), KviKvsRunTimeContext::report(), rijndael_module_init(), rot13_module_init(), KviIdentDaemon::run(), KviKvsTimerManager::scheduleKill(), ScriptEditorWidgetColorOptions::ScriptEditorWidgetColorOptions(), KviKvsVariantList::setAutoDelete(), KviChannelWindow::setModeInList(), socketspy_module_init(), spaste_module_init(), ListWindow::startOfList(), KviSoundPlayer::stopAllSoundThreads(), term_module_init(), theme_kvs_cmd_pack(), KviChannelWindow::toggleListModeEditor(), torrent_module_init(), KviModuleManager::unloadAllModules(), KviModuleExtensionManager::unregisterExtensionsByModule(), ClassEditorWidget::updateClassHierarchy(), url_module_init(), window_module_init(), KviAction::~KviAction(), KviSensitiveThread::~KviSensitiveThread(), ListWindow::~ListWindow(), and RegistrationWizard::~RegistrationWizard().

template<typename T>
void KviPointerList< T >::sort ( )
inline

Sorts this list in ascending order.

There must be an int kvi_compare(const T *p1, const T *p2) function which returns a value less than, equal to or greater than zero when the item p1 is considered lower than, equal to or greater than p2.

Returns
void

Referenced by KviStatusBar::dragMoveEvent(), KviStatusBar::mousePressEvent(), and KviStatusBar::save().

template<typename T>
void KviPointerList< T >::swap ( KviPointerList< T > *  src)
inline

Swap the lists.

Parameters
srcThe list to swap with
Returns
void

Referenced by KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::sort().

template<typename T>
T* KviPointerList< T >::takeFirst ( )
inline

Removes the first element from the list.

It returns the item to the caller. This function obviously never deletes the item (regadless of autoDeletion()).

Returns
T *

Referenced by spellchecker_module_cleanup(), and spellchecker_reload_dicts().

template<typename T>
T* KviPointerList< T >::takeLast ( )
inline

Removes the last item (if any) and returns it. This function obviously never deletes the item (regadless of autoDeletion()).

Friends And Related Function Documentation

template<typename T>
friend class KviPointerListIterator< T >
friend

Member Data Documentation

template<typename T>
bool KviPointerList< T >::m_bAutoDelete
protected
template<typename T>
KviPointerListNode* KviPointerList< T >::m_pAux
protected

Referenced by KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::current(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::first(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::insert(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::insertAfter(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::insertBefore(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::insertBeforeSafe(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::iteratorAtCurrent(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::KviPointerList(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::last(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::merge(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::next(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::prev(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::remove(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::removeCurrent(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::removeCurrentSafe(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::removeFirst(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::removeLast(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::safeCurrent(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::takeFirst(), and KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::takeLast().

template<typename T>
KviPointerListNode* KviPointerList< T >::m_pHead
protected

Referenced by KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::append(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::clear(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::first(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::grabFirstAndPrepend(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::insert(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::insertBefore(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::insertBeforeSafe(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::inSort(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::invert(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::isEmpty(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::iteratorAt(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::iteratorAtFirst(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::iteratorAtRef(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::KviPointerList(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::merge(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::prepend(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::remove(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::removeCurrentSafe(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::removeFirst(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::removeLast(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::swap(), KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::takeFirst(), and KviPointerList< KviPointerHashTableEntry< QString, KviAction > >::takeLast().

template<typename T>
KviPointerListNode* KviPointerList< T >::m_pTail
protected
template<typename T>
unsigned int KviPointerList< T >::m_uCount
protected

The documentation for this class was generated from the following file: