keep on refactoring
This commit is contained in:
parent
d30e6ed759
commit
b07d017f86
6 changed files with 45 additions and 21 deletions
|
@ -31,7 +31,7 @@ private:
|
|||
void printMessage(const Message& message, bool colored = false) const;
|
||||
|
||||
private:
|
||||
bool accumulate;
|
||||
const bool accumulate;
|
||||
const Severity currentSeverity;
|
||||
mutable std::list<Message> history;
|
||||
mutable std::mutex readMutex;
|
||||
|
|
34
src/main.cpp
34
src/main.cpp
|
@ -1,6 +1,8 @@
|
|||
#include <string>
|
||||
|
||||
#include "project.h"
|
||||
#include "collection.h"
|
||||
#include "taskmanager.h"
|
||||
#include "loggger.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
std::string firstArg;
|
||||
|
@ -15,20 +17,28 @@ int main(int argc, char *argv[]) {
|
|||
else
|
||||
secondArg = "./";
|
||||
|
||||
Project root(firstArg, secondArg);
|
||||
bool success = root.read();
|
||||
|
||||
int result = -1;
|
||||
if (success) {
|
||||
root.info("successfully parsed project " + root.getName());
|
||||
root.info("dependencies count is " + std::to_string(root.dependenciesCount()));
|
||||
std::shared_ptr<Logger> logger = std::make_shared<Logger>(Logger::Severity::debug);
|
||||
std::shared_ptr<TaskManager> taskManager = std::make_shared<TaskManager>();
|
||||
std::shared_ptr<Collection> collection = std::make_shared<Collection>(secondArg, "", logger, taskManager);
|
||||
|
||||
root.discover();
|
||||
result = 0;
|
||||
}
|
||||
taskManager->start();
|
||||
collection->addSource(firstArg);
|
||||
|
||||
root.printLog();
|
||||
taskManager->wait();
|
||||
taskManager->stop();
|
||||
|
||||
// int result = -1;
|
||||
// if (success) {
|
||||
// root.info("successfully parsed project " + root.getName());
|
||||
// root.info("dependencies count is " + std::to_string(root.dependenciesCount()));
|
||||
//
|
||||
// root.discover();
|
||||
// result = 0;
|
||||
// }
|
||||
//
|
||||
// root.printLog();
|
||||
|
||||
|
||||
return result;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue