Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef FILES_H
- #define FILES_H
- #include "Client.h"
- class Files : public Client
- {
- int reservedPeople = 0;
- std::string currentMem = current_path + R"(/)" + current + R"(/)" + current + "_Members.txt";
- std::string currentVal = current_path + R"(/)" + current + R"(/)" + current + "_Values.txt";
- std::string tempValuesFile = current_path + R"(/)" + current + "/TEMPFileDatabase_Values.txt";
- std::string tempMembersFile = current_path + R"(/)" + current + "/TEMPFileDatabase_Members.txt";
- std::string tempNamesFile = current_path + "/TEMPFileDatabase_Names.txt";
- std::string tempPPLFile = current_path + R"(/TEMPFileDatabase_PPL_)" + current + ".txt";
- const std::string ERROR_FILE_INPUT = "(ERROR_FILE_INPUT) An error occurred while editing a file!\n";
- const std::string ERROR_CONFIG = "Error while trying to access config file - restart the program and configure again\n";
- void readConfig(std::string&, const std::string&, std::fstream&);
- int catchStoi(const std::string &refi) {
- int number;
- try {
- number = std::stoi(refi);
- }
- catch (std::invalid_argument) {
- number = 0;
- }
- return number;
- }
- public:
- Files() : Client(MySQL, SaveFile, Log_save, people, current, current_path,
- logstream, valuesList, databaseList, memberList) {}
- void open();
- void update();
- void set_path(const std::string&);
- void load_path();
- void load_config();
- void update_config();
- void update_log();
- bool clear();
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement