Moved Application::getCommandToHandlerMapping() implementation to Application.cpp
And some other tidying
This commit is contained in:
@@ -85,6 +85,35 @@ namespace Bloom
|
||||
return geteuid() == 0;
|
||||
}
|
||||
|
||||
std::map<std::string, std::function<int()>> Application::getCommandToHandlerMapping() {
|
||||
return std::map<std::string, std::function<int()>> {
|
||||
{
|
||||
"--help",
|
||||
std::bind(&Application::presentHelpText, this)
|
||||
},
|
||||
{
|
||||
"-h",
|
||||
std::bind(&Application::presentHelpText, this)
|
||||
},
|
||||
{
|
||||
"--version",
|
||||
std::bind(&Application::presentVersionText, this)
|
||||
},
|
||||
{
|
||||
"-v",
|
||||
std::bind(&Application::presentVersionText, this)
|
||||
},
|
||||
{
|
||||
"--version-machine",
|
||||
std::bind(&Application::presentVersionMachineText, this)
|
||||
},
|
||||
{
|
||||
"init",
|
||||
std::bind(&Application::initProject, this)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
void Application::startup() {
|
||||
auto& applicationEventListener = this->applicationEventListener;
|
||||
EventManager::registerListener(applicationEventListener);
|
||||
|
||||
@@ -138,34 +138,7 @@ namespace Bloom
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
auto getCommandToHandlerMapping() {
|
||||
return std::map<std::string, std::function<int()>> {
|
||||
{
|
||||
"--help",
|
||||
std::bind(&Application::presentHelpText, this)
|
||||
},
|
||||
{
|
||||
"-h",
|
||||
std::bind(&Application::presentHelpText, this)
|
||||
},
|
||||
{
|
||||
"--version",
|
||||
std::bind(&Application::presentVersionText, this)
|
||||
},
|
||||
{
|
||||
"-v",
|
||||
std::bind(&Application::presentVersionText, this)
|
||||
},
|
||||
{
|
||||
"--version-machine",
|
||||
std::bind(&Application::presentVersionMachineText, this)
|
||||
},
|
||||
{
|
||||
"init",
|
||||
std::bind(&Application::initProject, this)
|
||||
},
|
||||
};
|
||||
}
|
||||
std::map<std::string, std::function<int()>> getCommandToHandlerMapping();
|
||||
|
||||
/**
|
||||
* Kicks off the application.
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
|
||||
#include "src/DebugServer/Gdb/ResponsePackets/ErrorResponsePacket.hpp"
|
||||
#include "src/DebugServer/Gdb/ResponsePackets/ResponsePacket.hpp"
|
||||
|
||||
#include "src/Application.hpp"
|
||||
@@ -15,7 +14,6 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using TargetController::TargetControllerConsole;
|
||||
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
using ResponsePackets::ResponsePacket;
|
||||
|
||||
using Exceptions::Exception;
|
||||
|
||||
Reference in New Issue
Block a user