Upload New File

main
Joan PIERRON 3 years ago
parent cea2ad2d50
commit 57365b319b

@ -0,0 +1,43 @@
#ifndef CONTACT3_hpp
#define CONTACT3_hpp
#include<list>
#include<iostream>
#include<set>
#include "Personne3.hpp"
namespace reseau2{
class Contact {
public:
virtual std::list<const Personne*> getValue() = 0;
virtual void ajtContact(const Personne& p) = 0;
virtual ~Contact() = default;
};
class ListeContact : public Contact {
std::list<const Personne*> personnes;
public:
std::list<const Personne*> getValue() override;
void ajtContact(const Personne& p) override;
};
class LiaisonPersonne {
const Personne* envoyeur;
const Personne* destinataire;
public:
LiaisonPersonne(const Personne *envoyeur, const Personne *destinataire);
const Personne *getEnvoyeur() const;
const Personne *getDestinataire() const;
};
class Conteneur : public Contact {
Personne* pers;
std::list<LiaisonPersonne> personnes;
public:
Conteneur(Personne *pers);
std::list<const Personne*> getValue() override;
void ajtContact(const Personne& p) override;
};
}
#endif
Loading…
Cancel
Save