19#ifndef _SCRIPT_LOADER_H
20#define _SCRIPT_LOADER_H
22#define PY_SSIZE_T_CLEAN
27#include "GenericCompositeModel.h"
31 using GenericCustomFunction::GenericCustomFunction;
32 PyObject *pFunc =
nullptr;
34 virtual Real evaluate(Real
const *args,
unsigned argc)
override;
41 PyObject *m_pModule =
nullptr;
43 std::list<ScriptFunction> m_functions;
44 std::map<std::string, ScriptFunction *> m_nameToFunction;
46 Script(std::string
const &);
49 bool load(std::string
const &moduleName);
54 std::list<ScriptFunction> &customFunctions()
const;
58 PyObject *m_pSys =
nullptr;
59 PyObject *m_pSysPath =
nullptr;
60 pthread_mutex_t m_registerMutex;
61 Script *m_currScript =
nullptr;
62 std::map<std::string, Script *> m_pathToScript;
65 bool enableScriptDirectory(std::string
const &);
66 bool explodeScriptPath(
71 bool pythonLibraryInit();
78 Script *load(std::string
const &path);
79 Script *getCurrentScript();
Definition: ScriptLoader.h:39
Definition: ScriptLoader.h:57
Definition: GenericCompositeModel.h:58
Definition: ScriptLoader.h:30