add hierarchical node
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user