This class implements sub-arguments which can be added to a ExecArgs object. This is required, when parts of the command contains a substructure, e.g. smua.voltage = 10, then smu.voltage can be represented as SubArg.
More...
#include <SubArg.h>
|
| 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.voltage = 3 then smua.voltage can be encoded within a SubArg. More...
|
|
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. More...
|
|
SubArg & | AddElem (int value, const std::string &prefix="", const std::string &postfix="") |
| Add a new integer element to the SubArg-object. It is directly concatenated to the previous arguments. More...
|
|
SubArg & | AddElem (double value, const std::string &prefix="", const std::string &postfix="") |
| Add a new double element to the SubArg-object. It is directly concatenated to the previous arguments. More...
|
|
std::string | toString () |
| Transform all arguments to a string to be passed to a ExecArgs object. More...
|
|
This class implements sub-arguments which can be added to a ExecArgs object. This is required, when parts of the command contains a substructure, e.g. smua.voltage = 10, then smu.voltage can be represented as SubArg.
◆ SubArg()
SubArg::SubArg |
( |
const std::string & |
arg, |
|
|
const std::string & |
prefix = "" , |
|
|
const std::string & |
suffix = "" |
|
) |
| |
|
explicit |
This file contains the implementation of sub-arguments. E.g. when a command has the structure smua.voltage = 3 then smua.voltage can be encoded within a SubArg.
- Author
- Florian Frank
Constructor initializes the first part of a sub-argument. E.g. arg: smua, prefix: ., suffix: =, results in ".smu="
- Parameters
-
arg | argument which is enclosed by a prefix and suffix. |
prefix | is directly placed in front of arg. |
suffix | is placed after arg. |
◆ AddElem() [1/3]
SubArg & SubArg::AddElem |
( |
const std::string & |
arg, |
|
|
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.
- Parameters
-
arg | string argument which is added enclosed by a prefix and suffix. |
prefix | is directly placed in front of arg. |
suffix | is placed after arg. |
- Returns
- pointer to current object to allow a chain of arguments, which can be written in a compact manner.
◆ AddElem() [2/3]
SubArg & SubArg::AddElem |
( |
double |
value, |
|
|
const std::string & |
prefix = "" , |
|
|
const std::string & |
postfix = "" |
|
) |
| |
Add a new double element to the SubArg-object. It is directly concatenated to the previous arguments.
- Parameters
-
arg | string argument which is added enclosed by a prefix and suffix. |
prefix | is directly placed in front of arg. |
suffix | is placed after arg. |
- Returns
- pointer to current object to allow a chain of arguments, which can be written in a compact manner.
◆ AddElem() [3/3]
SubArg & SubArg::AddElem |
( |
int |
value, |
|
|
const std::string & |
prefix = "" , |
|
|
const std::string & |
postfix = "" |
|
) |
| |
Add a new integer element to the SubArg-object. It is directly concatenated to the previous arguments.
- Parameters
-
arg | string argument which is added enclosed by a prefix and suffix. |
prefix | is directly placed in front of arg. |
suffix | is placed after arg. |
- Returns
- pointer to current object to allow a chain of arguments, which can be written in a compact manner.
◆ toString()
std::string SubArg::toString |
( |
| ) |
|
Transform all arguments to a string to be passed to a ExecArgs object.
- Returns
- string representation of all subarguments.
The documentation for this class was generated from the following files:
- /home/runner/work/instrument_control_lib/instrument_control_lib/include/SubArg.h
- /home/runner/work/instrument_control_lib/instrument_control_lib/src/SubArg.cpp