winIDEA SDK
isys::CTestFunction Class Reference

Description

This class encapsulates information required for function call, such as function name and parameters.

Parameters can be specified either as named parameters, or position parameters. Named parameters are stored in map as [parameter name, parameter value] pairs, while position parameters are stored in vector as a list of values. Only one of these two groups of parameters may be specified in one specification.

Default copy ctor may be used.

 

#include <CTestFunction.h>

Inheritance diagram for isys::CTestFunction:
isys::CTestBase

Public Member Functions

 CTestFunction ()
 Initializes new instance.
 
 CTestFunction (const CTestBaseSPtr &parent)
 Initializes new instance. More...
 
std::string getName ()
 Returns name of the function to be executed.
 
bool hasPositionParams ()
 Returns true, if function has parameters specified.
 
void getPositionParams (iconnect::StrVector &positionParams)
 The given vector is filled with values of positional parameters. More...
 
std::string getRetValueName ()
 Returns the name of the variable, which will be used to store the function return value.
 
void setName (const std::string &functionName)
 Sets function name.
 
void setPositionParameters (const iconnect::StrVector &parameters)
 Sets positional parameters. More...
 
void setRetValueName (const std::string &retValName)
 Sets return value name. More...
 
virtual bool isEmpty () const
 This method returns true, if the object contains no data.
 
virtual void serialize (const isys::IEmitterSPtr &emitter)
 Sends contents of this class to emitter.
 
virtual std::string toString ()
 Returns object data as YAML string.
 

Static Public Member Functions

static CTestFunctionSPtr cast (CTestBaseSPtr &testBase)
 Casts the given object to this class. More...
 

Protected Member Functions

void setStaticTagsAsConst ()
 This method is called by all objects which are immediately contained in CTestSpecification, for example CTestCoverage, CTestHIL, ...
 

Constructor & Destructor Documentation

◆ CTestFunction()

isys::CTestFunction::CTestFunction ( const CTestBaseSPtr parent)

Initializes new instance.

Parameters
parentan instance of parent CTestBase class. May be specified as NULL if the object is not initialized by parser.

Member Function Documentation

◆ cast()

static CTestFunctionSPtr isys::CTestFunction::cast ( CTestBaseSPtr testBase)
static

Casts the given object to this class.

Returns NULL if input is NULL.

Exceptions
IllegalArgumentExceptionif input object is not instance of this class.

◆ getPositionParams()

void isys::CTestFunction::getPositionParams ( iconnect::StrVector positionParams)

The given vector is filled with values of positional parameters.

Parameters
positionParamsvector to receive parameters

◆ setPositionParameters()

void isys::CTestFunction::setPositionParameters ( const iconnect::StrVector parameters)

Sets positional parameters.

Parameters
parameters
See also
getNamedParameters()

◆ setRetValueName()

void isys::CTestFunction::setRetValueName ( const std::string &  retValName)

Sets return value name.

See also
getRetValueName