#pragma once #include "common.hpp" #include #include namespace intellect { namespace level0 { struct concept { // a concept is made of concept-typed links to other concepts std::multimap links; using array = std::vector; concept* id(); void link(concept* type, concept* target); void unlink(concept* type, concept* target); void unlink(concept* type); bool linked(concept* type) const; bool linked(concept* type, concept* target) const; array getAll(concept* type) const; // get and set enforce that only 1 link of a given type is present concept* get(concept* type) const; void set(concept* type, concept* target); template value* vget(concept* type) const { return static_cast*>(get(type)); } template value* val() { return this; } }; } }