Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
ScriptLink.h
Go to the documentation of this file.
1#pragma once
2#include <ipj/iface/global.h>
4
5namespace sf
6{
7
12{
13 public:
19 ScriptLink(ScriptInterpreter* compiler, bool owner);
20
25 virtual ~ScriptLink();
26
30 void setOutputStream(std::ostream* os);
31
36
41
47 bool setScript(const std::string& script);
48
52 std::string getScript() const;
53
57 bool initialize();
58
62 bool compile();
63
67 void abort();
68
72 void flush();
73
77 void start();
78
82 void execute();
83
89 bool run(bool bk_gnd);
90
95 bool process();
96
101 std::string getFile() const;
102
109 bool setFile(const std::string& path);
110
116
121 bool saveFile();
122
126 void setName(const std::string& name);
127
131 std::string getName() const;
132
137 bool isDirty() const;
138
143 void setBackground(bool background = true);
144
149 bool isBackground() const;
150
151 private:
152 bool _owner;
153 ScriptInterpreter* _scriptInterpreter;
154 std::string _script;
155 ScriptInterpreter::EState _backgroundState;
156 std::string _filepath;
157 bool _dirty;
158 bool _background;
159 std::string _name;
160};
161
162}// namespace sf
Script interpreter for running a loaded script.
Definition ScriptInterpreter.h:14
EState
State of the running script.
Definition ScriptInterpreter.h:61
#define _IPJ_CLASS
Definition ipj/iface/global.h:35
Definition Application.h:10