|
|
| PythonExecutor (const PythonExecutor &)=delete |
| |
|
PythonExecutor & | operator= (const PythonExecutor &)=delete |
| |
| errc_t | initialize () override |
| |
| void | finalize () override |
| |
| errc_t | execute (StringView script, ScriptResult *resultOut=nullptr) override |
| |
| errc_t | evaluate (StringView expression, ScriptResult *resultOut=nullptr) override |
| |
| std::string | getLastError () const override |
| |
| errc_t | setVariable (StringView name, StringView value) override |
| |
| errc_t | setVariable (StringView name, double value) override |
| |
| errc_t | setVariable (StringView name, int value) override |
| |
| errc_t | setVariable (StringView name, bool value) override |
| |
| errc_t | getVariable (StringView name, std::string &value) const override |
| |
| errc_t | getVariable (StringView name, double &value) const override |
| |
| errc_t | getVariable (StringView name, int &value) const override |
| |
| errc_t | getVariable (StringView name, bool &value) const override |
| |
|
errc_t | setVariable (StringView name, const char *value) |
| |
|
errc_t | setVariable (StringView name, const std::string &value) |
| |
|
errc_t | setVariable (Variable *var) |
| |
|
template<typename T , typename = typename std::enable_if<!std::is_convertible<T, StringView>::value>::type> |
| errc_t | setVariable (StringView name, T value)=delete |
| |
| virtual | ~ScriptExecutor ()=default |
| |
| errc_t | execute (StringView script, std::string *error) |
| |
|
errc_t | setVariable (StringView name, const char *value) |
| |
|
errc_t | setVariable (StringView name, const std::string &value) |
| |
|
errc_t | setVariable (Variable *var) |
| |
|
template<typename T , typename = typename std::enable_if<!std::is_convertible<T, StringView>::value>::type> |
| errc_t | setVariable (StringView name, T value)=delete |
| |
|
errc_t | getVariable (Variable *var) |
| |
Python 脚本执行器
通过 PythonAPI 单例驱动 CPython 解释器, 多个 PythonExecutor 实例共享同一解释器状态。