You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
519 B
C++
21 lines
519 B
C++
#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<INode> {
|
|
public:
|
|
BaseNode(std::string name) : name_(std::move(name)) {}
|
|
const std::string& name() const override { return name_; }
|
|
~BaseNode() {
|
|
std::cout << "--- Base destructor called for: " << name_ << "\n";
|
|
}
|
|
protected:
|
|
NodePtr getNode() override {
|
|
return shared_from_this();
|
|
}
|
|
std::string name_;
|
|
};
|