Example #1
0
bool Livre::operator==(const Livre & livre) const
{
	if (titre_ == livre.obtenirTitre() && cote_ == livre.obtenirCote()) {
		return true;
	}
	else {
		return false;
	}
}
Example #2
0
bool Bibliotheque::ajouterLivre(Livre& livre)
{
	if (trouverObjetEmpruntable(livre.obtenirCote()) == nullptr)
	{
		livres_.push_back(&livre);
		return true;
	}
	return false;
}
Example #3
0
void Livre::operator=(const Livre & livre)
{
	titre_ = livre.obtenirTitre();
	cote_ = livre.obtenirCote();
	ageMinimal_ = livre.obtenirAgeMinimal();
	annee_ = livre.obtenirAnnee();
	nbDisponibles_ = livre.obtenirNbDisponibles();
	nbExemplaires_ = livre.obtenirNbExemplaires();

	
}
Example #4
0
void Bibliotheque::ajouterLivre(Livre & livre)
{
	if (trouverLivre(livre.obtenirCote()) == nullptr) {
		vecLivre_.push_back(&livre);
	}
}
Example #5
0
bool operator==(const string & cote, const Livre & livre)
{
	if (cote == livre.obtenirCote()) return true;
	else return false;
}