Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
VariableScriptObject.h
Go to the documentation of this file.
1#pragma once
2#include <gii/gen/Variable.h>
4
5namespace sf
6{
7
12 : public ScriptObject
13 , public Variable
14 , private VariableHandler
15{
16 public:
17 explicit VariableScriptObject(const Parameters& params);
18
22 std::string getStatusText() override;
23
24 protected:
28 [[nodiscard]] const IdInfo* getInfo(const std::string& name) const override;
29
33 void destroyObject(bool& should_delete) override
34 {
35 should_delete = true;
36 }
37
41 bool getSetValue(const IdInfo* info, Value* value, Value::vector_type* params, bool flag_set) override;
42
43 private:
44 void variableEventHandler(EEvent event, const Variable& call_var, Variable& link_var, bool same_inst) override;
45 // Skips event for this instance.
46 bool _skipEvent{false};
47
48 // Instruction pointer to jump to on a change of value. 0 means disabled.
49 ip_type _onValue{0};
50 // Instruction pointer to jump to on a change of flags. 0 means disabled.
51 ip_type _onFlags{0};
52 // Instruction pointer to jump to on a change of ID. 0 means disabled.
53 ip_type _onId{0};
54
55 static ScriptObject::IdInfo _info[];
56};
57
58}// namespace sf
Info structure for objects used in scripts.
Definition ScriptObject.h:14
ssize_t ip_type
Instruction pointer type.
Definition ScriptObject.h:36
Counted vector having additional methods and operators for ease of usage.
Definition TVector.h:25
Value container class able to performing arithmetic functions.
Definition Value.h:19
Base class used for giving a Variable instance access to a member functions of a derived class....
Definition VariableHandler.h:14
Script object for exporting GII parameters to a script object.
Definition VariableScriptObject.h:15
void destroyObject(bool &should_delete) override
Overloaded from base class.
Definition VariableScriptObject.h:33
VariableScriptObject(const Parameters &params)
std::string getStatusText() override
Overloaded from base class.
bool getSetValue(const IdInfo *info, Value *value, Value::vector_type *params, bool flag_set) override
Overloaded from base class.
const IdInfo * getInfo(const std::string &name) const override
Overloaded from base class.
EEvent
Events send to the handler set with sf::Variable::setHandler.
Definition VariableTypes.h:130
Class for creating and referencing global or local created parameters or settings called variables....
Definition Variable.h:16
Definition Application.h:10
Used to create static lookup lists.
Definition ScriptObject.h:60
Type to pass to registered classes.
Definition ScriptObject.h:20