drop dependency of libconfig and write own simple parser

This commit is contained in:
2021-03-15 17:33:20 +01:00
parent d364bc2ed8
commit b5aa78a59f
9 changed files with 223 additions and 163 deletions

23
inc/CMDParser.h Normal file
View File

@ -0,0 +1,23 @@
//
// Created by lukas on 15.03.21.
//
#pragma once
class CMDParser {
public:
class Arguments {
public:
// enable loop mode
bool loop = false;
bool force = false;
// enable currentIP mode
bool currentIP = false;
};
Arguments* parseArguments(int argc, char *argv[]);
private:
Arguments args;
void processParameter(char *arg);
};

View File

@ -97,6 +97,9 @@ private:
*/
Config() = default;
static void writeDefaultConfig();
static void setParam(const std::string key, const std::string value);
/**
* helper variable for managing telegram Support
*/