make nodes to provide nodes instead of mixins
This commit is contained in:
@@ -6,12 +6,14 @@
|
||||
template <class TElem>
|
||||
class ILink {
|
||||
public:
|
||||
using ElemPtr = std::shared_ptr<TElem>;
|
||||
|
||||
virtual ~ILink() = default;
|
||||
virtual std::shared_ptr<TElem> getNode() const = 0;
|
||||
virtual std::shared_ptr<TElem> getParent() const = 0;
|
||||
virtual void setParent(const std::shared_ptr<TElem>& parent) = 0;
|
||||
virtual const std::vector<std::shared_ptr<TElem>>& getChildren() const = 0;
|
||||
virtual void addChild(const std::shared_ptr<TElem>& child) = 0;
|
||||
virtual void removeChild(const std::shared_ptr<TElem>& child) = 0;
|
||||
virtual void replaceChild(const std::shared_ptr<TElem>& oldChild, const std::shared_ptr<TElem>& newChild) = 0;
|
||||
virtual ElemPtr getNode() const = 0;
|
||||
virtual ElemPtr getParent() const = 0;
|
||||
virtual void setParent(const ElemPtr& parent) = 0;
|
||||
virtual const std::vector<ElemPtr>& 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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user