Source Code (Use browser search to find items of interest.)
Class Index
kdelibs'KabKey (./kdelibs/kab/addressbook.h:45)
class KabKey
{
public:
bool operator==(const KabKey&) const; /**< The comparison operator. */
QCString getKey() const; /**< Get the key as a QCString. */
void setKey(const QCString&); /**< Set this key. */
protected:
QCString key; /**< The key of the in this database. */
class KabKeyPrivate;
KabKeyPrivate *d;
};
// -----------------------------------------------------------------------------
// this will be incremented when kab's file format changes significantly:
kdelibs'KabKey::setKey() (./kdelibs/kab/addressbook.cc:116)
KabKey::setKey(const QCString& text)
{
// ###########################################################################
key=text;
// ###########################################################################
}
QCString
kdelibs'KabKey::getKey() (./kdelibs/kab/addressbook.cc:124)
KabKey::getKey() const
{
// ###########################################################################
return key;
// ###########################################################################
}
AddressBook::ErrorCode
AddressBook::Entry::getAddress(int index, Address& address)
{
// ###########################################################################
list<Address>::iterator pos;
// -----
if(index>=0 && (unsigned)index<addresses.size())
{
pos=addresses.begin();
advance(pos, index);
address=*pos;
return AddressBook::NoError;
} else {
return AddressBook::OutOfRange;
}
// ###########################################################################
}
int AddressBook::Entry::noOfAddresses() const
{
return addresses.size();
}