QGIS API Documentation 4.3.0-Master (9dce731a7a1)
Loading...
Searching...
No Matches
QgsDataDefinedStringDecoder< V, N > Class Template Reference

A template based class for efficiently decoding a string value to a corresponding enum value. More...

#include <qgsdatadefinedutils.h>

Public Member Functions

constexpr QgsDataDefinedStringDecoder (const DataDefinedDecoderEntry< V >(&values)[N])
 Constructor for QgsDataDefinedStringDecoder.
std::optional< V > lookup (QStringView string) const
 Looks up a string in the lookup table, returning the corresponding enum value if found.

Detailed Description

template<typename V, size_t N>
class QgsDataDefinedStringDecoder< V, N >

A template based class for efficiently decoding a string value to a corresponding enum value.

Matching is done in a case-insensitive, tolerant way.

Since
QGIS 4.4

Definition at line 44 of file qgsdatadefinedutils.h.

Constructor & Destructor Documentation

◆ QgsDataDefinedStringDecoder()

template<typename V, size_t N>
QgsDataDefinedStringDecoder< V, N >::QgsDataDefinedStringDecoder ( const DataDefinedDecoderEntry< V >(&) values[N])
inlineexplicitconstexpr

Constructor for QgsDataDefinedStringDecoder.

Definition at line 50 of file qgsdatadefinedutils.h.

Member Function Documentation

◆ lookup()

template<typename V, size_t N>
std::optional< V > QgsDataDefinedStringDecoder< V, N >::lookup ( QStringView string) const
inlinenodiscard

Looks up a string in the lookup table, returning the corresponding enum value if found.

Definition at line 112 of file qgsdatadefinedutils.h.


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