Some refactorings to incoporate CLI parsing
Some checks failed
Build ptprnt / build (push) Failing after 31s
Some checks failed
Build ptprnt / build (push) Failing after 31s
This commit is contained in:
@@ -19,23 +19,35 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <CLI/CLI.hpp>
|
||||
#include <spdlog/common.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
#include "constants.hpp"
|
||||
#include "interface/IPrinterDriver.hpp"
|
||||
#include "libusbwrap/UsbDeviceFactory.hpp"
|
||||
|
||||
class PtouchPrint {
|
||||
public:
|
||||
PtouchPrint();
|
||||
~PtouchPrint();
|
||||
PtouchPrint(const char* versionString);
|
||||
~PtouchPrint() = default;
|
||||
|
||||
void init();
|
||||
void run();
|
||||
int init(int argc, char** argv);
|
||||
int run();
|
||||
|
||||
private:
|
||||
// methods
|
||||
void setupLogger(spdlog::level::level_enum lvl);
|
||||
void setupCliParser();
|
||||
unsigned int getCompatiblePrinters();
|
||||
|
||||
// member variables
|
||||
CLI::App mApp{ptprnt::APP_DESC};
|
||||
libusbwrap::UsbDeviceFactory mUsbDeviceFactory;
|
||||
std::vector<std::shared_ptr<ptprnt::IPrinterDriver>> mCompatiblePrinters;
|
||||
std::vector<std::shared_ptr<ptprnt::IPrinterDriver>> mDetectedPrinters;
|
||||
std::string mVersionString = "";
|
||||
|
||||
// CLI flags
|
||||
bool mVerboseFlag = false;
|
||||
};
|
||||
Reference in New Issue
Block a user