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.
22 lines
704 B
C++
22 lines
704 B
C++
#pragma once
|
|
|
|
#include "ifaces/INode.h"
|
|
#include "Logger.h"
|
|
|
|
/// \brief Базовый класс для всех узлов дерева.
|
|
/// Содержит имя и тип узла, реализует интерфейс INode.
|
|
class BaseNode : public virtual INode {
|
|
public:
|
|
BaseNode(std::string name) : name_(std::move(name)) {
|
|
Logger::get("ConDes").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() {
|
|
Logger::get("ConDes").info(std::string("--- Base destructor called for: ") + name_);
|
|
}
|
|
protected:
|
|
std::string name_;
|
|
std::string kind_;
|
|
};
|