#pragma once #include namespace intellect { namespace level0 { template typename vref> struct refmixin { using array = std::vector; void link(ref const & type, ref const & target) { ptr()->link(type, target); } void unlink(ref const & type, ref const & target) { ptr()->unlink(type, target); } void unlink(ref const & type) { ptr()->unlink(type); } bool linked(ref const & type) const { return ptr()->linked(type); } bool linked(ref const & type, ref const & target) const { return ptr()->linked(type, target); } array getAll(ref const & type) const { return conv(ptr()->getAll(type)); } ref get(ref const & type) const { return conv(ptr()->get(type)); } void set(ref const & type, ref const & target) { ptr()->set(type, target); } template vref vget(ref const & type) const { return conv>(get(type)); } private: inline concept * ptr() const { return conv(this)->ptr; } template static inline OUT conv(IN r) { return *(OUT*)&r; } }; } }