diff options
Diffstat (limited to 'starts/meaning-vm/concept.cpp')
-rw-r--r-- | starts/meaning-vm/concept.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/starts/meaning-vm/concept.cpp b/starts/meaning-vm/concept.cpp index dc9ecca..58d1a7c 100644 --- a/starts/meaning-vm/concept.cpp +++ b/starts/meaning-vm/concept.cpp @@ -5,6 +5,21 @@ ref concept::id() return this; } +bool concept::linked(ref type) +{ + return links.count(type) > 0; +} + +bool concept::linked(ref type, ref target) +{ + for (ref t : getAll(type)) { + if (t == target) { + return true; + } + } + return false; +} + ref concept::get(ref type) { auto result = links.equal_range(type); |