S_New4/src/accountManager.h

37 lines
748 B
C
Raw Normal View History

2022-04-13 12:51:56 +00:00
#ifndef ACCOUNTMANAGER_H
#define ACCOUNTMANAGER_H
#include <iostream>
#include <vector>
#include <fstream>
struct Account {
std::string Email,
Password;
};
//wichtig vor Account declaration!!!!
#include "parameterManager.h"
class AccountManager
{
public:
AccountManager(std::string pathToFile, std::string pathToAccountNumberFile, PAGE page, const PAGE * pagesALL);
Account getNextAccount();
size_t getLastAccountNumber();
const PAGE * pagesALL;
private:
std::vector<Account> accounts;
std::string pathToAccountNumberFile;
PAGE pageInUse;
int setLastAccountNumber(size_t number);
int writeDefault(std::string path);
};
#endif // ACCOUNTMANAGER_H