Advertisement
Mafro

Untitled

Jun 30th, 2021
824
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.88 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <thread>
  4.  
  5. #include "formatingModules.hh"
  6. #include "log.hh"
  7. #include "module.hh"
  8.  
  9. void update();
  10. wear::file::Module moduleSystem;
  11. wear::file::Directory dirSystem;
  12.  
  13. int main() {
  14.     using namespace std;
  15.     thread thUpdate(update);
  16.  
  17.     // install modules
  18.         {
  19.             wear::loging::log(static_cast<std::string>("Installing Modules"), '\n');
  20.                 moduleSystem.create("programing", "code",           langFormat,     "C:\\Users\\_kunicoder_\\Desktop\\FileAllocator\\code", 13);
  21.                 moduleSystem.create("text",       "text",       textFormat,     "C:\\Users\\_kunicoder_\\Desktop\\FileAllocator\\text", 2);
  22.                 moduleSystem.create("sound",      "sound",          soundFormat,    "C:\\Users\\_kunicoder_\\Desktop\\FileAllocator\\sound", 2);
  23.                 moduleSystem.create("program",    "program",    programFormat,  "C:\\Users\\_kunicoder_\\Desktop\\FileAllocator\\executable", 2);
  24.                 moduleSystem.create("photo",      "photo",          photoFormat,    "C:\\Users\\_kunicoder_\\Desktop\\FileAllocator\\photo", 6);
  25.                 moduleSystem.create("video",      "video",          videoFormat,    "C:\\Users\\_kunicoder_\\Desktop\\FileAllocator\\video", 2);
  26.             wear::loging::log('\n', static_cast<std::string>("End Installing Modules\n"));
  27.         }
  28.     // parse modules
  29.         {
  30.             wear::loging::log('\n', static_cast<std::string>("Parse Modules\n"));
  31.                 moduleSystem.parse("programing");
  32.                 moduleSystem.parse("text");
  33.                 moduleSystem.parse("sound");
  34.                 moduleSystem.parse("program");
  35.                 moduleSystem.parse("photo");
  36.                 moduleSystem.parse("video");
  37.             wear::loging::log('\n',static_cast<std::string>("End Parse Modules\n"));
  38.         }
  39.  
  40.    
  41.     thUpdate.join();
  42.  
  43.     return EXIT_SUCCESS;
  44. }
  45.  
  46. void update() {
  47.     using namespace std;
  48.     // ~Module = map<string (Token) , vector<string> (FormatFile)>
  49.     auto data = ~moduleSystem;
  50.     auto dir{dirSystem.listFile("C:\\Users\\_kunicoder_\\Desktop\\FileAllocator\\processing")};
  51.  
  52.     std::this_thread::sleep_for(0.5s);
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement