preparation for avis

This commit is contained in:
Mylloon 2023-10-28 03:56:31 +02:00
parent 47ee545c0a
commit 929187436b
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
7 changed files with 23 additions and 7 deletions

View file

@ -12,6 +12,8 @@ public:
Consultant(const Consultant &); // copy constructor
const Consultant &operator=(const Consultant &); // copy assignement
virtual std::pair<std::vector<int>, int> avis(const RunProjet &projet);
};
#endif

View file

@ -12,6 +12,8 @@ public:
Expert(const Expert &); // copy constructor
const Expert &operator=(const Expert &); // copy assignement
virtual std::pair<std::vector<int>, int> avis(const RunProjet &projet);
};
#endif

View file

@ -1,7 +1,7 @@
#ifndef TP5_GESTIONNAIRE_HPP
#define TP5_GESTIONNAIRE_HPP 1
#include <iostream>
#include "RunProjet.hpp"
class Gestionnaire {
friend std::ostream &operator<<(std::ostream &, const Gestionnaire &);
@ -12,6 +12,9 @@ public:
Gestionnaire(const Gestionnaire &); // copy constructor
const Gestionnaire &operator=(const Gestionnaire &); // copy assignement
// Renvoie l'ordonnancement et la durée totale restante
virtual std::pair<std::vector<int>, int> avis(const RunProjet &) = 0;
};
#endif

View file

@ -1,6 +1,6 @@
#include "../includes/Consultant.hpp"
Consultant::Consultant() { std::cout << "Hello, Consultant!\n"; }
Consultant::Consultant() {}
Consultant::~Consultant() {}
@ -13,3 +13,8 @@ const Consultant &Consultant::operator=(const Consultant &src) {
return *this;
}
std::pair<std::vector<int>, int> Consultant::avis(const RunProjet &projet) {
// TODO
return std::make_pair(std::vector<int>(), 0);
}

View file

@ -1,6 +1,6 @@
#include "../includes/Expert.hpp"
Expert::Expert() { std::cout << "Hello, Expert!\n"; }
Expert::Expert() {}
Expert::~Expert() {}
@ -13,3 +13,8 @@ const Expert &Expert::operator=(const Expert &src) {
return *this;
}
std::pair<std::vector<int>, int> Expert::avis(const RunProjet &projet) {
// TODO
return std::make_pair(std::vector<int>(), 0);
}

View file

@ -1,6 +1,6 @@
#include "../includes/Gestionnaire.hpp"
Gestionnaire::Gestionnaire() { std::cout << "Hello, Gestionnaire!\n"; }
Gestionnaire::Gestionnaire() {}
Gestionnaire::~Gestionnaire() {}

View file

@ -1,6 +1,5 @@
#include "../includes/Consultant.hpp"
#include "../includes/Expert.hpp"
#include "../includes/RunProjet.hpp"
using namespace std;
@ -19,11 +18,11 @@ int main() {
cout << "----- verification : ProtoProjet vide " << endl;
cout << pp << endl;
/* Consultant c;
Consultant c;
cout << c.avis(rp).second << endl; // dira 25
Expert e;
cout << e.avis(rp).second << endl; // dira 15 */
cout << e.avis(rp).second << endl; // dira 15
return EXIT_SUCCESS;
}