#pragma once #include "Node.hpp" class Link : public Node { public: Link(); Link(const Link& node); ~Link() override; [[nodiscard]] std::shared_ptr clone() const override; std::shared_ptr findNode(const std::vector& path, ui32 currentDepth) override; [[nodiscard]] bool isHardLink() const; static bool linkNodes(const std::shared_ptr& link, const std::shared_ptr& target, bool hard); void removeOutgoingLinks() override; std::shared_ptr getTarget() override; [[nodiscard]] std::shared_ptr getLink() const; [[nodiscard]] NodeType getType() const override { return LINK; } void dumpUtil(std::ostream& ss, const Key& key, ui32 currentDepth, std::vector& indents) override; private: std::weak_ptr mLink; bool mIsHard = false; };