add hierarchical node

This commit is contained in:
Сергей Маринкевич
2025-07-24 15:14:08 +07:00
parent 55ef99c848
commit c228caaa45
15 changed files with 330 additions and 46 deletions
+24
View File
@@ -0,0 +1,24 @@
#pragma once
#include <vector>
#include "ifaces/ILink.h"
#include "Logger.h"
template <class TElem>
class NotImplementedLink : public ILink<TElem> {
using ElemPtr = std::shared_ptr<TElem>>;
public:
NotImplementedLink(ElemPtr node) {}
ElemPtr getNode() const override { return nullptr; }
ElemPtr getParent() const override { return nullptr; }
void setParent(const ElemPtr& parent) override { }
const std::vector<ElemPtr>& getChildren() const override { return empty_; }
void addChild(const ElemPtr& child) override { }
void removeChild(const ElemPtr& child) override { }
~NotImplementedLink() override {
Logger::get("Link").dbg("--- Destructor called for: NotImplementedLink");
}
private:
std::vector<ElemPtr> empty_;
};