#pragma once #include "links/BaseLink.h" #include template class OneToOneLink : public BaseLink { public: OneToOneLink(std::shared_ptr e) : BaseLink(e) {} void addChild(const std::shared_ptr& child) override { if (!this->children_.empty()) throw std::logic_error("OneToOneLink cannot have more than one child"); BaseLink::addChild(child); } };