23 #ifndef PYTHONCOMMON_H
24 #define PYTHONCOMMON_H
26 #ifndef NPY_1_7_API_VERSION
27 #define NPY_1_7_API_VERSION 0x00000007
29 #ifndef NPY_1_8_API_VERSION
30 #define NPY_1_8_API_VERSION 0x00000008
37 #if (defined _DEBUG) && (defined WIN32)
39 #include "python/pythonWrapper.h"
42 #include "python/pythonWrapper.h"
46 #include "../../common/sharedStructures.h"
57 PyObject* printOutParams(
const QVector<ito::Param> *params,
bool asErr,
bool addInfos,
const int num,
bool printToStdStream =
true);
59 void errOutInitParams(
const QVector<ito::Param> *params,
const int num,
const char *reason);
60 ito::RetVal parseInitParams(
const QVector<ito::Param> *defaultParamListMand,
const QVector<ito::Param> *defaultParamListOpt, PyObject *args, PyObject *kwds, QVector<ito::ParamBase> ¶mListMandOut, QVector<ito::ParamBase> ¶mListOptOut);
69 PyObject* buildFilterOutputValues(QVector<QVariant> *outVals,
ito::RetVal &retValue);
109 static bool transformRetValToPyException(
ito::RetVal &retVal, PyObject *exceptionIfError = PyExc_RuntimeError, PyObject *exceptionIfWarning = PyExc_RuntimeWarning);
110 static bool setReturnValueMessage(
ito::RetVal &retVal,
const QString &objName,
const tErrMsg &errorMSG, PyObject *exceptionIfError = PyExc_RuntimeError, PyObject *exceptionIfWarning = PyExc_RuntimeWarning);
111 static bool setReturnValueMessage(
ito::RetVal &retVal,
const char *objName,
const tErrMsg &errorMSG, PyObject *exceptionIfError = PyExc_RuntimeError, PyObject *exceptionIfWarning = PyExc_RuntimeWarning);
112 static ito::RetVal checkForPyExceptions(
bool clearError =
true);
CodeCheckerMessageType
Definition: pythonCommon.h:92
ito::RetVal createEmptyParamBaseFromParamVector(const QVector< ito::Param > *paramVecIn, QVector< ito::ParamBase > ¶mVecOut)
This function searches for reserves Keywords (e.g. autoLoadParams) sets the corresponding bool parame...
chose Flake8 if flake8 is available, else chose PyFlakes if pyflakes is available, else No Checker
Definition: pythonCommon.h:88
Class for managing status values (like errors or warning)
Definition: retVal.h:54
class for parameter handling e.g. to pass paramters to plugins
Definition: param.h:283
CodeCheckerMode
< mode that can be chosen for the code checker
Definition: pythonCommon.h:83
the assigned message is displayed as information (blue dot)
Definition: pythonCommon.h:94
void errOutInitParams(const QVector< ito::Param > *params, const int num, const char *reason)
Definition: pythonCommon.cpp:993
no code checker active
Definition: pythonCommon.h:85
the assigned message is displayed as error (bug symbol)
Definition: pythonCommon.h:96
ito::RetVal checkAndSetParamVal(PyObject *tempObj, ito::Param *param, int *set)
Definition: pythonCommon.cpp:53
Definition: apiFunctionsGraph.cpp:39
the assigned message is displayed as warning (orange dot)
Definition: pythonCommon.h:95
syntax error and further static code analysis based on PyFlakes
Definition: pythonCommon.h:86
extended code checks (syntax, style, doc style, complexity...) based on Flake8
Definition: pythonCommon.h:87
ito::RetVal copyParamVector(const QVector< ito::ParamBase > *paramVecIn, QVector< ito::ParamBase > ¶mVecOut)
Definition: pythonCommon.cpp:1331
ito::RetVal findAndDeleteReservedInitKeyWords(PyObject *kwds, bool *enableAutoLoadParams)
Definition: pythonCommon.cpp:1394
Definition: pythonCommon.h:71