Projeto Biblioteca POO - PV26465
Loading...
Searching...
No Matches
Leitor.h
Go to the documentation of this file.
1#ifndef Leitor_H
2#define Leitor_H
3#include <string>
4#include <list>
5#include <vector>
6using namespace std;
7
8class Emprestimo; //Declaração antecipada da classe Emprestimo
9
15class Leitor {
16 protected:
17 string nome;
18 string id;
19 list<Emprestimo*> emprestimos; //Lista de empréstimos ativos
20 vector<Emprestimo*> historico_emprestimos; //Histórico de empréstimos
21
22 public:
23
24 Leitor(string n, string i); //nome e ID
25 virtual ~Leitor();
26 list<Emprestimo*> getEmprestimos() const;
27
28 virtual int getLimiteEmprestimos() const = 0; //Limite de empréstimos
29 virtual float getDescontoMulta() const = 0; //Desconto de multa
30 virtual bool podeProrrogar() const = 0; //Verifica se o leitor pode prorrogar o empréstimo
31 virtual void editarInformacoes() = 0; //Edita as informações do leitor
32
33 string getNome() const; //Obtém o nome do leitor
34 void adicionarEmprestimo(Emprestimo* e); //Adiciona um empréstimo à lista de empréstimos ativos
35 void removerEmprestimo(Emprestimo* e); //Remove um empréstimo da lista de empréstimos ativos
36 void LimparTodosEmprestimos(); //Limpa todos os empréstimos
37 string getID() const; //Obtém o ID do leitor
38 virtual string getTipo() const = 0; //Obtém o tipo de leitor
39 vector<Emprestimo*> getHistoricoEmprestimos() const; //Obtém o histórico de empréstimos
40};
41
42#endif // LEITOR_H
Classe que representa um empréstimo de livro na biblioteca.
Definition emprestimo.h:17
Classe base para representar um leitor na biblioteca.
Definition Leitor.h:15
void removerEmprestimo(Emprestimo *e)
Remove um empréstimo da lista de empréstimos.
Definition Leitor.cpp:47
vector< Emprestimo * > getHistoricoEmprestimos() const
Obtém o histórico de empréstimos do leitor.
Definition Leitor.cpp:38
Leitor(string n, string i)
Construtor da classe Leitor.
Definition Leitor.cpp:9
virtual int getLimiteEmprestimos() const =0
list< Emprestimo * > getEmprestimos() const
Definition Leitor.cpp:79
void LimparTodosEmprestimos()
Limpa todos os empréstimos.
Definition Leitor.cpp:57
virtual ~Leitor()
Destrutor da classe Leitor.
Definition Leitor.cpp:19
vector< Emprestimo * > historico_emprestimos
Definition Leitor.h:20
void adicionarEmprestimo(Emprestimo *e)
Adiciona um empréstimo à lista de empréstimos do leitor.
Definition Leitor.cpp:28
virtual bool podeProrrogar() const =0
string nome
Definition Leitor.h:17
string id
Definition Leitor.h:18
string getNome() const
Obtém o nome do leitor.
Definition Leitor.cpp:75
string getID() const
Obtém o ID do objeto Leitor.
Definition Leitor.cpp:66
list< Emprestimo * > emprestimos
Definition Leitor.h:19
virtual void editarInformacoes()=0
virtual string getTipo() const =0
virtual float getDescontoMulta() const =0