#include <memory_resource>#include <nk/value/fn_handle.hpp>#include <nk/value/span.hpp>#include <nk/value/value.hpp>Go to the source code of this file.
Functions | |
| void | nk::runtime::registerStructuresRuntime (Engine &engine) |
| void | nk::runtime::registerStructfunCallbackBuiltin (Engine &engine) |
| Value | nk::runtime::structure (std::pmr::memory_resource *mr=nullptr) |
| Empty struct scalar (s = struct()). | |
| Value | nk::runtime::structure (Span< const Value > nameValuePairs, std::pmr::memory_resource *mr=nullptr) |
| Struct from {name, value, …} pairs (s = struct(name1, val1, name2, val2, …)). | |
| Value | nk::runtime::fieldnames (const Value &s, std::pmr::memory_resource *mr=nullptr) |
| Field names of a struct (fn = fieldnames(s)). | |
| Value | nk::runtime::isfield (const Value &s, const Value &name, std::pmr::memory_resource *mr=nullptr) |
| Test for field existence (tf = isfield(s, name)). | |
| Value | nk::runtime::rmfield (const Value &s, const Value &name, std::pmr::memory_resource *mr=nullptr) |
| Remove a field from a struct (s2 = rmfield(s, name)). | |
| Value | nk::runtime::structfun (FnHandle fn, const Value &s, bool uniformOutput, std::pmr::memory_resource *mr=nullptr) |
| Apply a function handle to every field of a struct (y = structfun(fn, s, uniformOutput)). | |
| Value | nk::runtime::getfield (const Value &s, const Value &name, std::pmr::memory_resource *mr=nullptr) |
| Gets the value of specified field in structure (v = getfield(s, 'field')). | |
| Value | nk::runtime::setfield (const Value &s, const Value &name, const Value &value, std::pmr::memory_resource *mr=nullptr) |
| Sets the value of specified field in structure (s = setfield(s, 'field', val)). | |
| Value | nk::runtime::orderfields (const Value &s, std::pmr::memory_resource *mr=nullptr) |
| Orders fields of structure array alphabetically (s = orderfields(s)). | |
| Value | nk::runtime::struct2cell (const Value &s, std::pmr::memory_resource *mr=nullptr) |
| Converts structure array to cell array of field values (c = struct2cell(s)). | |