Advertisement
Guest User

Untitled

a guest
Aug 29th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.26 KB | None | 0 0
  1. #ifndef CLIENT_H
  2. #define CLIENT_H
  3.  
  4. #include <sstream>
  5. #include <vector>
  6. #include <iostream>
  7.  
  8. class Client
  9. {
  10.     protected:
  11.         bool &MySQL;
  12.         bool &SaveFile;
  13.         bool &Log_save;
  14.         unsigned &people;
  15.         std::string &current;
  16.         std::string &current_path;
  17.         std::stringstream &logstream;
  18.         std::vector<std::string> &valuesList;
  19.         std::vector<std::string> &databaseList;
  20.         std::vector<std::vector <std::string> > &memberList;
  21.         const std::string VERSION = "0.5";
  22.         const std::string mainCONFIG = "FileDatabase.config";
  23.     public:
  24.         Client(bool &MySQL_v, bool &SaveFile_v, bool &Log_save_v, unsigned &people_v,
  25.             std::string &current_v, std::string &current_path_v,
  26.             std::stringstream &logstream_v, std::vector<std::string> &valuesList_v,
  27.             std::vector<std::string> &databaseList_v, std::vector<std::vector <std::string> > &memberList_v)
  28.         : MySQL(MySQL_v), SaveFile(SaveFile_v), Log_save(Log_save_v), people(people_v), current(current_v), current_path(current_path_v),
  29.             logstream(logstream), valuesList(valuesList_v), databaseList(databaseList_v), memberList(memberList_v) {}
  30.         void printError(const std::string &error) {
  31.             const std::type_info &info = typeid(std::cout << this);
  32.             std::cerr << error;
  33.             logstream << info.name() << ": " << error;
  34.         }
  35. };
  36.  
  37. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement