Advertisement
Guest User

Untitled

a guest
Aug 29th, 2018
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.45 KB | None | 0 0
  1. #ifndef FILES_H
  2. #define FILES_H
  3.  
  4. #include "Client.h"
  5.  
  6. class Files : public Client
  7. {
  8.     int reservedPeople = 0;
  9.     std::string currentMem = current_path + R"(/)" + current + R"(/)" + current + "_Members.txt";
  10.     std::string currentVal = current_path + R"(/)" + current + R"(/)" + current + "_Values.txt";
  11.     std::string tempValuesFile = current_path + R"(/)" + current + "/TEMPFileDatabase_Values.txt";
  12.     std::string tempMembersFile = current_path + R"(/)" + current + "/TEMPFileDatabase_Members.txt";
  13.     std::string tempNamesFile = current_path + "/TEMPFileDatabase_Names.txt";
  14.     std::string tempPPLFile = current_path + R"(/TEMPFileDatabase_PPL_)" + current + ".txt";
  15.     const std::string ERROR_FILE_INPUT = "(ERROR_FILE_INPUT) An error occurred while editing a file!\n";
  16.     const std::string ERROR_CONFIG = "Error while trying to access config file - restart the program and configure again\n";
  17.     void readConfig(std::string&, const std::string&, std::fstream&);
  18.     int catchStoi(const std::string &refi) {
  19.         int number;
  20.         try {
  21.             number = std::stoi(refi);
  22.         }
  23.         catch (std::invalid_argument) {
  24.             number = 0;
  25.         }
  26.         return number;
  27.     }
  28.     public:
  29.         Files() : Client(MySQL, SaveFile, Log_save, people, current, current_path,
  30.             logstream, valuesList, databaseList, memberList) {}
  31.         void open();
  32.         void update();
  33.         void set_path(const std::string&);
  34.         void load_path();
  35.         void load_config();
  36.         void update_config();
  37.         void update_log();
  38.         bool clear();
  39. };
  40.  
  41. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement