QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
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. More...
 
int exec (const QString &command)
 Executes a command in the interpreter. More...
 
virtual QString promptForState (int state) const =0
 Returns the interactive prompt string to use for the interpreter, given a state. More...
 

Protected Member Functions

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

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 1164 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: