You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
596 B
28 lines
596 B
#include "recette.hpp"
|
|
|
|
using namespace std;
|
|
|
|
namespace appli {
|
|
|
|
Recette::Recette(const string &nom, const string &description)
|
|
: nom{nom}, description{description}
|
|
{}
|
|
|
|
string Recette::getNom() const {
|
|
return nom;
|
|
}
|
|
|
|
string Recette::getDescription() const {
|
|
return description;
|
|
}
|
|
|
|
bool operator<(const Recette &r1, const Recette &r2) {
|
|
if(r1.getNom() < r2.getNom())
|
|
return true;
|
|
if(r1.getNom() > r2.getNom())
|
|
return false;
|
|
|
|
return r1.getDescription() < r2.getDescription();
|
|
}
|
|
|
|
} |