|
|
|
@ -7,12 +7,12 @@ using namespace std;
|
|
|
|
|
using namespace reseau;
|
|
|
|
|
|
|
|
|
|
Contact::Contact(const Personne& Proprietaire): Proprietaire{Proprietaire} {
|
|
|
|
|
cout << "Contact créé " << Proprietaire << "\n";
|
|
|
|
|
// cout << "Contact créé " << Proprietaire << "\n";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool Contact::ajouterContact(const Personne& unContact){
|
|
|
|
|
if(lesContacts.empty()){
|
|
|
|
|
cout << "Contact ajouté " << unContact <<"\n";
|
|
|
|
|
// cout << "Contact ajouté " << unContact <<"\n";
|
|
|
|
|
lesContacts.push_back(&unContact);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
@ -27,7 +27,7 @@ bool Contact::ajouterContact(const Personne& unContact){
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
cout << "Contact ajouté " << unContact <<"\n";
|
|
|
|
|
// cout << "Contact ajouté " << unContact <<"\n";
|
|
|
|
|
lesContacts.push_back(&unContact);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
@ -75,7 +75,7 @@ void Contact::afficherContactDirect() {
|
|
|
|
|
|
|
|
|
|
void Contact::afficherContactIndirect() {
|
|
|
|
|
cout << lesContacts.size() << " Les contacts directs et indirects de " << this->Proprietaire << " sont : ";
|
|
|
|
|
if(lesContacts.empty())
|
|
|
|
|
if(lesContacts.size()==0)
|
|
|
|
|
cout << " Aucun contact ";
|
|
|
|
|
cout << "\n";
|
|
|
|
|
}
|
|
|
|
|