forked from markus/S_New4
37 lines
626 B
C++
37 lines
626 B
C++
#ifndef ACCOUNTMANAGER_H
|
|
#define ACCOUNTMANAGER_H
|
|
|
|
#include <iostream>
|
|
#include <vector>
|
|
#include <fstream>
|
|
|
|
|
|
|
|
#include "parameterManager.h"
|
|
|
|
|
|
|
|
struct Account {
|
|
std::string Email,
|
|
Password;
|
|
};
|
|
|
|
|
|
class AccountManager
|
|
{
|
|
public:
|
|
AccountManager(std::string pathToFile, std::string pathToAccountNumberFile, PAGE page);
|
|
Account getNextAccount();
|
|
size_t getLastAccountNumber();
|
|
|
|
private:
|
|
std::vector<Account> accounts;
|
|
std::string pathToAccountNumberFile;
|
|
PAGE pageInUse;
|
|
int setLastAccountNumber(size_t number);
|
|
int writeDefault(std::string path);
|
|
|
|
};
|
|
|
|
#endif // ACCOUNTMANAGER_H
|