Instrument Control Lib
Framework to control Oscilloscopes, SMUs, Function Generators and DC Powersupplies via Ethernet.
SubArg.h
Go to the documentation of this file.
1 #ifndef INSTRUMENT_CONTROL_LIB_SUBARG_H
2 #define INSTRUMENT_CONTROL_LIB_SUBARG_H
3 
4 #include <vector> // std::vector
5 #include <tuple> // std::tuple
6 #include <string> // std::string
7 
13 class SubArg
14 {
15 public:
16  explicit SubArg(const std::string& arg, const std::string& prefix = "", const std::string& suffix = "");
17 
18  SubArg& AddElem(const std::string&, const std::string& prefix="", const std::string& suffix="");
19  SubArg& AddElem(int value, const std::string& prefix="", const std::string& postfix="");
20  SubArg& AddElem(double value, const std::string& prefix="", const std::string& postfix="");
21 
22  std::string toString();
23 
24 private:
26  std::vector<std::tuple<std::string, std::string, std::string>> m_SubArgElem;
27 };
28 
29 
30 #endif //INSTRUMENT_CONTROL_LIB_SUBARG_H
This class implements sub-arguments which can be added to a ExecArgs object. This is required,...
Definition: SubArg.h:14
std::string toString()
Transform all arguments to a string to be passed to a ExecArgs object.
Definition: SubArg.cpp:67
SubArg(const std::string &arg, const std::string &prefix="", const std::string &suffix="")
This file contains the implementation of sub-arguments. E.g. when a command has the structure smua....
Definition: SubArg.cpp:17
SubArg & AddElem(const std::string &, const std::string &prefix="", const std::string &suffix="")
Add a new string element to the SubArg-object. It is directly concatenated to the previous arguments.
Definition: SubArg.cpp:29