preparation for avis
This commit is contained in:
parent
47ee545c0a
commit
929187436b
7 changed files with 23 additions and 7 deletions
|
@ -12,6 +12,8 @@ public:
|
||||||
|
|
||||||
Consultant(const Consultant &); // copy constructor
|
Consultant(const Consultant &); // copy constructor
|
||||||
const Consultant &operator=(const Consultant &); // copy assignement
|
const Consultant &operator=(const Consultant &); // copy assignement
|
||||||
|
|
||||||
|
virtual std::pair<std::vector<int>, int> avis(const RunProjet &projet);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -12,6 +12,8 @@ public:
|
||||||
|
|
||||||
Expert(const Expert &); // copy constructor
|
Expert(const Expert &); // copy constructor
|
||||||
const Expert &operator=(const Expert &); // copy assignement
|
const Expert &operator=(const Expert &); // copy assignement
|
||||||
|
|
||||||
|
virtual std::pair<std::vector<int>, int> avis(const RunProjet &projet);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef TP5_GESTIONNAIRE_HPP
|
#ifndef TP5_GESTIONNAIRE_HPP
|
||||||
#define TP5_GESTIONNAIRE_HPP 1
|
#define TP5_GESTIONNAIRE_HPP 1
|
||||||
|
|
||||||
#include <iostream>
|
#include "RunProjet.hpp"
|
||||||
|
|
||||||
class Gestionnaire {
|
class Gestionnaire {
|
||||||
friend std::ostream &operator<<(std::ostream &, const Gestionnaire &);
|
friend std::ostream &operator<<(std::ostream &, const Gestionnaire &);
|
||||||
|
@ -12,6 +12,9 @@ public:
|
||||||
|
|
||||||
Gestionnaire(const Gestionnaire &); // copy constructor
|
Gestionnaire(const Gestionnaire &); // copy constructor
|
||||||
const Gestionnaire &operator=(const Gestionnaire &); // copy assignement
|
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
|
#endif
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "../includes/Consultant.hpp"
|
#include "../includes/Consultant.hpp"
|
||||||
|
|
||||||
Consultant::Consultant() { std::cout << "Hello, Consultant!\n"; }
|
Consultant::Consultant() {}
|
||||||
|
|
||||||
Consultant::~Consultant() {}
|
Consultant::~Consultant() {}
|
||||||
|
|
||||||
|
@ -13,3 +13,8 @@ const Consultant &Consultant::operator=(const Consultant &src) {
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::pair<std::vector<int>, int> Consultant::avis(const RunProjet &projet) {
|
||||||
|
// TODO
|
||||||
|
return std::make_pair(std::vector<int>(), 0);
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "../includes/Expert.hpp"
|
#include "../includes/Expert.hpp"
|
||||||
|
|
||||||
Expert::Expert() { std::cout << "Hello, Expert!\n"; }
|
Expert::Expert() {}
|
||||||
|
|
||||||
Expert::~Expert() {}
|
Expert::~Expert() {}
|
||||||
|
|
||||||
|
@ -13,3 +13,8 @@ const Expert &Expert::operator=(const Expert &src) {
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::pair<std::vector<int>, int> Expert::avis(const RunProjet &projet) {
|
||||||
|
// TODO
|
||||||
|
return std::make_pair(std::vector<int>(), 0);
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "../includes/Gestionnaire.hpp"
|
#include "../includes/Gestionnaire.hpp"
|
||||||
|
|
||||||
Gestionnaire::Gestionnaire() { std::cout << "Hello, Gestionnaire!\n"; }
|
Gestionnaire::Gestionnaire() {}
|
||||||
|
|
||||||
Gestionnaire::~Gestionnaire() {}
|
Gestionnaire::~Gestionnaire() {}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#include "../includes/Consultant.hpp"
|
#include "../includes/Consultant.hpp"
|
||||||
#include "../includes/Expert.hpp"
|
#include "../includes/Expert.hpp"
|
||||||
#include "../includes/RunProjet.hpp"
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -19,11 +18,11 @@ int main() {
|
||||||
cout << "----- verification : ProtoProjet vide " << endl;
|
cout << "----- verification : ProtoProjet vide " << endl;
|
||||||
cout << pp << endl;
|
cout << pp << endl;
|
||||||
|
|
||||||
/* Consultant c;
|
Consultant c;
|
||||||
cout << c.avis(rp).second << endl; // dira 25
|
cout << c.avis(rp).second << endl; // dira 25
|
||||||
|
|
||||||
Expert e;
|
Expert e;
|
||||||
cout << e.avis(rp).second << endl; // dira 15 */
|
cout << e.avis(rp).second << endl; // dira 15
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue