FVisualScriptFrame
One call's parameters and locals, laid out by slot: the values in one vector, the names pointing at the function's own declarations. A call used to build an unordered_map — a node allocation and a string copy per local and parameter, a hash and a probe per GetParam / GetLocal / SetLocal. A node resolves its slot once per call (ForNode); the debugger, the DAP and a host that seeds a call scope by name still reach it by name.
- Module
- VisualScripting
- Header
#include "VisualScripting/VisualScriptVM.h"- Namespace
Mowo
Constructors
| Signature | Name | Description |
|---|---|---|
FVisualScriptFrame() = default | FVisualScriptFrame | |
FVisualScriptFrame(FVisualScriptFrame&&) noexcept = default | FVisualScriptFrame | |
FVisualScriptFrame(const FVisualScriptFrame& other) | FVisualScriptFrame |
Public functions
| Returns | Name | Description |
|---|---|---|
FVisualScriptFrame& | operator= | |
FVisualScriptFrame& | operator= | |
void | Bind | Locals at their declared defaults, then the parameters from args (a missing argument is a default value). |
void | Reset | Empties the frame and releases what its values hold, keeping the vectors' capacity for the next Bind (the per-thread frame pool). |
int32_t | SlotOf | |
VisualScriptValue* | Find | |
const VisualScriptValue* | Find | |
VisualScriptValue& | FindOrAdd | A name with no declaration gets a slot of its own (SetLocal of an undeclared name, a debugger write). |
VisualScriptValue* | ForNode | nodeIdx of graph resolved to its slot on first use and by index after; a different graph (a debugger expression run in this frame) starts a fresh resolution. |
size_t | Size | |
const std::string& | NameAt | |
VisualScriptValue& | ValueAt | |
const VisualScriptValue& | ValueAt | |
void | ForEach |
Function details
FVisualScriptFrame
FVisualScriptFrame() = defaultFVisualScriptFrame
FVisualScriptFrame(FVisualScriptFrame&&) noexcept = defaultFVisualScriptFrame
FVisualScriptFrame(const FVisualScriptFrame& other)operator=
FVisualScriptFrame& operator=(FVisualScriptFrame&&) noexcept = defaultoperator=
FVisualScriptFrame& operator=(const FVisualScriptFrame& other)Bind
void Bind(const VisualScriptFunction& fn, const std::vector<VisualScriptValue>& args)Locals at their declared defaults, then the parameters from args (a missing argument is a default value). A parameter named like a local takes that local's slot, which is what the map it replaced did.
Reset
void Reset()Empties the frame and releases what its values hold, keeping the vectors' capacity for the next Bind (the per-thread frame pool).
SlotOf
int32_t SlotOf(const std::string& name) constFind
VisualScriptValue* Find(const std::string& name)Find
const VisualScriptValue* Find(const std::string& name) constFindOrAdd
VisualScriptValue& FindOrAdd(const std::string& name)A name with no declaration gets a slot of its own (SetLocal of an undeclared name, a debugger write).
ForNode
VisualScriptValue* ForNode(const VisualScriptGraph* graph, int nodeIdx, size_t nodeCount, const std::string& name)nodeIdx of graph resolved to its slot on first use and by index after; a different graph (a debugger expression run in this frame) starts a fresh resolution. Null when the name is not in the frame.
Size
size_t Size() constNameAt
const std::string& NameAt(size_t slot) constValueAt
VisualScriptValue& ValueAt(size_t slot)ValueAt
const VisualScriptValue& ValueAt(size_t slot) constForEach
template<typename Fn> void ForEach(Fn&& fn) const