This commit is contained in:
Сергей Маринкевич
2025-07-22 19:18:03 +07:00
parent 3801a5dc0b
commit f5f78308bd
11 changed files with 136 additions and 143 deletions
+20
View File
@@ -0,0 +1,20 @@
#pragma once
#include "mixins/LazyLinkMixin.h"
#include "ifaces/INode.h"
#include <iostream>
class BaseNode : public INode,
public LazyLinkMixin<OneToManyLink>,
public std::enable_shared_from_this<BaseNode> {
public:
BaseNode(std::string name) : name_(std::move(name)) {}
const std::string& name() const override { return name_; }
~BaseNode() {
std::cout << "--- Destructor called for: " << name_ << "\n";
}
protected:
NodePtr getShared() override {
return shared_from_this();
}
std::string name_;
};