Inviwo
0.9.10.1
Inviwo documentation
|
#include <pythonscript.h>
Public Member Functions | |
PythonScriptDisk (const std::string &filename="") | |
virtual void | setFilename (const std::string &filename) override |
const BaseCallBack * | onChange (std::function< void()> callback) |
void | removeOnChange (const BaseCallBack *callback) |
Public Member Functions inherited from inviwo::PythonScript | |
virtual | ~PythonScript () |
void | setSource (const std::string &source) |
std::string | getSource () const |
bool | run (std::unordered_map< std::string, pybind11::object > locals=std::unordered_map< std::string, pybind11::object >{}, std::function< void(pybind11::dict)> callback=nullptr) |
bool | run (std::function< void(pybind11::dict)> callback) |
bool | run (pybind11::dict locals, std::function< void(pybind11::dict)> callback=nullptr) |
const std::string & | getFilename () const |
Public Member Functions inherited from inviwo::FileObserver | |
FileObserver (InviwoApplication *app) | |
FileObserver (const std::string &filePath="") | |
Starts observing file if existing. More... | |
FileObserver (const FileObserver &)=delete | |
FileObserver & | operator= (const FileObserver &)=delete |
FileObserver (FileObserver &&rhs) | |
FileObserver & | operator= (FileObserver &&that) |
virtual | ~FileObserver () |
bool | startFileObservation (const std::string &filePath) |
Starts observing file if it exists. More... | |
bool | stopFileObservation (const std::string &filePath) |
Stops observing the file if being observed. More... | |
void | stopAllObservation () |
const std::unordered_set< std::string > & | getFiles () const |
bool | isObserved (const std::string &fileName) const |
Additional Inherited Members | |
Protected Attributes inherited from inviwo::FileObserver | |
InviwoApplication * | app_ |
Class for handling PythonScripts that exists as files on disk. PythonScriptDisk will observe the file and reload it from disk when it detects it has changed.
const inviwo::BaseCallBack * inviwo::PythonScriptDisk::onChange | ( | std::function< void()> | callback | ) |
Register a callback that will be called once the file has changed on disk.
void inviwo::PythonScriptDisk::removeOnChange | ( | const BaseCallBack * | callback | ) |
Remove a callback from the list of callbacks