-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLoadFiles.h
55 lines (32 loc) · 817 Bytes
/
LoadFiles.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
//
// Created by Riccardo Becciolini on 24/08/20.
//
#ifndef LABPROJECT_LOADFILES_H
#define LABPROJECT_LOADFILES_H
#include "Subject.h"
#include <list>
#include <string>
#include <QtCore/QString>
#include <vector>
#include <iostream>
#include "File.h"
class LoadFiles : public Subject{
public:
explicit LoadFiles(std::vector<File*>& v) : vector(v) {}
virtual ~LoadFiles();
void subscribe(Observer *o) override;
void unsubscribe(Observer *o) override;
void notify() const override;
void load();
int getNumberFile() const {
return numberFile;
}
const std::vector<File *> &getVector() const {
return vector;
}
private:
std::list<Observer*> observers;
std::vector<File*> vector;
int numberFile;
};
#endif //LABPROJECT_LOADFILES_H