bool Livre::operator==(const Livre & livre) const { if (titre_ == livre.obtenirTitre() && cote_ == livre.obtenirCote()) { return true; } else { return false; } }
bool Bibliotheque::ajouterLivre(Livre& livre) { if (trouverObjetEmpruntable(livre.obtenirCote()) == nullptr) { livres_.push_back(&livre); return true; } return false; }
void Livre::operator=(const Livre & livre) { titre_ = livre.obtenirTitre(); cote_ = livre.obtenirCote(); ageMinimal_ = livre.obtenirAgeMinimal(); annee_ = livre.obtenirAnnee(); nbDisponibles_ = livre.obtenirNbDisponibles(); nbExemplaires_ = livre.obtenirNbExemplaires(); }
void Bibliotheque::ajouterLivre(Livre & livre) { if (trouverLivre(livre.obtenirCote()) == nullptr) { vecLivre_.push_back(&livre); } }
bool operator==(const string & cote, const Livre & livre) { if (cote == livre.obtenirCote()) return true; else return false; }