From ec18992ba65d6a1cf4d46eae3d8b96420278fa0b Mon Sep 17 00:00:00 2001 From: giomba Date: Thu, 16 Jul 2020 23:41:52 +0200 Subject: [PATCH] added getters of single fields --- lib/CNS.cpp | 38 +++++++++++++++++++++++++++++++++++++- lib/CNS.h | 10 ++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/lib/CNS.cpp b/lib/CNS.cpp index 69e5f9b..a819d20 100644 --- a/lib/CNS.cpp +++ b/lib/CNS.cpp @@ -51,4 +51,40 @@ QTextStream& operator<< (QTextStream& os, const CNS& cns) { os << "Sesso:\t" << ((cns.sesso == F) ? 'F' : 'M') << endl; return os; -} \ No newline at end of file +} + +QString CNS::getNome() { + return this->nome; +} + +QString CNS::getCognome() { + return this->cognome; +} + +QDate CNS::getDataNascita() { + return this->dataNascita; +} + +QString CNS::getComuneNascita() { + return this->comuneNascita; +} + +QString CNS::getComuneResidenza() { + return this->comuneResidenza; +} + +QString CNS::getCodiceFiscale() { + return this->codiceFiscale; +} + +Sex CNS::getSesso() { + return this->sesso; +} + +QDate CNS::getDataRilascio() { + return this->dataRilascio; +} + +QDate CNS::getDataScadenza() { + return this->dataScadenza; +} diff --git a/lib/CNS.h b/lib/CNS.h index 45908a8..fb2515c 100644 --- a/lib/CNS.h +++ b/lib/CNS.h @@ -63,6 +63,16 @@ class CNSPARSER_EXPORT CNS { public: void fromSmartCard(void); friend QTextStream& operator<<(QTextStream& os, const CNS& cns); + + QString getNome(); + QString getCognome(); + QDate getDataNascita(); + QString getComuneNascita(); + QString getComuneResidenza(); + QString getCodiceFiscale(); + Sex getSesso(); + QDate getDataRilascio(); + QDate getDataScadenza(); };