QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
expression
qgsexpression_p.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsexpression_p.h
3
4
---------------------
5
begin : 9.12.2015
6
copyright : (C) 2015 by Matthias Kuhn
7
email : matthias@opengis.ch
8
***************************************************************************
9
* *
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
14
* *
15
***************************************************************************/
16
17
#ifndef QGSEXPRESSIONPRIVATE_H
18
#define QGSEXPRESSIONPRIVATE_H
19
20
#include <memory>
21
22
#include "
qgis.h
"
23
#include "
qgsdistancearea.h
"
24
#include "
qgsexpression.h
"
25
#include "
qgsexpressionnode.h
"
26
27
#include <QString>
28
30
36
class
QgsExpressionPrivate
37
{
38
public
:
39
QgsExpressionPrivate()
40
: ref( 1 )
41
{}
42
43
QgsExpressionPrivate(
const
QgsExpressionPrivate &other )
44
: ref( 1 )
45
, mRootNode( other.mRootNode ? other.mRootNode->clone() : nullptr )
46
, mParserErrorString( other.mParserErrorString )
47
, mEvalErrorString( other.mEvalErrorString )
48
, mParserErrors( other.mParserErrors )
49
, mExp( other.mExp )
50
, mDaEllipsoid( other.mDaEllipsoid )
51
, mCalc( other.mCalc )
52
, mDistanceUnit( other.mDistanceUnit )
53
, mAreaUnit( other.mAreaUnit )
54
, mIsPrepared( false )
55
{
56
if
( other.mDaCrs )
57
mDaCrs = std::make_unique<QgsCoordinateReferenceSystem>( *other.mDaCrs.get() );
58
if ( other.mDaTransformContext )
59
mDaTransformContext = std::make_unique<QgsCoordinateTransformContext>( *other.mDaTransformContext.get() );
60
}
61
62
~QgsExpressionPrivate() {}
63
64
QAtomicInt ref;
65
66
std::unique_ptr<QgsExpressionNode> mRootNode;
67
68
QString mParserErrorString;
69
QString mEvalErrorString;
70
71
QList<QgsExpression::ParserError> mParserErrors;
72
73
QString mExp;
74
75
QString mDaEllipsoid;
76
std::unique_ptr<QgsCoordinateReferenceSystem> mDaCrs;
77
std::unique_ptr<QgsCoordinateTransformContext> mDaTransformContext;
78
79
std::shared_ptr<QgsDistanceArea> mCalc;
80
Qgis::DistanceUnit
mDistanceUnit =
Qgis::DistanceUnit::Unknown
;
81
Qgis::AreaUnit
mAreaUnit =
Qgis::AreaUnit::Unknown
;
82
84
bool
mIsPrepared =
false
;
85
86
QgsExpressionPrivate &operator=(
const
QgsExpressionPrivate & ) =
delete
;
87
};
88
89
91
92
#endif
// QGSEXPRESSIONPRIVATE_H
Qgis::DistanceUnit
DistanceUnit
Units of distance.
Definition
qgis.h:5568
Qgis::DistanceUnit::Unknown
@ Unknown
Unknown distance unit.
Definition
qgis.h:5618
Qgis::AreaUnit
AreaUnit
Units of area.
Definition
qgis.h:5645
Qgis::AreaUnit::Unknown
@ Unknown
Unknown areal unit.
Definition
qgis.h:5658
qgis.h
qgsdistancearea.h
qgsexpression.h
qgsexpressionnode.h
Generated on
for QGIS API Documentation by
1.17.0