|
Caffa
1.1.0
C++ Application Framework for Embedded Systems with introspection
|
Used to validate the value of data fields Implementations need the the validate method as well as readFromString and writeToString. More...
#include <cafFieldValidator.h>


Public Types | |
| using | FailureSeverity = FieldValidatorInterface::FailureSeverity |
Public Types inherited from caffa::FieldValidatorInterface | |
| enum | FailureSeverity { VALIDATOR_WARNING, VALIDATOR_ERROR, VALIDATOR_CRITICAL } |
| The severity of failure. Essentially tells the application how to treat a validator failure: VALIDATOR_WARNING -> user warning VALIDATOR_ERROR -> user error VALIDATOR_CRITICAL -> critical application failure. | |
Public Member Functions | |
| FieldValidator (FailureSeverity failureSeverity=FailureSeverity::VALIDATOR_ERROR) | |
| virtual std::pair< bool, std::string > | validate (const DataType &value) const =0 |
| Validate the value. More... | |
Public Member Functions inherited from caffa::FieldValidatorInterface | |
| FieldValidatorInterface (FailureSeverity failureSeverity) | |
| Construct a new Field Validator Interface object. More... | |
| virtual void | readFromString (const std::string &string)=0 |
| Read the validator from string. More... | |
| virtual std::string | writeToString () const =0 |
| Write the validator tostring. More... | |
| FailureSeverity | failureSeverity () const |
| Get the severity of a failure of the validator. More... | |
Used to validate the value of data fields Implementations need the the validate method as well as readFromString and writeToString.
| DataType |
|
pure virtual |
Validate the value.
| value | The value to validate |
Implemented in caffa::RangeValidator< DataType >.
1.8.13