-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrajet.hpp
80 lines (73 loc) · 1.9 KB
/
trajet.hpp
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
/*Turikumwe Fabrice E.
Allan Tarcy*/
#ifndef TRAJET_HPP
#define TRAJET_HPP
#include <iostream>
#include <string>
#include <vector>
#include "date.hpp"
#include "trajet.hpp"
#include "billet.hpp"
#include "escales.hpp"
#include "passager.hpp"
#include "compagnie.hpp"
#include "navire.hpp"
using namespace std;
class Passager;
class Escales;
class Billet;
class Compagnie;
class Capitaine;
class Navire;
class Second;
class Matelot;
class Date;
class Trajet
{
vector<Escales *> escales;
Escales *portDepart, *portArrive;
vector<Passager *> passagers;
vector<Billet *> billets;
Compagnie *compagnie;
Navire *navire;
Date *dateD, *dateA; //Format JJ/MM/AA HH:MM:SS
int prix;
Capitaine *capitaine;
vector<Second *> seconds;
vector<Matelot *> matelots;
public:
Trajet(Escales *portDepart, Escales *portArrivee, Navire *navire, Date *dateDepart, Date *dateArrivee);
virtual ~Trajet();
void ajoutEscales(Escales *escales);
void ajoutPassager(Passager *passager, Billet *billet);
Escales *getPortDepart();
Escales *getPortArrive();
Compagnie *getCompagnie();
void setPortDepart(Escales *portDepart);
void setPortArrive(Escales *portArrivee);
Date *getDateD()const;
Date *getDateA()const;
void setDateD(Date *dateDepart);
void setDateA(Date *dateArrivee);
void afficheEscales();
void affichePassagers();
void Affiche();
int getPrixInitial();
vector<Billet *> getBillets();
Capitaine *getCapitaine();
vector<Second *> getSeconds();
vector<Matelot *> getMatelots();
void setCapitaine(Capitaine *capitaine);
void ajouterSecond(Second *second);
void ajouterMatelot(Matelot *matelot);
void ajoutPersonnel(Capitaine *capitaine, vector<Second *> seconds, vector<Matelot *> matelots);
};
class TriTrajets
{
public:
bool operator()(const Trajet *t1, const Trajet *t2)
{
return t1 < t2;
}
};
#endif