17 #ifndef QGSEXPRESSIONPRIVATE_H
18 #define QGSEXPRESSIONPRIVATE_H
35 class QgsExpressionPrivate
38 QgsExpressionPrivate()
42 QgsExpressionPrivate(
const QgsExpressionPrivate &other )
44 , mRootNode( other.mRootNode ? other.mRootNode->clone() : nullptr )
45 , mParserErrorString( other.mParserErrorString )
46 , mEvalErrorString( other.mEvalErrorString )
47 , mParserErrors( other.mParserErrors )
49 , mDaEllipsoid( other.mDaEllipsoid )
50 , mDaCrs( other.mDaCrs )
51 , mDaTransformContext( other.mDaTransformContext )
52 , mCalc( other.mCalc )
53 , mDistanceUnit( other.mDistanceUnit )
54 , mAreaUnit( other.mAreaUnit )
57 ~QgsExpressionPrivate()
66 QString mParserErrorString;
67 QString mEvalErrorString;
69 QList<QgsExpression::ParserError> mParserErrors;
77 std::shared_ptr<QgsDistanceArea> mCalc;
82 bool mIsPrepared =
false;
84 QgsExpressionPrivate &operator= (
const QgsExpressionPrivate & ) =
delete;
90 HelpArg(
const QString &arg,
const QString &desc,
bool descOnly =
false,
bool syntaxOnly =
false,
91 bool optional =
false,
const QString &defaultVal = QString() )
93 , mDescription( desc )
94 , mDescOnly( descOnly )
95 , mSyntaxOnly( syntaxOnly )
96 , mOptional( optional )
97 , mDefaultVal( defaultVal )
101 QString mDescription;
110 HelpExample(
const QString &expression,
const QString &returns,
const QString ¬e = QString() )
111 : mExpression( expression )
112 , mReturns( returns )
124 HelpVariant(
const QString &name,
const QString &description,
125 const QList<HelpArg> &arguments = QList<HelpArg>(),
126 bool variableLenArguments =
false,
127 const QList<HelpExample> &examples = QList<HelpExample>(),
128 const QString ¬es = QString(),
129 const QStringList &tags = QStringList() )
131 , mDescription( description )
132 , mArguments( arguments )
133 , mVariableLenArguments( variableLenArguments )
134 , mExamples( examples )
140 QString mDescription;
141 QList<HelpArg> mArguments;
142 bool mVariableLenArguments;
143 QList<HelpExample> mExamples;
154 Help(
const QString &name,
const QString &type,
const QString &description,
const QList<HelpVariant> &variants )
157 , mDescription( description )
158 , mVariants( variants )
163 QString mDescription;
164 QList<HelpVariant> mVariants;
167 typedef QHash<QString, Help> HelpTextHash;
173 #endif // QGSEXPRESSIONPRIVATE_H