Projeto Biblioteca POO - PV26465
Loading...
Searching...
No Matches
Leitor Class Referenceabstract

Classe base para representar um leitor na biblioteca. More...

#include <Leitor.h>

Inheritance diagram for Leitor:
Estudante LeitorComum Professor Senior

Public Member Functions

 Leitor (string n, string i)
 Construtor da classe Leitor.
 
virtual ~Leitor ()
 Destrutor da classe Leitor.
 
list< Emprestimo * > getEmprestimos () const
 
virtual int getLimiteEmprestimos () const =0
 
virtual float getDescontoMulta () const =0
 
virtual bool podeProrrogar () const =0
 
virtual void editarInformacoes ()=0
 
string getNome () const
 Obtém o nome do leitor.
 
void adicionarEmprestimo (Emprestimo *e)
 Adiciona um empréstimo à lista de empréstimos do leitor.
 
void removerEmprestimo (Emprestimo *e)
 Remove um empréstimo da lista de empréstimos.
 
void LimparTodosEmprestimos ()
 Limpa todos os empréstimos.
 
string getID () const
 Obtém o ID do objeto Leitor.
 
virtual string getTipo () const =0
 
vector< Emprestimo * > getHistoricoEmprestimos () const
 Obtém o histórico de empréstimos do leitor.
 

Protected Attributes

string nome
 
string id
 
list< Emprestimo * > emprestimos
 
vector< Emprestimo * > historico_emprestimos
 

Detailed Description

Classe base para representar um leitor na biblioteca.

Esta classe define as características e comportamentos comuns a todos os tipos de leitores

Constructor & Destructor Documentation

◆ Leitor()

Leitor::Leitor ( string n,
string i )

Construtor da classe Leitor.

Parameters
nO nome do leitor.
iO ID do leitor.

◆ ~Leitor()

Leitor::~Leitor ( )
virtual

Destrutor da classe Leitor.

Este destrutor é responsável por limpar qualquer recurso que o objeto Leitor possa ter adquirido durante sua vida.

Member Function Documentation

◆ adicionarEmprestimo()

void Leitor::adicionarEmprestimo ( Emprestimo * e)

Adiciona um empréstimo à lista de empréstimos do leitor.

Parameters
ePonteiro para o objeto Emprestimo a ser adicionado.

◆ editarInformacoes()

virtual void Leitor::editarInformacoes ( )
pure virtual

Implemented in Estudante, LeitorComum, Professor, and Senior.

◆ getDescontoMulta()

virtual float Leitor::getDescontoMulta ( ) const
pure virtual

Implemented in Estudante, LeitorComum, Professor, and Senior.

◆ getEmprestimos()

list< Emprestimo * > Leitor::getEmprestimos ( ) const

◆ getHistoricoEmprestimos()

vector< Emprestimo * > Leitor::getHistoricoEmprestimos ( ) const

Obtém o histórico de empréstimos do leitor.

Returns
Um vetor de ponteiros para objetos Emprestimo.

◆ getID()

string Leitor::getID ( ) const

Obtém o ID do objeto Leitor.

Returns
Uma string representando o ID do Leitor.

◆ getLimiteEmprestimos()

virtual int Leitor::getLimiteEmprestimos ( ) const
pure virtual

Implemented in Estudante, LeitorComum, Professor, and Senior.

◆ getNome()

string Leitor::getNome ( ) const

Obtém o nome do leitor.

Returns
Uma string contendo o nome do leitor.

◆ getTipo()

virtual string Leitor::getTipo ( ) const
pure virtual

Implemented in Estudante, LeitorComum, Professor, and Senior.

◆ LimparTodosEmprestimos()

void Leitor::LimparTodosEmprestimos ( )

Limpa todos os empréstimos.

Esta função remove todos os elementos do vetor de empréstimos, efetivamente limpando todos os registros de empréstimos.

◆ podeProrrogar()

virtual bool Leitor::podeProrrogar ( ) const
pure virtual

Implemented in Estudante, LeitorComum, Professor, and Senior.

◆ removerEmprestimo()

void Leitor::removerEmprestimo ( Emprestimo * e)

Remove um empréstimo da lista de empréstimos.

Parameters
ePonteiro para o objeto Emprestimo a ser removido.

Member Data Documentation

◆ emprestimos

list<Emprestimo*> Leitor::emprestimos
protected

◆ historico_emprestimos

vector<Emprestimo*> Leitor::historico_emprestimos
protected

◆ id

string Leitor::id
protected

◆ nome

string Leitor::nome
protected

The documentation for this class was generated from the following files: