#pragma once #include "links/BaseLink.h" #include /// \brief Связь для листового узла, не допускающая дочерних элементов. template class LeafLink : public BaseLink { public: using ElemPtr = std::shared_ptr; LeafLink(std::shared_ptr e) : BaseLink(e) {} void addChild(const ElemPtr&) override { throw std::logic_error("Leaf cannot have children"); } };