2019-07-06 18:47:29 +00:00
|
|
|
#ifndef ACCOUNTMANAGER_H
|
|
|
|
#define ACCOUNTMANAGER_H
|
|
|
|
|
2022-03-25 20:50:29 +00:00
|
|
|
|
|
|
|
|
2019-07-06 18:47:29 +00:00
|
|
|
#include <iostream>
|
|
|
|
#include <vector>
|
|
|
|
#include <fstream>
|
|
|
|
|
|
|
|
struct Account {
|
2019-11-09 11:56:49 +00:00
|
|
|
std::string Email,
|
|
|
|
Password;
|
2019-07-06 18:47:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2022-03-25 20:50:29 +00:00
|
|
|
//wichtig vor Account declaration!!!!
|
|
|
|
#include "parameterManager.h"
|
|
|
|
|
2019-07-06 18:47:29 +00:00
|
|
|
class AccountManager
|
|
|
|
{
|
|
|
|
public:
|
2021-03-01 09:42:50 +00:00
|
|
|
AccountManager(std::string pathToFile, std::string pathToAccountNumberFile, PAGE page);
|
2019-07-06 18:47:29 +00:00
|
|
|
Account getNextAccount();
|
2019-07-08 18:17:11 +00:00
|
|
|
size_t getLastAccountNumber();
|
2019-07-06 18:47:29 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<Account> accounts;
|
2019-07-08 18:17:11 +00:00
|
|
|
std::string pathToAccountNumberFile;
|
2021-03-01 09:42:50 +00:00
|
|
|
PAGE pageInUse;
|
2019-08-31 18:35:11 +00:00
|
|
|
int setLastAccountNumber(size_t number);
|
|
|
|
int writeDefault(std::string path);
|
|
|
|
|
2019-07-06 18:47:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ACCOUNTMANAGER_H
|