This repository has been archived on 2023-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
GestionProjet/src/Expert.cpp

36 lines
794 B
C++
Raw Normal View History

2023-10-19 23:05:11 +02:00
#include "../includes/Expert.hpp"
2023-10-28 03:56:31 +02:00
Expert::Expert() {}
2023-10-19 23:05:11 +02:00
Expert::~Expert() {}
2023-10-27 23:27:41 +02:00
Expert::Expert(const Expert &) : Gestionnaire() {}
2023-10-19 23:05:11 +02:00
const Expert &Expert::operator=(const Expert &src) {
if (this == &src) {
return *this;
}
return *this;
}
2023-10-28 03:56:31 +02:00
2023-10-28 04:24:35 +02:00
std::ostream &operator<<(std::ostream &out, const Expert &data) {
return data.print(out);
}
2023-10-28 12:00:50 +02:00
std::pair<std::vector<int>, int> Expert::avis(const RunProjet &projet) const {
2023-10-28 11:51:31 +02:00
std::vector<int> ordonnancement;
if (!payer()) {
return std::make_pair(ordonnancement, -1);
}
2023-10-28 11:17:43 +02:00
const std::vector<const Tache *> taches = projet.consult_tasks();
const int duree_totale = taches.front()->dureeParal();
2023-10-28 04:06:37 +02:00
2023-10-28 11:17:43 +02:00
for (const Tache *it : taches) {
ordonnancement.push_back(it->unique_id);
}
return std::make_pair(ordonnancement, duree_totale);
2023-10-28 03:56:31 +02:00
}