tmp
This commit is contained in:
@@ -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_;
|
||||
};
|
||||
Reference in New Issue
Block a user