itom
Loading...
Searching...
No Matches
ito::PythonCommon Class Reference

Public Types

enum  CodeCheckerMode { NoCodeChecker = 0 , CodeCheckerPyFlakes = 1 , CodeCheckerFlake8 = 2 , CodeCheckerAuto = 3 }
 < mode that can be chosen for the code checker More...
 
enum  CodeCheckerMessageType { TypeInfo = 0 , TypeWarning = 1 , TypeError = 2 }
 
enum  tErrMsg {
  noMsg = 0 , loadPlugin = 1 , execFunc = 2 , invokeFunc = 3 ,
  getProperty = 4 , runFunc = 5
}
 

Static Public Member Functions

static bool transformRetValToPyException (ito::RetVal &retVal, PyObject *exceptionIfError=PyExc_RuntimeError, PyObject *exceptionIfWarning=PyExc_RuntimeWarning)
 
static bool setReturnValueMessage (ito::RetVal &retVal, const QString &objName, const tErrMsg &errorMSG, PyObject *exceptionIfError=PyExc_RuntimeError, PyObject *exceptionIfWarning=PyExc_RuntimeWarning)
 
static bool setReturnValueMessage (ito::RetVal &retVal, const char *objName, const tErrMsg &errorMSG, PyObject *exceptionIfError=PyExc_RuntimeError, PyObject *exceptionIfWarning=PyExc_RuntimeWarning)
 
static ito::RetVal checkForPyExceptions (bool clearError=true)
 

Member Enumeration Documentation

◆ CodeCheckerMessageType

Enumerator
TypeInfo 

the assigned message is displayed as information (blue dot)

TypeWarning 

the assigned message is displayed as warning (orange dot)

TypeError 

the assigned message is displayed as error (bug symbol)

◆ CodeCheckerMode

< mode that can be chosen for the code checker

Enumerator
NoCodeChecker 

no code checker active

CodeCheckerPyFlakes 

syntax error and further static code analysis based on PyFlakes

CodeCheckerFlake8 

extended code checks (syntax, style, doc style, complexity...) based on Flake8

CodeCheckerAuto 

chose Flake8 if flake8 is available, else chose PyFlakes if pyflakes is available, else No Checker

Member Function Documentation

◆ checkForPyExceptions()

ito::RetVal ito::PythonCommon::checkForPyExceptions ( bool clearError = true)
static

‍checks if a Python exception is currently set and returns ito::retError with the corresponding error message, if this is the case (else retOk). The python exception is only cleared, if clearError is true (default) The caller of this method must already hold the GIL!


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