ContactList Class Reference

It's a STL based list design to store contacts. More...

#include <contactlist.h>

List of all members.

Public Member Functions

 ContactList ()
 Constructor.
 ~ContactList ()
 Destructor.
const ContactaddContact (const Contact &contact)
 Add a new contact to the list.
bool isContactInList (const Contact &contact)
 Tells if a contact is in the list or note.
bool removeContact (const int ID)
 Tells if a contact is in the list or note.
bool removeContact (const Contact &contact)
 Remove a contact of the list.
std::string toString () const
 Returns a string representation of the contact list.
ContactListConstIterator begin () const
 Returns a const iterator at the beginning of the list.
ContactListConstIterator end () const
 Returns a const iterator at the end of the list.
void clear ()
 Clear the list.
const Contact *const getContact (const int contactID) const
 Returns a contact which ID is contactID.
ContactgetContact (const int contactID)
 Returns a contact which ID is contactID.


Detailed Description

It's a STL based list design to store contacts.

Author:
Sylvain Archenault <sylvain.archenault@laposte.net>

Yves Houpert <yves.houpert@insa-rouen.fr>


Member Function Documentation

const Contact * ContactList::addContact const Contact contact  ) 
 

Add a new contact to the list.

It's a copy of contact which is stored in the list.

Parameters:
contact Contact to add to the list.
Returns:
A pointer to the item add.

ContactListConstIterator ContactList::begin  )  const [inline]
 

Returns a const iterator at the beginning of the list.

 

Returns:
Const iterator point the begin of the list.

ContactListConstIterator ContactList::end  )  const [inline]
 

Returns a const iterator at the end of the list.

 

Returns:
Const iterator point the end of the list.

Contact * ContactList::getContact const int  contactID  ) 
 

Returns a contact which ID is contactID.

Parameters:
contactID Contact ID to retrieve.
Returns:
Contact.

const Contact *const ContactList::getContact const int  contactID  )  const
 

Returns a contact which ID is contactID.

Parameters:
contactID Contact ID to retrieve.
Returns:
Contact.

bool ContactList::isContactInList const Contact contact  ) 
 

Tells if a contact is in the list or note.

Parameters:
contact Contact we want to test the existance.
Returns:
true if the contact is in the list, false otherwise.

bool ContactList::removeContact const Contact contact  ) 
 

Remove a contact of the list.

Parameters:
contact Contact to remove.
Returns:
true is the contact was successfully removed, false otherwise.

bool ContactList::removeContact const int  ID  ) 
 

Tells if a contact is in the list or note.

Parameters:
ID Contact ID to remove.
Returns:
true is the contact was successfully removed, false otherwise.

std::string ContactList::toString  )  const
 

Returns a string representation of the contact list.

Returns:
String representation.


The documentation for this class was generated from the following files:
Generated on Fri May 19 12:15:55 2006 for Bamboo Ch@t by  doxygen 1.4.6