cmdopts: Now accepts 0 or more -d opts
In preparation for the deviceSpecParser.
This commit is contained in:
@@ -20,7 +20,7 @@ public:
|
|||||||
std::vector<std::string> extro;
|
std::vector<std::string> extro;
|
||||||
std::vector<std::string> intero;
|
std::vector<std::string> intero;
|
||||||
std::vector<std::string> actuator;
|
std::vector<std::string> actuator;
|
||||||
std::string devFile;
|
std::vector<std::string> deviceSpecFiles;
|
||||||
bool verbose, printUsage;
|
bool verbose, printUsage;
|
||||||
|
|
||||||
static struct option longOptions[];
|
static struct option longOptions[];
|
||||||
|
|||||||
+6
-2
@@ -39,7 +39,7 @@ void OptionParser::parseArguments(int argc, char *argv[])
|
|||||||
actuator.push_back(optarg);
|
actuator.push_back(optarg);
|
||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
devFile = optarg;
|
deviceSpecFiles.push_back(optarg);
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
verbose = true;
|
verbose = true;
|
||||||
@@ -87,5 +87,9 @@ void OptionParser::dumpOptions() const
|
|||||||
}
|
}
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
|
||||||
std::cout << "Dev file: " << devFile << std::endl;
|
std::cout << "Device Spec Files: ";
|
||||||
|
for (const auto& file : deviceSpecFiles) {
|
||||||
|
std::cout << file << " ";
|
||||||
|
}
|
||||||
|
std::cout << std::endl;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user