forked from belinchio/ConsoleFileManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
33 lines (32 loc) · 929 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "ManagerFunction.h"
#include "ParseUserCommand.h"
#include "UnitTests.h"
#include "Help.h"
#include "ClearScreen.h"
int main(int argc, char const *argv[])
{
std::string cmd;
while(true) {
LOG_INFO("Launching the manager");
helpMsg();
std::cout << "Enter the command " << std::endl << "-> ";
getline(std::cin, cmd);
if (cmd == "exit") {
LOG_INFO("Exiting the manager");
break;
} else if (cmd == "help"){
LOG_INFO("Request for the help function");
printHelpInfo();
} else if (cmd == "cls") {
LOG_INFO("Clearing the screen");
clearScreen();
} else if (cmd == "test") {
LOG_INFO("Running unit tests");
test_functions();
} else {
LOG_INFO("Starting the parsing commands");
parseCommand(cmd);
}
}
return 0;
}