You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
655 B
C++
18 lines
655 B
C++
#pragma once
|
|
#include <memory>
|
|
#include <vector>
|
|
#include "ifaces/ILinkMixin.h"
|
|
|
|
template <class TElem>
|
|
class ILink {
|
|
public:
|
|
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;
|
|
};
|