diff options
Diffstat (limited to 'starts/meaning-vm/concept.hpp')
-rw-r--r-- | starts/meaning-vm/concept.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/starts/meaning-vm/concept.hpp b/starts/meaning-vm/concept.hpp index a80b157..2b05f44 100644 --- a/starts/meaning-vm/concept.hpp +++ b/starts/meaning-vm/concept.hpp @@ -19,10 +19,17 @@ struct ref // for helpers ref(std::string const &); ref(char const * str) : ref(std::string(str)) { } + ref(bool b) : ref(b ? "true" : "false") { } ref() : ref("nothing") { } value<std::string> & name() const; operator const char *() const; + concept operator=(ref other); // helper constructs new concept with this as link + ref operator[](concept links); // helper sets all links from passed concept + + bool isa(ref what) const; + bool isan(ref what) const; + concept * ptr; }; @@ -33,6 +40,8 @@ struct concept using array = std::vector<ref>; ref id(); + bool linked(ref type); + bool linked(ref type, ref target); ref get(ref type); // returns first array getAll(ref type); void link(ref type, ref target); |