You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.4 KiB
58 lines
1.4 KiB
//
|
|
// Created by ioachim on 18.05.2025.
|
|
//
|
|
|
|
#ifndef DOCUMENT_H
|
|
#define DOCUMENT_H
|
|
|
|
#include "common.h"
|
|
class Zi;
|
|
class User;
|
|
class Autoritate;
|
|
|
|
class Document {
|
|
class Anexa {
|
|
private:
|
|
std::string idAnexa;
|
|
std::string continut;
|
|
Anexa* urm;
|
|
Document *doc;
|
|
public:
|
|
|
|
Anexa(): idAnexa(""), continut(""), urm(nullptr) {}
|
|
|
|
std::string exportAnexa() {
|
|
std::stringstream os;
|
|
os << "\nANEXA la doc(" << doc->getID() << ")\n--------\n" << "Continut (Anexa):\n" << continut;
|
|
return os.str();
|
|
}
|
|
|
|
Anexa* getUrm() {
|
|
return urm;
|
|
}
|
|
friend class Autoritate;
|
|
};
|
|
protected:
|
|
Anexa* origineAnexa = nullptr;
|
|
std::string idDocument;
|
|
std::string titlu;
|
|
User* Titular;
|
|
Autoritate* Emitator;
|
|
std::string Continut;
|
|
Zi* dataEmitere;
|
|
Zi* dataExpirare;
|
|
public:
|
|
Document(std::string _titlu, User* _Titular, Autoritate* _Emitator, std::string _continut, Zi* _data_emitere, Zi* _data_expirare);
|
|
Document();
|
|
Document& operator=(const Document& secundar);
|
|
friend std::ostream& operator<<(std::ostream& os, const Document& doc);
|
|
std::string getID();
|
|
virtual std::string exportForSigning();
|
|
//void populate(std::string _titlu, User* _Titular, Autoritate* _Emitator, std::string _continut, Zi* _dataEmitere, Zi* _dataExpirare);
|
|
std::string exportAnexe();
|
|
friend class Autoritate;
|
|
};
|
|
|
|
|
|
|
|
#endif //DOCUMENT_H
|
|
|