AuboCaps  0.6.0
arcs::aubo_scope::DoubleRangeValidator Struct Reference

#include <input_validator.h>

Inheritance diagram for arcs::aubo_scope::DoubleRangeValidator:
Collaboration diagram for arcs::aubo_scope::DoubleRangeValidator:

Public Member Functions

 DoubleRangeValidator (double minValue, double maxValue)
 
 DoubleRangeValidator (std::function< std::pair< double, double >()> range_func)
 
bool isValid (std::string value) override
 
std::string getMessage (std::string value) override
 Returns a meaningful message in case the value is not valid. More...
 

Private Member Functions

void updateValue ()
 

Private Attributes

double min_value_ { DBL_MIN }
 
double max_value_ { DBL_MAX }
 
std::function< std::pair< double, double >)> range_func_ { nullptr }
 

Detailed Description

Definition at line 194 of file input_validator.h.

Constructor & Destructor Documentation

arcs::aubo_scope::DoubleRangeValidator::DoubleRangeValidator ( double  minValue,
double  maxValue 
)
inline

Definition at line 196 of file input_validator.h.

arcs::aubo_scope::DoubleRangeValidator::DoubleRangeValidator ( std::function< std::pair< double, double >()>  range_func)
inline

Definition at line 201 of file input_validator.h.

Member Function Documentation

std::string arcs::aubo_scope::DoubleRangeValidator::getMessage ( std::string  value)
inlineoverridevirtual

Returns a meaningful message in case the value is not valid.

Parameters
valuethe invalid value. Can be included in the message if it makes sense.
Returns
message.

Implements arcs::aubo_scope::InputValidator.

Definition at line 215 of file input_validator.h.

bool arcs::aubo_scope::DoubleRangeValidator::isValid ( std::string  value)
inlineoverridevirtual
Parameters
valueto be validated.
Returns
true if value is valid.

Implements arcs::aubo_scope::InputValidator.

Definition at line 206 of file input_validator.h.

void arcs::aubo_scope::DoubleRangeValidator::updateValue ( )
inlineprivate

Definition at line 231 of file input_validator.h.

Member Data Documentation

double arcs::aubo_scope::DoubleRangeValidator::max_value_ { DBL_MAX }
private

Definition at line 248 of file input_validator.h.

double arcs::aubo_scope::DoubleRangeValidator::min_value_ { DBL_MIN }
private

Definition at line 247 of file input_validator.h.

std::function<std::pair<double, double>)> arcs::aubo_scope::DoubleRangeValidator::range_func_ { nullptr }
private

Definition at line 249 of file input_validator.h.


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