Instrument Control Lib
Framework to control Oscilloscopes, SMUs, Function Generators and DC Powersupplies via Ethernet.
SubArg Class Reference

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>

Collaboration diagram for SubArg:
Collaboration graph

Public Member Functions

 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...
 
SubArgAddElem (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...
 
SubArgAddElem (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...
 
SubArgAddElem (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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ 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
argargument which is enclosed by a prefix and suffix.
prefixis directly placed in front of arg.
suffixis placed after arg.
Here is the call graph for this function:

Member Function Documentation

◆ 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
argstring argument which is added enclosed by a prefix and suffix.
prefixis directly placed in front of arg.
suffixis placed after arg.
Returns
pointer to current object to allow a chain of arguments, which can be written in a compact manner.
Here is the caller graph for this function:

◆ 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
argstring argument which is added enclosed by a prefix and suffix.
prefixis directly placed in front of arg.
suffixis 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
argstring argument which is added enclosed by a prefix and suffix.
prefixis directly placed in front of arg.
suffixis 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.
Here is the caller graph for this function:

The documentation for this class was generated from the following files: