diff options
Diffstat (limited to 'starts/meaning-vm/level-0/baseref.hpp')
-rw-r--r-- | starts/meaning-vm/level-0/baseref.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/starts/meaning-vm/level-0/baseref.hpp b/starts/meaning-vm/level-0/baseref.hpp index b68de24..b4ceb02 100644 --- a/starts/meaning-vm/level-0/baseref.hpp +++ b/starts/meaning-vm/level-0/baseref.hpp @@ -36,6 +36,16 @@ public: array getAll(ref const & type) const; links_t links() const; + ref link(std::initializer_list<ref> refs) + { + for (auto it = refs.begin(); it != refs.end();) { + ref type = *it++; + ref target = *it++; + link(type, target); + } + return ptr(); + } + template <typename T> T& vget(ref const & type) const { return p->vget<T>(type.p)->data; } template <typename T> |