@@ -1011,11 +1011,9 @@ class CORE_EXPORT QgsExpression
1011
1011
1012
1012
virtual QString dump () const ;
1013
1013
1014
- protected:
1015
- QList<QgsExpression::Node *> mList ;
1016
- QStringList mNameList ;
1017
-
1018
1014
private:
1015
+ QList<Node *> mList ;
1016
+ QStringList mNameList ;
1019
1017
1020
1018
bool mHasNamedNodes ;
1021
1019
};
@@ -1046,9 +1044,9 @@ class CORE_EXPORT QgsExpression
1046
1044
1047
1045
virtual bool isStatic ( QgsExpression *parent, const QgsExpressionContext *context ) const override ;
1048
1046
1049
- protected :
1050
- QgsExpression:: UnaryOperator mOp ;
1051
- QgsExpression:: Node *mOperand = nullptr ;
1047
+ private :
1048
+ UnaryOperator mOp ;
1049
+ Node *mOperand = nullptr ;
1052
1050
};
1053
1051
1054
1052
/* * \ingroup core
@@ -1124,7 +1122,7 @@ class CORE_EXPORT QgsExpression
1124
1122
virtual QgsExpression::Node *clone () const override ;
1125
1123
virtual bool isStatic ( QgsExpression *parent, const QgsExpressionContext *context ) const override ;
1126
1124
1127
- protected :
1125
+ private :
1128
1126
Node *mNode = nullptr ;
1129
1127
NodeList *mList = nullptr ;
1130
1128
bool mNotIn ;
@@ -1185,7 +1183,7 @@ class CORE_EXPORT QgsExpression
1185
1183
virtual QgsExpression::Node *clone () const override ;
1186
1184
virtual bool isStatic ( QgsExpression *parent, const QgsExpressionContext *context ) const override ;
1187
1185
1188
- protected :
1186
+ private :
1189
1187
QVariant mValue ;
1190
1188
};
1191
1189
@@ -1214,35 +1212,36 @@ class CORE_EXPORT QgsExpression
1214
1212
virtual QgsExpression::Node *clone () const override ;
1215
1213
virtual bool isStatic ( QgsExpression *parent, const QgsExpressionContext *context ) const override ;
1216
1214
1217
- protected :
1215
+ private :
1218
1216
QString mName ;
1219
1217
int mIndex ;
1220
1218
};
1221
1219
1220
+ class NodeCondition ;
1221
+
1222
1222
/* * \ingroup core
1223
1223
*/
1224
1224
class CORE_EXPORT WhenThen
1225
1225
{
1226
1226
public:
1227
- WhenThen ( QgsExpression::Node *whenExp SIP_TRANSFER, QgsExpression::Node *thenExp SIP_TRANSFER )
1228
- : mWhenExp ( whenExp )
1229
- , mThenExp ( thenExp )
1230
- {}
1231
- ~WhenThen () { delete mWhenExp ; delete mThenExp ; }
1227
+ WhenThen ( QgsExpression::Node *whenExp, QgsExpression::Node *thenExp );
1228
+ ~WhenThen ();
1232
1229
1233
1230
// ! WhenThen nodes cannot be copied.
1234
1231
WhenThen ( const WhenThen &rh ) = delete ;
1235
1232
// ! WhenThen nodes cannot be copied.
1236
1233
WhenThen &operator =( const WhenThen &rh ) = delete ;
1237
1234
1238
- // protected:
1239
- QgsExpression::Node *mWhenExp = nullptr ;
1240
- QgsExpression::Node *mThenExp = nullptr ;
1235
+ WhenThen *clone () const ;
1241
1236
1242
1237
private:
1243
1238
#ifdef SIP_RUN
1244
1239
WhenThen ( const QgsExpression::WhenThen &rh );
1245
1240
#endif
1241
+ Node *mWhenExp = nullptr ;
1242
+ Node *mThenExp = nullptr ;
1243
+
1244
+ friend class NodeCondition ;
1246
1245
1247
1246
};
1248
1247
typedef QList<QgsExpression::WhenThen *> WhenThenList;
@@ -1275,9 +1274,9 @@ class CORE_EXPORT QgsExpression
1275
1274
virtual QgsExpression::Node *clone () const override ;
1276
1275
virtual bool isStatic ( QgsExpression *parent, const QgsExpressionContext *context ) const override ;
1277
1276
1278
- protected :
1279
- QgsExpression:: WhenThenList mConditions ;
1280
- QgsExpression:: Node *mElseExp = nullptr ;
1277
+ private :
1278
+ WhenThenList mConditions ;
1279
+ Node *mElseExp = nullptr ;
1281
1280
};
1282
1281
1283
1282
/* * Returns the help text for a specified function.
0 commit comments