fix(Sip): because of adding unique_ptr

This commit is contained in:
Julien Cabieces 2025-05-06 08:28:11 +02:00 committed by Nyall Dawson
parent d53ebb8dd4
commit bd970ea77b
3 changed files with 142 additions and 0 deletions

View File

@ -313,6 +313,7 @@ Constructor
%End
~NodeUnaryOperator();
QgsSQLStatement::UnaryOperator op() const;
%Docstring
Operator
@ -331,6 +332,8 @@ Operand
virtual QgsSQLStatement::Node *clone() const /Factory/;
private:
NodeUnaryOperator( const NodeUnaryOperator &other );
protected:
};
@ -350,6 +353,7 @@ Constructor
%End
~NodeBinaryOperator();
QgsSQLStatement::BinaryOperator op() const;
%Docstring
Operator
@ -383,6 +387,8 @@ Precedence
Is left associative ?
%End
private:
NodeBinaryOperator( const NodeBinaryOperator &other );
protected:
};
@ -403,6 +409,7 @@ Constructor
%End
~NodeInOperator();
QgsSQLStatement::Node *node() const;
%Docstring
Variable at the left of IN
@ -426,6 +433,8 @@ Values list
virtual QgsSQLStatement::Node *clone() const /Factory/;
private:
NodeInOperator( const NodeInOperator &other );
protected:
};
@ -444,6 +453,7 @@ An 'X BETWEEN y and z' operator.
Constructor
%End
QgsSQLStatement::Node *node() const;
%Docstring
Variable at the left of BETWEEN
@ -472,6 +482,8 @@ Maximum bound
virtual QgsSQLStatement::Node *clone() const /Factory/;
private:
NodeBetweenOperator( const NodeBetweenOperator &other );
protected:
};
@ -491,6 +503,7 @@ Constructor
%End
~NodeFunction();
QString name() const;
%Docstring
Returns function name
@ -509,6 +522,8 @@ Returns arguments
virtual QgsSQLStatement::Node *clone() const /Factory/;
private:
NodeFunction( const NodeFunction &other );
protected:
};
@ -619,6 +634,7 @@ Constructor
%End
~NodeSelectedColumn();
void setAlias( const QString &alias );
%Docstring
Sets alias name
@ -646,6 +662,8 @@ Alias name
Clone with same type return
%End
private:
NodeSelectedColumn( const NodeSelectedColumn &other );
protected:
};
@ -665,6 +683,7 @@ Constructor
%End
~NodeCast();
QgsSQLStatement::Node *node() const;
%Docstring
Node that is referred to
@ -683,6 +702,8 @@ Type
virtual QgsSQLStatement::Node *clone() const /Factory/;
private:
NodeCast( const NodeCast &other );
protected:
};
@ -764,6 +785,7 @@ Constructor with table definition and USING columns
%End
~NodeJoin();
QgsSQLStatement::NodeTableDef *tableDef() const;
%Docstring
Table definition
@ -797,6 +819,8 @@ Join type
Clone with same type return
%End
private:
NodeJoin( const NodeJoin &other );
protected:
};
@ -816,6 +840,7 @@ Constructor
%End
~NodeColumnSorted();
QgsSQLStatement::NodeColumnRef *column() const;
%Docstring
The name of the column.
@ -838,6 +863,8 @@ Whether the column is sorted in ascending order
Clone with same type return
%End
private:
NodeColumnSorted( const NodeColumnSorted &other );
protected:
};
@ -857,6 +884,7 @@ Constructor
%End
~NodeSelect();
void setJoins( const QList<QgsSQLStatement::NodeJoin *> &joins /Transfer/ );
%Docstring
Sets joins
@ -907,6 +935,8 @@ Returns the list of order by columns
virtual QgsSQLStatement::Node *clone() const /Factory/;
private:
NodeSelect( const NodeSelect &other );
protected:
};

View File

