New command line app and removing slsDetectorCommand (#69)

* WIP

* WIP

* WIP

* WIP

* config2 working

* removed slsDetectorCommand

* WIP

* added test file

* more tests
This commit is contained in:
Erik Fröjdh
2019-11-18 09:29:17 +01:00
committed by Dhanya Thattil
parent 6a27207875
commit fa2c842745
23 changed files with 5964 additions and 1451 deletions

View File

@@ -24,6 +24,7 @@ void CmdLineParser::Print() {
};
void CmdLineParser::Parse(int argc, const char *const argv[]) {
Reset();
executable_ = argv[0]; // first arg is calling binary
if (argc > 1) {
std::string s = argv[1];
@@ -36,6 +37,7 @@ void CmdLineParser::Parse(int argc, const char *const argv[]) {
}
void CmdLineParser::Parse(const std::string &s) {
Reset();
std::istringstream iss(s);
auto it = std::istream_iterator<std::string>(iss);
arguments_ =
@@ -109,4 +111,13 @@ std::string CmdLineParser::cli_line() const{
return os.str();
}
void CmdLineParser::Reset(){
multi_id_ = 0;
detector_id_ = -1;
help_ = false;
command_.clear();
executable_.clear();
arguments_.clear();
}
} // namespace sls