OTX-Runtime for C++  
OpenTestSystem::Otx::Runtime::Api::Custom::StateVariableImplementation Class Reference

Default state variable implementation More...

#include <StateVariableImplementation.h>

Inheritance diagram for OpenTestSystem::Otx::Runtime::Api::Custom::StateVariableImplementation:
Inheritance graph

Public Member Functions

std::shared_ptr< ObjectGetValue (std::shared_ptr< IStateVariable > stateVariable)
 Return value of a certain State Variable More...
 
void ResetAllValues ()
 Reset all values, which were set by SetValue method. More...
 
void SetStateVariableValueChangedHandler (std::shared_ptr< std::function< void(std::shared_ptr< IStateVariable >, std::shared_ptr< Object >)>> listener)
 An Event handler, fire when State Variable value is changed. More...
 
void SetValue (std::shared_ptr< IRuntimeContext > runtimeContext, std::shared_ptr< IStateVariable > stateVariable, std::shared_ptr< Object > value) override
 Invoked when a StateVariable sets its value in OTX-Runtime. More...
 

Detailed Description

Default state variable implementation

Member Function Documentation

◆ GetValue()

std::shared_ptr<Object> OpenTestSystem::Otx::Runtime::Api::Custom::StateVariableImplementation::GetValue ( std::shared_ptr< IStateVariable stateVariable)

Return value of a certain State Variable

Parameters
stateVariableState Variable which value need to be get
Returns
stateVariable's value

◆ ResetAllValues()

void OpenTestSystem::Otx::Runtime::Api::Custom::StateVariableImplementation::ResetAllValues ( )

Reset all values, which were set by SetValue method.

◆ SetStateVariableValueChangedHandler()

void OpenTestSystem::Otx::Runtime::Api::Custom::StateVariableImplementation::SetStateVariableValueChangedHandler ( std::shared_ptr< std::function< void(std::shared_ptr< IStateVariable >, std::shared_ptr< Object >)>  ,
listener   
)

An Event handler, fire when State Variable value is changed.

Parameters
stateVariableState Variable which value is changed
valueNew value

◆ SetValue()

void OpenTestSystem::Otx::Runtime::Api::Custom::StateVariableImplementation::SetValue ( std::shared_ptr< IRuntimeContext runtimeContext,
std::shared_ptr< IStateVariable stateVariable,
std::shared_ptr< Object value 
)
overridevirtual

Invoked when a StateVariable sets its value in OTX-Runtime.

Parameters
runtimeContextThe related runtime context.
variableStateVariable which gets its value.
valueValue which will be returned for OTX-Runtime and set to StateVariable.

Implements OpenTestSystem::Otx::Runtime::Api::Custom::IStateVariableImplementation.


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