-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel.h
92 lines (76 loc) · 2.34 KB
/
model.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#ifndef MODEL_H
#define MODEL_H
#include "tachemanager.h"
#include "tacheunitaire.h"
#include "tachecomposite.h"
#include "projetmanager.h"
#include "programmationmanager.h"
class Model {
private:
public:
Model();
/**
* @brief ajoute une tache dans le tache manager
* @param tache la tache à ajouter
*/
static void ajouterTache(Tache* tache) {
TacheManager::getInstance()->ajouterElement(tache);
}
/**
* @brief ajoute un projet dans le projet manager
* @param projet le projet à ajouter
*/
static void ajouterProjet(Projet* projet) {
ProjetManager::getInstance()->ajouterElement(projet);
}
/**
* @brief ajoute une programmation dans le programmation manager
* @param programmation la programmation à ajouter
*/
static void ajouterProgrammation(Programmation* programmation) {
ProgrammationManager::getInstance()->ajouterElement(programmation);
}
/**
* @brief Recupere la liste des taches
* @return la liste des taches
*/
static std::list<Tache*> getTaches() {
return TacheManager::getInstance()->getListe();
}
/**
* @brief Recupere la liste des projets
* @return la liste des projets
*/
static std::list<Projet*> getProjets() {
return ProjetManager::getInstance()->getListe();
}
/**
* @brief Recupere la liste des programmations
* @return la liste des programmations
*/
static std::list<Programmation*> getProgrammations() {
return ProgrammationManager::getInstance()->getListe();
}
/**
* @brief supprime une tache dans le tache manager
* @param tache la tache à supprimer
*/
static void supprimerTache(Tache* tache) {
TacheManager::getInstance()->supprimerElement(tache);
}
/**
* @brief supprime un projet dans le projet manager
* @param projet le projet à supprimer
*/
static void supprimerProjet(Projet* projet) {
ProjetManager::getInstance()->supprimerElement(projet);
}
/**
* @brief supprime une programmation dans le programmation manager
* @param programmation la programmation à supprimer
*/
static void supprimerProgrammation(Programmation* programmation) {
ProgrammationManager::getInstance()->supprimerElement(programmation);
}
};
#endif // MODEL_H