HAL
hal::EmptyStringValidator Class Reference

Checks if a given string is not empty. More...

#include <empty_string_validator.h>

Inheritance diagram for hal::EmptyStringValidator:
Inheritance graph
Collaboration diagram for hal::EmptyStringValidator:
Collaboration graph

Public Member Functions

 EmptyStringValidator ()
 
bool validate (const QString &input)
 
- Public Member Functions inherited from hal::Validator
void setFailText (const QString &text)
 
QString failText () const
 

Additional Inherited Members

- Protected Attributes inherited from hal::Validator
QString mFailText = "Chosen input is not allowed."
 

Detailed Description

Checks if a given string is not empty.

The EmptyStringValidator is a Validator which validate function returns true if the candidate string contains at least one non-whitespace character. It should be used whenever an input must not be empty.

Definition at line 40 of file empty_string_validator.h.

Constructor & Destructor Documentation

◆ EmptyStringValidator()

hal::EmptyStringValidator::EmptyStringValidator ( )

Constructor.

Definition at line 5 of file empty_string_validator.cpp.

References hal::Validator::setFailText().

Member Function Documentation

◆ validate()

bool hal::EmptyStringValidator::validate ( const QString input)
virtual

Given any string this function returns true iff the string contains at least one non-whitespace character. Whitespace characters are: space, horizontal tab, new line, vertical tab, new page and carriage return

Parameters
input- The input string
Returns
true iff the string is considered valid (unique)

Implements hal::Validator.

Definition at line 10 of file empty_string_validator.cpp.

References hal::input.


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