f46e1a6d0b
New iterators can be used to iterate through Nodes. Squashed commit of the following: commit 602ed679631647dd1c8874b0b0145fcb09458341 Author: GRayHook <s@marinkevich.ru> Date: Fri Aug 1 19:36:46 2025 +0700 fup after CR commit08f7b59aa7Author: GRayHook <s@marinkevich.ru> Date: Fri Aug 1 19:20:48 2025 +0700 normalize members of iterator commit038cbb73f4Author: GRayHook <s@marinkevich.ru> Date: Fri Aug 1 18:57:08 2025 +0700 bump commit0f93988fb6Author: GRayHook <s@marinkevich.ru> Date: Fri Aug 1 11:32:35 2025 +0700 tmp
20 lines
652 B
C++
20 lines
652 B
C++
#pragma once
|
|
#include <memory>
|
|
#include "ifaces/ILink.h"
|
|
|
|
/// \brief Интерфейс для классов, поддерживающих связь с дочерними элементами через ILink.
|
|
/// \tparam TElem Тип дочернего элемента.
|
|
template <class TElem>
|
|
class ILinkMixin {
|
|
public:
|
|
using LinkPtr = std::shared_ptr<ILink<TElem>>;
|
|
using ElemPtr = std::shared_ptr<TElem>;
|
|
|
|
virtual ~ILinkMixin() = default;
|
|
virtual void linkChild(const ElemPtr& child) = 0;
|
|
virtual void unlinkParent() = 0;
|
|
virtual const std::vector<ElemPtr>& children() = 0;
|
|
virtual ElemPtr parent() = 0;
|
|
virtual LinkPtr getLink() = 0;
|
|
};
|