void VarList::unset(const QString &key) { VarList::Iterator it = findByKey(key); if(it == end()) return; remove(it); }
void VarList::set(const QString &key, const QString &data) { VarList::Iterator it = findByKey(key); if(it == end()) { VarListItem v; v.setKey(key); v.setData(data); append(v); } else { (*it).setData(data); } }
IMAccount* IMAccountList::findByKeyAndClone( const std::string& imAccountId ) { RecursiveMutex::ScopedLock lock( _mutex ); //VOXOX - JRT - 2009.07.13 IMAccount* result = NULL; IMAccount* temp = findByKey( imAccountId ); if ( temp ) { result = temp->clone(); //VOXOX - JRT - 2009.04.10 - TODO - Seems unnecessary to clone this, } // but it is called in about 180 places in the code! return result; }
//VOXOX CHANGE by Rolando - 2009.07.14 IMAccount* IMAccountList::findByKeyNoClone( const std::string& imAccountId ) { RecursiveMutex::ScopedLock lock( _mutex ); //VOXOX CHANGE by Rolando - 2009.07.14 IMAccount* result = NULL; IMAccount* temp = findByKey( imAccountId ); if ( temp ) { result = temp;//VOXOX CHANGE by Rolando - 2009.07.14 } return result; }
bool IMAccountList::contains( const IMAccount& rAcct ) { return ( findByKey( const_cast<IMAccount&>(rAcct).getKey() ) != NULL ); //Does locking }
boolean Error::isInitialized() { return (findByKey(0xFF, 0xFF) == 0); }
boolean WateringEvent::isInitialized() { return (findByKey(0xFF) == NULL); }
const QString & VarList::get(const QString &key) { VarList::Iterator it = findByKey(key); return (*it).data(); }