#pragma once #include #include #include "ifaces/ILinkMixin.h" /// \brief Интерфейс для классов-связей между элементами. /// \tparam TElem Тип элемента, между которыми устанавливается связь. template class ILink { public: using ElemPtr = std::shared_ptr; virtual ~ILink() = default; virtual ElemPtr getNode() const = 0; virtual ElemPtr getParent() const = 0; virtual void setParent(const ElemPtr& parent) = 0; virtual const std::vector& getChildren() const = 0; virtual void addChild(const ElemPtr& child) = 0; virtual void removeChild(const ElemPtr& child) = 0; virtual void replaceChild(const ElemPtr& oldChild, const ElemPtr& newChild) = 0; };