-
Notifications
You must be signed in to change notification settings - Fork 0
/
consulta.h
64 lines (52 loc) · 1.37 KB
/
consulta.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
#ifndef CONSULTA_H
#define CONSULTA_H
#include <string>
#include "paciente.h"
#include "medico.h"
#include <iostream>
using namespace std;
class Consulta
{
private:
static Consulta * instance;
string consultorio;
string exame;
Paciente * paciente;
Medico * medico;
QList<Exame> *list = new QList<Exame>();
vector < class Observer * > views;
int indexExame=0;
int indexNotifyExame=0;
int indexNotifyResumo=0;
public:
Consulta(){};
QList<string> *log = new QList<string>();
// Consulta(string place, string exam, Paciente *patient, Medico *doctor);
void attach(Observer *obs);
void notify();
string getConsultorio() const;
void setConsultorio(const string &value);
string getExame() const;
void setExame(const string &value);
Paciente *getPaciente() const;
void setPaciente(Paciente *value);
Medico *getMedico() const;
void setMedico(Medico *value);
void addExame(Exame *exame);
static Consulta * getInstance();
QList<Exame> *getList() const;
void setList(QList<Exame> *value);
QList<string> *getLog() const;
void setLog(QList<string> *value);
};
class Observer {
// 2. "dependent" functionality
Consulta *model;
public:
Observer(){};
Observer(Consulta *mod);
virtual string * update() = 0;
protected:
Consulta *getConsulta();
};
#endif // CONSULTA_H