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 , private VariableHandler
14{
15 public:
19 explicit VariableScriptObject(const Parameters& params);
20
28
33
37 std::string getStatusText() override;
38
42 [[nodiscard]] const IdInfo* getInfo(const std::string& name) const override;
43
47 void destroyObject(bool& should_delete) override;
48
52 bool getSetValue(const IdInfo* info, Value* value, Value::vector_type* params, bool flag_set) override;
53
54 private:
58 void variableEventHandler(EEvent event, const Variable& call_var, Variable& link_var, bool same_inst) override;
59
60 Variable* _variable;
61 bool _skipEvent{false};
62 ip_type _onValue{0};
63 ip_type _onFlags{0};
64 ip_type _onId{0};
65 bool _owner;// Determines if the variable pointer is owned and must be deleted when out of scope.
66 static IdInfo _info[];
67};
68
69}// namespace sf
Info structure for objects used in scripts.
Definition ScriptObject.h:14
Counted vector having additional methods and operators for ease of usage. This template class extends...
Definition TVector.h:20
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:14
void destroyObject(bool &should_delete) override
Overridden from base class.
VariableScriptObject(ScriptObject *parent, Variable *var)
Constructor for not using the interface to create it. Does not do any of the event handling but only ...
VariableScriptObject(const Parameters &params)
Interface constructor for setting up variable as server or client.
~VariableScriptObject() override
Overridden from base class.
std::string getStatusText() override
Overridden from base class.
bool getSetValue(const IdInfo *info, Value *value, Value::vector_type *params, bool flag_set) override
Overridden from base class.
const IdInfo * getInfo(const std::string &name) const override
Overridden 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
#define _GII_CLASS
Definition gii/global.h:38
Definition Application.h:10
Used to create static lookup lists.
Definition ScriptObject.h:62
Type to pass to registered classes.
Definition ScriptObject.h:20