QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
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. | |
|
virtualdefault |
|
inlinevirtual |
Returns the current interpreter state.
The actual interpretation of the returned values depend on the interpreter subclass.
Definition at line 64 of file qgscodeeditor.h.
int QgsCodeInterpreter::exec | ( | const QString & | command | ) |
Executes a command in the interpreter.
Returns an interpreter specific state value.
Definition at line 1208 of file qgscodeeditor.cpp.
|
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.
|
pure virtual |
Returns the interactive prompt string to use for the interpreter, given a state.