QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
QgsCodeInterpreter Class Referenceabstract

An interface for code interpreters. More...

#include <qgscodeeditor.h>

Public Member Functions

virtual ~QgsCodeInterpreter ()
 
virtual int currentState () const
 Returns the current interpreter state.
 
int exec (const QString &command)
 Executes a command in the interpreter.
 
virtual QString promptForState (int state) const =0
 Returns the interactive prompt string to use for the interpreter, given a state.
 

Protected Member Functions

virtual int execCommandImpl (const QString &command)=0
 Pure virtual method for executing commands in the interpreter.
 

Detailed Description

An interface for code interpreters.

Since
QGIS 3.30

Definition at line 40 of file qgscodeeditor.h.

Constructor & Destructor Documentation

◆ ~QgsCodeInterpreter()

QgsCodeInterpreter::~QgsCodeInterpreter ( )
virtualdefault

Member Function Documentation

◆ currentState()

virtual int QgsCodeInterpreter::currentState ( ) const
inlinevirtual

Returns the current interpreter state.

The actual interpretation of the returned values depend on the interpreter subclass.

Definition at line 59 of file qgscodeeditor.h.

◆ exec()

int QgsCodeInterpreter::exec ( const QString &  command)

Executes a command in the interpreter.

Returns an interpreter specific state value.

Definition at line 1126 of file qgscodeeditor.cpp.

◆ execCommandImpl()

virtual int QgsCodeInterpreter::execCommandImpl ( const QString &  command)
protectedpure virtual

Pure virtual method for executing commands in the interpreter.

Subclasses must implement this method. It will be called internally whenever the public exec() method is called.

◆ promptForState()

virtual QString QgsCodeInterpreter::promptForState ( int  state) const
pure virtual

Returns the interactive prompt string to use for the interpreter, given a state.


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