Botcraft
1.21.4
Loading...
Searching...
No Matches
BaseNode.cpp
Go to the documentation of this file.
1
#include "
botcraft/AI/BaseNode.hpp
"
2
3
#include "
botcraft/Utilities/DemanglingUtilities.hpp
"
4
5
#include <typeinfo>
6
7
namespace
Botcraft
8
{
9
BaseNode::BaseNode
(
const
std::string& name_) : name(name_)
10
{
11
12
}
13
14
BaseNode::~BaseNode
()
15
{
16
17
}
18
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
BaseNode.hpp
DemanglingUtilities.hpp
Botcraft::BaseNode::GetName
const std::string & GetName() const
Definition
BaseNode.cpp:24
Botcraft::BaseNode::GetFullDescriptor
std::string GetFullDescriptor() const
Definition
BaseNode.cpp:19
Botcraft::BaseNode::GetClassName
std::string GetClassName() const
Definition
BaseNode.cpp:29
Botcraft::BaseNode::~BaseNode
virtual ~BaseNode()
Definition
BaseNode.cpp:14
Botcraft::BaseNode::name
const std::string name
Definition
BaseNode.hpp:31
Botcraft::BaseNode::BaseNode
BaseNode(const std::string &name_)
Definition
BaseNode.cpp:9
Botcraft::Utilities::Demangle
std::string Demangle(const std::string &name, const bool simplify_output)
Demangle a class name.
Definition
DemanglingUtilities.cpp:11
Botcraft
Definition
BaseNode.hpp:6
botcraft
src
AI
BaseNode.cpp
Generated by
1.9.8