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
+5 -2
View File
@@ -2,16 +2,19 @@
#include <iostream>
#include "ifaces/INode.h"
#include "Logger.h"
class BaseNode : public virtual INode {
public:
BaseNode(std::string name) : name_(std::move(name)) {
std::cout << "--- Base constructor called for: " << name_ << "\n";
Logger::get("Node").dbg(std::string("--- Base constructor called for: ") + name_);
}
const std::string& name() const override { return name_; }
const std::string& kind() const override { return kind_; }
~BaseNode() {
std::cout << "--- Base destructor called for: " << name_ << "\n";
Logger::get("Node").dbg(std::string("--- Base destructor called for: ") + name_);
}
protected:
std::string name_;
std::string kind_;
};