Advertisement
Guest User

Untitled

a guest
Aug 29th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.39 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 = var->current_path + R"(/)" + var->current + R"(/)" + var->current + "_Members.txt";
  10.     std::string currentVal = var->current_path + R"(/)" + var->current + R"(/)" + var->current + "_Values.txt";
  11.     std::string tempValuesFile = var->current_path + R"(/)" + var->current + "/TEMPFileDatabase_Values.txt";
  12.     std::string tempMembersFile = var->current_path + R"(/)" + var->current + "/TEMPFileDatabase_Members.txt";
  13.     std::string tempNamesFile = var->current_path + "/TEMPFileDatabase_Names.txt";
  14.     std::string tempPPLFile = var->current_path + R"(/TEMPFileDatabase_PPL_)" + var->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 = "An error occurred 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.         void open();
  30.         void update();
  31.         void set_path(const std::string&);
  32.         void load_path();
  33.         void load_config();
  34.         void update_config();
  35.         void update_log();
  36.         bool clear();
  37. };
  38.  
  39. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement