Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
ProjectScriptObject.h
Go to the documentation of this file.
1#pragma once
2#include <gii/gen/Variable.h>
4#include <ipj/iface/global.h>
6
7namespace sf
8{
9
14{
15 public:
20 explicit ProjectScriptObject(const char* type_name);
30 void AddScriptParam(const std::string& name, Variable* variable);
31
32 protected:
36 const IdInfo* getInfo(const std::string& name) const override;
40 bool getSetValue(const IdInfo* info, Value* value, Value::vector_type* params, bool flag_set) override;
44 void destroyObject(bool& should_delete) override;
45
46 private:
50 struct Parameter final : IdInfo
51 {
52 explicit Parameter(ScriptObject* parent, Variable* variable, const std::string& name, int index);
53 std::string _nameSoure;
54 VariableScriptObject _scriptObject;
55 };
56
60 std::vector<std::unique_ptr<Parameter>> _parameters;
61};
62
63}// namespace sf
Object for scripts to interact with the inspection project.
Definition ProjectScriptObject.h:14
ProjectScriptObject(const char *type_name)
Constructor.
void AddScriptParam(const std::string &name, Variable *variable)
Adds the passed variable as a parameter in the script.
const IdInfo * getInfo(const std::string &name) const override
Overridden from base class.
bool getSetValue(const IdInfo *info, Value *value, Value::vector_type *params, bool flag_set) override
Overridden from base class.
void destroyObject(bool &should_delete) override
Overridden from base class.
~ProjectScriptObject() override
Virtual overridden destructor.
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
Script object for exporting GII parameters to a script object.
Definition VariableScriptObject.h:14
Class for creating and referencing global or local created parameters or settings called variables....
Definition Variable.h:16
#define _IPJ_CLASS
Definition ipj/iface/global.h:35
Definition Application.h:10
Used to create static lookup lists.
Definition ScriptObject.h:62