@ -313,6 +313,7 @@ Constructor
%End
~NodeUnaryOperator();
QgsSQLStatement::UnaryOperator op() const;
%Docstring
Operator
@ -331,6 +332,8 @@ Operand
virtual QgsSQLStatement::Node *clone() const /Factory/;
private:
NodeUnaryOperator( const NodeUnaryOperator &other );
protected:
};
@ -350,6 +353,7 @@ Constructor
%End
~NodeBinaryOperator();
QgsSQLStatement::BinaryOperator op() const;
%Docstring
Operator
@ -383,6 +387,8 @@ Precedence
Is left associative ?
%End
private:
NodeBinaryOperator( const NodeBinaryOperator &other );
protected:
};
@ -403,6 +409,7 @@ Constructor
%End
~NodeInOperator();
QgsSQLStatement::Node *node() const;
%Docstring
Variable at the left of IN
@ -426,6 +433,8 @@ Values list
virtual QgsSQLStatement::Node *clone() const /Factory/;
private:
NodeInOperator( const NodeInOperator &other );
protected:
};
@ -444,6 +453,7 @@ An 'X BETWEEN y and z' operator.
Constructor
%End
QgsSQLStatement::Node *node() const;
%Docstring
Variable at the left of BETWEEN
@ -472,6 +482,8 @@ Maximum bound
virtual QgsSQLStatement::Node *clone() const /Factory/;
private:
NodeBetweenOperator( const NodeBetweenOperator &other );
protected:
};
@ -491,6 +503,7 @@ Constructor
%End
~NodeFunction();
QString name() const;
%Docstring
Returns function name
@ -509,6 +522,8 @@ Returns arguments
virtual QgsSQLStatement::Node *clone() const /Factory/;
private:
NodeFunction( const NodeFunction &other );
protected:
};
@ -619,6 +634,7 @@ Constructor
%End
~NodeSelectedColumn();
void setAlias( const QString &alias );
%Docstring
Sets alias name
@ -646,6 +662,8 @@ Alias name
Clone with same type return
%End
private:
NodeSelectedColumn( const NodeSelectedColumn &other );
protected:
};
@ -665,6 +683,7 @@ Constructor
%End
~NodeCast();
QgsSQLStatement::Node *node() const;
%Docstring
Node that is referred to
@ -683,6 +702,8 @@ Type
virtual QgsSQLStatement::Node *clone() const /Factory/;
private:
NodeCast( const NodeCast &other );
protected:
};
@ -764,6 +785,7 @@ Constructor with table definition and USING columns
%End
~NodeJoin();
QgsSQLStatement::NodeTableDef *tableDef() const;
%Docstring
Table definition
@ -797,6 +819,8 @@ Join type
Clone with same type return
%End
private:
NodeJoin( const NodeJoin &other );
protected:
};
@ -816,6 +840,7 @@ Constructor
%End
~NodeColumnSorted();
QgsSQLStatement::NodeColumnRef *column() const;
%Docstring
The name of the column.
@ -838,6 +863,8 @@ Whether the column is sorted in ascending order
Clone with same type return
%End
private:
NodeColumnSorted( const NodeColumnSorted &other );
protected:
};
@ -857,6 +884,7 @@ Constructor
%End
~NodeSelect();
void setJoins( const QList<QgsSQLStatement::NodeJoin *> &joins /Transfer/ );
%Docstring
Sets joins
@ -907,6 +935,8 @@ Returns the list of order by columns
virtual QgsSQLStatement::Node *clone() const /Factory/;
private:
NodeSelect( const NodeSelect &other );
protected:
};

View File

