OTX-Runtime for C++  
OpenTestSystem::Otx::Runtime::Api::DataTypes::RangedInteger Class Reference

A RangedInteger is a RangedObject and represents an Integer value that can have one or more intervals. More...

#include <RangedObject.h>

Inheritance diagram for OpenTestSystem::Otx::Runtime::Api::DataTypes::RangedInteger:
Inheritance graph

Public Member Functions

 RangedInteger (long long value, std::vector< std::shared_ptr< IntegerInterval >> interval)
 Initializes a new instance of the RangedInteger class. More...
 
 RangedInteger (long long value, std::vector< std::shared_ptr< IntegerInterval >> interval, bool isValueWritten)
 Initializes a new instance of the RangedInteger class. More...
 
std::vector< std::shared_ptr< IntegerInterval > > & GetInterval ()
 Gets List of IntegerIntervalLiteral of the RangedInteger. More...
 
long long GetValue () const
 Gets the Integer value of the RangedInteger. More...
 
bool IsInRange () const override
 Checks if the value is in range. More...
 
std::string ToLiteralString () const override
 Gets literal string. More...
 
- Public Member Functions inherited from OpenTestSystem::Otx::Runtime::Api::DataTypes::RangedObject
virtual bool IsValueWritten () const
 A value is considered written if one of the set value actions is called. Overwriting with the same value as the current value counts as written. The initialization of the ranged object with a value does not count as written. More...
 

Detailed Description

A RangedInteger is a RangedObject and represents an Integer value that can have one or more intervals.

Constructor & Destructor Documentation

◆ RangedInteger() [1/2]

OpenTestSystem::Otx::Runtime::Api::DataTypes::RangedInteger::RangedInteger ( long long  value,
std::vector< std::shared_ptr< IntegerInterval >>  interval,
bool  isValueWritten 
)

Initializes a new instance of the RangedInteger class.

Parameters
valueThe value
intervalThe List of IntegerInterval
isValueWrittenA value is considered written if one of the set value actions is called. Overwriting with the same value as the current value counts as written. The initialization of the ranged object with a value does not count as written.

◆ RangedInteger() [2/2]

OpenTestSystem::Otx::Runtime::Api::DataTypes::RangedInteger::RangedInteger ( long long  value,
std::vector< std::shared_ptr< IntegerInterval >>  interval 
)

Initializes a new instance of the RangedInteger class.

Parameters
valueThe value
intervalThe List of IntegerInterval

Member Function Documentation

◆ GetInterval()

std::vector<std::shared_ptr<IntegerInterval> >& OpenTestSystem::Otx::Runtime::Api::DataTypes::RangedInteger::GetInterval ( )

Gets List of IntegerIntervalLiteral of the RangedInteger.

Returns
List of IntegerInterval

◆ GetValue()

long long OpenTestSystem::Otx::Runtime::Api::DataTypes::RangedInteger::GetValue ( ) const

Gets the Integer value of the RangedInteger.

Returns
The value

◆ IsInRange()

bool OpenTestSystem::Otx::Runtime::Api::DataTypes::RangedInteger::IsInRange ( ) const
overridevirtual

Checks if the value is in range.

Returns
True if the value of the ranged object is inside one of the intervals or if the ranged object has no intervals.

Implements OpenTestSystem::Otx::Runtime::Api::DataTypes::RangedObject.

◆ ToLiteralString()

std::string OpenTestSystem::Otx::Runtime::Api::DataTypes::RangedInteger::ToLiteralString ( ) const
overridevirtual

Gets literal string.

Returns
Literal string.

Reimplemented from OpenTestSystem::Otx::Runtime::Api::DataTypes::Object.


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