Botcraft 1.21.4
Loading...
Searching...
No Matches
BaseNode.cpp
Go to the documentation of this file.
2
4
5#include <typeinfo>
6
7namespace Botcraft
8{
9 BaseNode::BaseNode(const std::string& name_) : name(name_)
10 {
11
12 }
13
15 {
16
17 }
19 std::string BaseNode::GetFullDescriptor() const
20 {
21 return this->name.empty() ? GetClassName() : ("\"" + this->name + "\" (" + GetClassName() + ")");
22 }
23
24 const std::string& BaseNode::GetName() const
25 {
26 return name;
27 }
28
29 std::string BaseNode::GetClassName() const
30 {
31 return Utilities::Demangle(typeid(*this).name(), true);
32 }
33} // namespace Botcraft
const std::string & GetName() const
Definition BaseNode.cpp:24
std::string GetFullDescriptor() const
Definition BaseNode.cpp:19
std::string GetClassName() const
Definition BaseNode.cpp:29
virtual ~BaseNode()
Definition BaseNode.cpp:14
const std::string name
Definition BaseNode.hpp:31
BaseNode(const std::string &name_)
Definition BaseNode.cpp:9
std::string Demangle(const std::string &name, const bool simplify_output)
Demangle a class name.