prettier printer!
This commit is contained in:
parent
c22771f587
commit
b4495026cb
2 changed files with 5 additions and 6 deletions
|
@ -35,18 +35,17 @@ const Projet &Projet::operator=(const Projet &src) {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostream &Projet::print(std::ostream &out) const {
|
std::ostream &Projet::print(std::ostream &out) const {
|
||||||
|
// Liste vide
|
||||||
if (taches.empty()) {
|
if (taches.empty()) {
|
||||||
out << "[]";
|
out << "[]";
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
out << '[';
|
out << "[\n";
|
||||||
for (Tache *t : taches) {
|
for (Tache *t : taches) {
|
||||||
out << *t << ", ";
|
out << " " << *t << ",\n";
|
||||||
}
|
}
|
||||||
|
out << ']';
|
||||||
// \b\b permet de retirer la dernière virgule
|
|
||||||
out << "\b\b]";
|
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ std::ostream &operator<<(std::ostream &out, const Tache::Etat &data) {
|
||||||
|
|
||||||
std::ostream &operator<<(std::ostream &out, const Tache &data) {
|
std::ostream &operator<<(std::ostream &out, const Tache &data) {
|
||||||
out << "Tâche(#" << data.unique_id << ", \"" << data.name << "\", "
|
out << "Tâche(#" << data.unique_id << ", \"" << data.name << "\", "
|
||||||
<< data.etat << ") => " << data.dependances.size() << " dépendances";
|
<< data.etat << ")\t=> " << data.dependances.size() << " dépendances";
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue