QGIS API Documentation 4.3.0-Master (0cef2469b72)
Loading...
Searching...
No Matches
QgsVbScriptFunctionDeclarationStatement Class Reference

Represents a function declaration statement. More...

#include <qgsvbscript.h>

Inheritance diagram for QgsVbScriptFunctionDeclarationStatement:

Public Member Functions

 QgsVbScriptFunctionDeclarationStatement (const QString &functionName, const QStringList &parameters, QgsVbScriptBlockStatement *body, bool isSub=false)
 Constructor for QgsVbScriptFunctionDeclarationStatement.
void accept (QgsVbScriptVisitor &visitor) const override
 Accepts a visitor to traverse the node.
QgsVbScriptBlockStatement * body () const
 Returns the function body block.
QgsVbScriptNode * clone () const override
 Creates a copy of the node.
QString dump () const override
 Returns the formatted script representation of the node.
QString functionName () const
 Returns the function name.
bool isSub () const
 Returns true if this is a Sub procedure rather than a Function.
QgsVbScriptNode::NodeType nodeType () const override
 Returns the node type.
QStringList parameters () const
 Returns the parameter names.
Public Member Functions inherited from QgsVbScriptStatement
 ~QgsVbScriptStatement () override=default
Public Member Functions inherited from QgsVbScriptNode
virtual ~QgsVbScriptNode ()=default

Additional Inherited Members

Public Types inherited from QgsVbScriptNode
enum class  NodeType {
  BlockStatement , VariableDeclarationStatement , AssignmentStatement , FunctionDeclarationStatement ,
  ExpressionStatement , LiteralExpression , VariableReferenceExpression , MemberAccessExpression ,
  BinaryOperatorExpression , UnaryOperatorExpression , FunctionCallExpression , IndexExpression ,
  ArrayLiteralExpression , IfStatement , ForStatement , ForEachStatement ,
  WhileStatement , ExitStatement , FieldReferenceExpression
}
 Node type identifier. More...

Detailed Description

Represents a function declaration statement.

For example function foo(a, b) ... end function.

Since
QGIS 4.4

Definition at line 365 of file qgsvbscript.h.

Constructor & Destructor Documentation

◆ QgsVbScriptFunctionDeclarationStatement()

QgsVbScriptFunctionDeclarationStatement::QgsVbScriptFunctionDeclarationStatement ( const QString & functionName,
const QStringList & parameters,
QgsVbScriptBlockStatement * body,
bool isSub = false )

Constructor for QgsVbScriptFunctionDeclarationStatement.

Ownership of body is transferred to this statement.

Definition at line 138 of file qgsvbscript.cpp.

Member Function Documentation

◆ accept()

void QgsVbScriptFunctionDeclarationStatement::accept ( QgsVbScriptVisitor & visitor) const
overridevirtual

Accepts a visitor to traverse the node.

Implements QgsVbScriptNode.

Definition at line 158 of file qgsvbscript.cpp.

◆ body()

QgsVbScriptBlockStatement * QgsVbScriptFunctionDeclarationStatement::body ( ) const
inline

Returns the function body block.

Definition at line 393 of file qgsvbscript.h.

◆ clone()

QgsVbScriptNode * QgsVbScriptFunctionDeclarationStatement::clone ( ) const
overridevirtual

Creates a copy of the node.

Caller takes ownership of the returned object.

Implements QgsVbScriptNode.

Definition at line 153 of file qgsvbscript.cpp.

◆ dump()

QString QgsVbScriptFunctionDeclarationStatement::dump ( ) const
overridevirtual

Returns the formatted script representation of the node.

This can be used to export a script node back to a valid VBScript string.

Implements QgsVbScriptNode.

Definition at line 145 of file qgsvbscript.cpp.

◆ functionName()

QString QgsVbScriptFunctionDeclarationStatement::functionName ( ) const
inline

Returns the function name.

Definition at line 383 of file qgsvbscript.h.

◆ isSub()

bool QgsVbScriptFunctionDeclarationStatement::isSub ( ) const
inline

Returns true if this is a Sub procedure rather than a Function.

Definition at line 398 of file qgsvbscript.h.

◆ nodeType()

QgsVbScriptNode::NodeType QgsVbScriptFunctionDeclarationStatement::nodeType ( ) const
inlineoverridevirtual

Returns the node type.

Implements QgsVbScriptNode.

Definition at line 375 of file qgsvbscript.h.

◆ parameters()

QStringList QgsVbScriptFunctionDeclarationStatement::parameters ( ) const
inline

Returns the parameter names.

Definition at line 388 of file qgsvbscript.h.


The documentation for this class was generated from the following files: