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.
 
 
proiectPOO/User.h

48 lines
1001 B

#ifndef USER_H
#define USER_H
#include "common.h"
class Document;
class User {
private:
std::string userID;
std::string nume = "";
std::string passHash;
std::unordered_map<std::string, Document*> Dosar;
public:
User(const std::string& id, const std::string& name, const std::string& password);
//User(const std::string& id, const std::string& name, const std::string& password) : userID(id), nume(name), passHash(hashString(password)), Dosar() {}
/*User(const User& frate):
userID(frate.userID),
nume(frate.nume),
passHash(frate.passHash),
Dosar(frate.Dosar)
{}*/
User& operator=(const User& frate);
~User();
void addDocument(Document* doc);
void removeDocument(std::string _id);
friend std::ostream& operator <<(std::ostream& os, const User& user);
bool tryLogin(std::string _pass);
bool changePassword(std::string _pass, std::string _newpass);
std::string getName();
};
#endif USER_H