Skip to content

Commit 4d0e59c

Browse files
committedAug 7, 2011
[FEATURE] new QgsExpression class that replaces QgsSearchString
The new class fixes various flaws in search strings: - fixed and simplified grammar in parser - simplified lexer - only one evaluation routine (instead of separate getValue/checkAgainst) - SQL compliant three-value logic (true, false, unknown) - correct error handling - easily extensible list of functions, saner evaluation of expressions - tests included
1 parent 0053426 commit 4d0e59c

File tree

7 files changed

+2025
-2
lines changed

7 files changed

+2025
-2
lines changed
 

‎src/core/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ SET(QGIS_CORE_SRCS
5353
qgsdiagram.cpp
5454
qgsdiagramrendererv2.cpp
5555
qgsdistancearea.cpp
56+
qgsexpression.cpp
5657
qgsfeature.cpp
5758
qgsfield.cpp
5859
qgsgeometry.cpp
@@ -216,9 +217,9 @@ IF (WITH_INTERNAL_SPATIALITE)
216217
INCLUDE_DIRECTORIES(BEFORE spatialite/headers/spatialite)
217218
ENDIF (WITH_INTERNAL_SPATIALITE)
218219

219-
ADD_FLEX_FILES(QGIS_CORE_SRCS qgssearchstringlexer.ll)
220+
ADD_FLEX_FILES(QGIS_CORE_SRCS qgssearchstringlexer.ll qgsexpressionlexer.ll)
220221

221-
ADD_BISON_FILES(QGIS_CORE_SRCS qgssearchstringparser.yy)
222+
ADD_BISON_FILES(QGIS_CORE_SRCS qgssearchstringparser.yy qgsexpressionparser.yy)
222223

223224
SET(QGIS_CORE_MOC_HDRS
224225
qgsapplication.h
@@ -286,6 +287,7 @@ SET(QGIS_CORE_HDRS
286287
qgsdistancearea.h
287288
qgscsexception.h
288289
qgsexception.h
290+
qgsexpression.h
289291
qgsfeature.h
290292
qgsfield.h
291293
qgsgeometry.h

0 commit comments

Comments
 (0)