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
+4 -3
View File
@@ -3,15 +3,16 @@
#include <memory>
#include "ifaces/ILinkMixin.h"
#include "Logger.h"
class BaseLinkMixin : public virtual ILinkMixin,
public std::enable_shared_from_this<ILinkMixin> {
public:
void linkChild(const MixinPtr& child) override {
getLink()->addChild(child);
LinkPtr childLink = child->getLink();
childLink->setParent(getNode());
getLink()->addChild(child);
}
void unlinkParent() override {
@@ -28,7 +29,7 @@ public:
}
~BaseLinkMixin() override {
std::cout << "--- Destructor called for: " << "BaseLinkMixin" << "\n";
Logger::get("Mixin").dbg("--- Destructor called for: BaseLinkMixin");
}
protected: