libdrmconf 0.13.3
A library to program DMR radios.
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
RadioLimitStringRegEx Class Reference

Verifies that a string matches a regular expression. More...

#include <radiolimits.hh>

Inheritance diagram for RadioLimitStringRegEx:
Inheritance graph
[legend]
Collaboration diagram for RadioLimitStringRegEx:
Collaboration graph
[legend]

Public Member Functions

 RadioLimitStringRegEx (const QString &pattern, RadioLimitIssue::Severity severity=RadioLimitIssue::Severity::Warning, QObject *parent=nullptr)
 Constructor.
 
bool verify (const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
 Verifies the given property of the specified item.
 
- Public Member Functions inherited from RadioLimitElement
virtual ~RadioLimitElement ()
 Destructor.
 

Protected Attributes

QRegularExpression _pattern
 Holds the regular expression pattern.
 
- Protected Attributes inherited from RadioLimitValue
RadioLimitIssue::Severity _severity
 The severity of the issue, if the test fails.
 

Additional Inherited Members

- Public Types inherited from RadioLimitElement
typedef std::initializer_list< std::pair< QString, RadioLimitElement * > > PropList
 Initializer lists of ConfigItem properties.
 
- Protected Member Functions inherited from RadioLimitValue
 RadioLimitValue (RadioLimitIssue::Severity severity=RadioLimitIssue::Severity::Hint, QObject *parent=nullptr)
 Hidden constructor.
 
- Protected Member Functions inherited from RadioLimitElement
 RadioLimitElement (QObject *parent=nullptr)
 Hidden constructor.
 

Detailed Description

Verifies that a string matches a regular expression.

Constructor & Destructor Documentation

◆ RadioLimitStringRegEx()

RadioLimitStringRegEx::RadioLimitStringRegEx ( const QString &  pattern,
RadioLimitIssue::Severity  severity = RadioLimitIssue::Severity::Warning,
QObject *  parent = nullptr 
)

Constructor.

Parameters
patternSpecifies the regular expression pattern, the string must match.
severitySpecifies the severity of the issue.
parentSpecifies the QObject parent.

Member Function Documentation

◆ verify()

bool RadioLimitStringRegEx::verify ( const ConfigItem item,
const QMetaProperty &  prop,
RadioLimitContext context 
) const
virtual

Verifies the given property of the specified item.

This method gets implemented by the specialized classes to implement the actual verification.

Implements RadioLimitElement.


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