Files
salmanoff/hcore/include/opts.h
T

36 lines
746 B
C++
Raw Normal View History

#ifndef OPTS_H
#define OPTS_H
#include <vector>
#include <string>
#include <getopt.h>
// Define a class to hold the options and parse arguments
class OptionParser
{
public:
2025-01-05 13:35:14 -04:00
OptionParser() : verbose(false), printUsage(false) {}
~OptionParser() = default;
void parseArguments(int argc, char *argv[]);
void dumpOptions() const;
std::string getUsage() const;
static OptionParser &getOptions(void)
{
static OptionParser options;
return options;
}
2025-01-05 13:35:14 -04:00
public:
std::string senseApiLibPath;
std::vector<std::string> senseApiLibs;
2025-01-07 14:05:23 -04:00
std::string deviceSpecs;
2025-01-05 14:04:31 -04:00
std::vector<std::string> deviceSpecFiles;
2025-01-05 13:35:14 -04:00
bool verbose, printUsage;
static struct option longOptions[];
};
#endif // OPTS_H