mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 05:47:14 +02:00
moved CmdLineParser to sls::
This commit is contained in:
@ -15,7 +15,7 @@ class multiSlsDetectorClient {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
int action_;
|
int action_;
|
||||||
CmdLineParser parser;
|
sls::CmdLineParser parser;
|
||||||
multiSlsDetector *detPtr = nullptr;
|
multiSlsDetector *detPtr = nullptr;
|
||||||
std::ostream &os;
|
std::ostream &os;
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
namespace sls {
|
||||||
|
|
||||||
class CmdLineParser {
|
class CmdLineParser {
|
||||||
public:
|
public:
|
||||||
void Parse(int argc, const char *const argv[]);
|
void Parse(int argc, const char *const argv[]);
|
||||||
@ -30,4 +32,5 @@ class CmdLineParser {
|
|||||||
std::vector<std::string> arguments_;
|
std::vector<std::string> arguments_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace sls
|
||||||
#endif // CMD_LINE_PARSER_H
|
#endif // CMD_LINE_PARSER_H
|
@ -7,6 +7,8 @@
|
|||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
namespace sls {
|
||||||
|
|
||||||
void CmdLineParser::Print() {
|
void CmdLineParser::Print() {
|
||||||
std::cout << "\nCmdLineParser::Print()\n";
|
std::cout << "\nCmdLineParser::Print()\n";
|
||||||
std::cout << "\tmulti_id: " << multi_id_
|
std::cout << "\tmulti_id: " << multi_id_
|
||||||
@ -97,3 +99,5 @@ std::vector<const char *> CmdLineParser::argv() const {
|
|||||||
}
|
}
|
||||||
return vec;
|
return vec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace sls
|
@ -9,6 +9,7 @@
|
|||||||
// command for all depreciated commands
|
// command for all depreciated commands
|
||||||
|
|
||||||
using vs = std::vector<std::string>;
|
using vs = std::vector<std::string>;
|
||||||
|
using sls::CmdLineParser;
|
||||||
|
|
||||||
SCENARIO("Construction", "[support]") {
|
SCENARIO("Construction", "[support]") {
|
||||||
GIVEN("A default constructed CmdLineParser") {
|
GIVEN("A default constructed CmdLineParser") {
|
||||||
|
Reference in New Issue
Block a user