@ -329,6 +329,9 @@ class CORE_EXPORT QgsSQLStatement
NodeUnaryOperator( QgsSQLStatement::UnaryOperator op, QgsSQLStatement::Node *operand SIP_TRANSFER ) : mOp( op ), mOperand( operand ) {}
~NodeUnaryOperator() override { }
NodeUnaryOperator( const NodeUnaryOperator &other ) = delete;
NodeUnaryOperator &operator=( const NodeUnaryOperator &other ) = delete;
//! Operator
QgsSQLStatement::UnaryOperator op() const { return mOp; }
@ -341,6 +344,11 @@ class CORE_EXPORT QgsSQLStatement
void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
QgsSQLStatement::Node *clone() const override SIP_FACTORY;
private:
#ifdef SIP_RUN
NodeUnaryOperator( const NodeUnaryOperator &other );
#endif
protected:
UnaryOperator mOp;
std::unique_ptr<Node> mOperand;
@ -361,6 +369,9 @@ class CORE_EXPORT QgsSQLStatement
{}
~NodeBinaryOperator() override { }
NodeBinaryOperator( const NodeBinaryOperator &other ) = delete;
NodeBinaryOperator &operator=( const NodeBinaryOperator &other ) = delete;
//! Operator
QgsSQLStatement::BinaryOperator op() const { return mOp; }
@ -382,6 +393,11 @@ class CORE_EXPORT QgsSQLStatement
//! Is left associative ?
bool leftAssociative() const;
private:
#ifdef SIP_RUN
NodeBinaryOperator( const NodeBinaryOperator &other );
#endif
protected:
BinaryOperator mOp;
@ -400,6 +416,9 @@ class CORE_EXPORT QgsSQLStatement
NodeInOperator( QgsSQLStatement::Node *node SIP_TRANSFER, QgsSQLStatement::NodeList *list SIP_TRANSFER, bool notin = false ) : mNode( node ), mList( list ), mNotIn( notin ) {}
~NodeInOperator() override { }
NodeInOperator( const NodeInOperator &other ) = delete;
NodeInOperator &operator=( const NodeInOperator &other ) = delete;
//! Variable at the left of IN
QgsSQLStatement::Node *node() const { return mNode.get(); }
@ -415,6 +434,11 @@ class CORE_EXPORT QgsSQLStatement
void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
QgsSQLStatement::Node *clone() const override SIP_FACTORY;
private:
#ifdef SIP_RUN
NodeInOperator( const NodeInOperator &other );
#endif
protected:
std::unique_ptr<Node> mNode;
std::unique_ptr<NodeList> mList;
@ -433,6 +457,9 @@ class CORE_EXPORT QgsSQLStatement
: mNode( node ), mMinVal( minVal ), mMaxVal( maxVal ), mNotBetween( notBetween ) {}
~NodeBetweenOperator() override { }
NodeBetweenOperator( const NodeBetweenOperator &other ) = delete;
NodeBetweenOperator &operator=( const NodeBetweenOperator &other ) = delete;
//! Variable at the left of BETWEEN
QgsSQLStatement::Node *node() const { return mNode.get(); }
@ -451,6 +478,11 @@ class CORE_EXPORT QgsSQLStatement
void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
QgsSQLStatement::Node *clone() const override SIP_FACTORY;
private:
#ifdef SIP_RUN
NodeBetweenOperator( const NodeBetweenOperator &other );
#endif
protected:
std::unique_ptr<Node> mNode;
std::unique_ptr<Node> mMinVal;
@ -469,6 +501,9 @@ class CORE_EXPORT QgsSQLStatement
NodeFunction( const QString &name, QgsSQLStatement::NodeList *args SIP_TRANSFER ) : mName( name ), mArgs( args ) {}
~NodeFunction() override { }
NodeFunction( const NodeFunction &other ) = delete;
NodeFunction &operator=( const NodeFunction &other ) = delete;
//! Returns function name
QString name() const { return mName; }
@ -481,6 +516,11 @@ class CORE_EXPORT QgsSQLStatement
void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
QgsSQLStatement::Node *clone() const override SIP_FACTORY;
private:
#ifdef SIP_RUN
NodeFunction( const NodeFunction &other );
#endif
protected:
QString mName;
std::unique_ptr<NodeList> mArgs;
@ -563,6 +603,9 @@ class CORE_EXPORT QgsSQLStatement
NodeSelectedColumn( QgsSQLStatement::Node *node SIP_TRANSFER ) : mColumnNode( node ) {}
~NodeSelectedColumn() override { }
NodeSelectedColumn( const NodeSelectedColumn &other ) = delete;
NodeSelectedColumn &operator=( const NodeSelectedColumn &other ) = delete;
//! Sets alias name
void setAlias( const QString &alias ) { mAlias = alias; }
@ -580,6 +623,11 @@ class CORE_EXPORT QgsSQLStatement
//! Clone with same type return
QgsSQLStatement::NodeSelectedColumn *cloneThis() const SIP_FACTORY;
private:
#ifdef SIP_RUN
NodeSelectedColumn( const NodeSelectedColumn &other );
#endif
protected:
std::unique_ptr<Node> mColumnNode;
QString mAlias;
@ -596,6 +644,9 @@ class CORE_EXPORT QgsSQLStatement
NodeCast( QgsSQLStatement::Node *node SIP_TRANSFER, const QString &type ) : mNode( node ), mType( type ) {}
~NodeCast() override { }
NodeCast( const NodeCast &other ) = delete;
NodeCast &operator=( const NodeCast &other ) = delete;
//! Node that is referred to
QgsSQLStatement::Node *node() const { return mNode.get(); }
@ -608,6 +659,12 @@ class CORE_EXPORT QgsSQLStatement
void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
QgsSQLStatement::Node *clone() const override SIP_FACTORY;
private:
#ifdef SIP_RUN
NodeCast( const NodeCast &other );
#endif
protected:
std::unique_ptr<Node> mNode;
QString mType;
@ -671,6 +728,9 @@ class CORE_EXPORT QgsSQLStatement
NodeJoin( QgsSQLStatement::NodeTableDef *tabledef SIP_TRANSFER, const QList<QString> &usingColumns, QgsSQLStatement::JoinType type ) : mTableDef( tabledef ), mUsingColumns( usingColumns ), mType( type ) {}
~NodeJoin() override { }
NodeJoin( const NodeJoin &other ) = delete;
NodeJoin &operator=( const NodeJoin &other ) = delete;
//! Table definition
QgsSQLStatement::NodeTableDef *tableDef() const { return mTableDef.get(); }
@ -691,6 +751,11 @@ class CORE_EXPORT QgsSQLStatement
//! Clone with same type return
QgsSQLStatement::NodeJoin *cloneThis() const SIP_FACTORY;
private:
#ifdef SIP_RUN
NodeJoin( const NodeJoin &other );
#endif
protected:
std::unique_ptr<NodeTableDef> mTableDef;
std::unique_ptr<Node> mOnExpr;
@ -709,6 +774,9 @@ class CORE_EXPORT QgsSQLStatement
NodeColumnSorted( QgsSQLStatement::NodeColumnRef *column SIP_TRANSFER, bool asc ) : mColumn( column ), mAsc( asc ) {}
~NodeColumnSorted() override { }
NodeColumnSorted( const NodeColumnSorted &other ) = delete;
NodeColumnSorted &operator=( const NodeColumnSorted &other ) = delete;
//! The name of the column.
QgsSQLStatement::NodeColumnRef *column() const { return mColumn.get(); }
@ -723,6 +791,11 @@ class CORE_EXPORT QgsSQLStatement
//! Clone with same type return
QgsSQLStatement::NodeColumnSorted *cloneThis() const SIP_FACTORY;
private:
#ifdef SIP_RUN
NodeColumnSorted( const NodeColumnSorted &other );
#endif
protected:
std::unique_ptr<NodeColumnRef> mColumn;
bool mAsc;
@ -739,6 +812,9 @@ class CORE_EXPORT QgsSQLStatement
NodeSelect( const QList<QgsSQLStatement::NodeTableDef *> &tableList SIP_TRANSFER, const QList<QgsSQLStatement::NodeSelectedColumn *> &columns SIP_TRANSFER, bool distinct ) : mTableList( tableList ), mColumns( columns ), mDistinct( distinct ) {}
~NodeSelect() override;
NodeSelect( const NodeSelect &other ) = delete;
NodeSelect &operator=( const NodeSelect &other ) = delete;
//! Sets joins
void setJoins( const QList<QgsSQLStatement::NodeJoin *> &joins SIP_TRANSFER ) { qDeleteAll( mJoins ); mJoins = joins; }
//! Append a join
@ -767,6 +843,12 @@ class CORE_EXPORT QgsSQLStatement
void accept( QgsSQLStatement::Visitor &v ) const override { v.visit( *this ); }
QgsSQLStatement::Node *clone() const override SIP_FACTORY;
private:
#ifdef SIP_RUN
NodeSelect( const NodeSelect &other );
#endif
protected:
QList<NodeTableDef *> mTableList;
QList<NodeSelectedColumn *> mColumns;