AuboCaps  0.6.0
arcs::aubo_scope::UIntegerRangeValidator Struct Reference

#include <input_validator.h>

Inheritance diagram for arcs::aubo_scope::UIntegerRangeValidator:
Collaboration diagram for arcs::aubo_scope::UIntegerRangeValidator:

Public Member Functions

 UIntegerRangeValidator (uint32_t min_value, uint32_t max_value)
 
 UIntegerRangeValidator (std::function< std::pair< uint32_t, uint32_t >()> 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

uint32_t min_value_ { 0 }
 
uint32_t max_value_ { UINT_MAX }
 
std::function< std::pair< uint32_t, uint32_t >)> range_func_ { nullptr }
 

Detailed Description

Definition at line 126 of file input_validator.h.

Constructor & Destructor Documentation

arcs::aubo_scope::UIntegerRangeValidator::UIntegerRangeValidator ( uint32_t  min_value,
uint32_t  max_value 
)
inline

Definition at line 128 of file input_validator.h.

arcs::aubo_scope::UIntegerRangeValidator::UIntegerRangeValidator ( std::function< std::pair< uint32_t, uint32_t >()>  range_func)
inline

Definition at line 133 of file input_validator.h.

Member Function Documentation

std::string arcs::aubo_scope::UIntegerRangeValidator::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 152 of file input_validator.h.

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

Implements arcs::aubo_scope::InputValidator.

Definition at line 139 of file input_validator.h.

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

Definition at line 175 of file input_validator.h.

Member Data Documentation

uint32_t arcs::aubo_scope::UIntegerRangeValidator::max_value_ { UINT_MAX }
private

Definition at line 190 of file input_validator.h.

uint32_t arcs::aubo_scope::UIntegerRangeValidator::min_value_ { 0 }
private

Definition at line 189 of file input_validator.h.

std::function<std::pair<uint32_t, uint32_t>)> arcs::aubo_scope::UIntegerRangeValidator::range_func_ { nullptr }
private

Definition at line 191 of file input_validator.h.


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