7 #include "knowrob/terms/Blank.h"
8 #include "knowrob/integration/python/utils.h"
14 if (it !=
table().end()) {
15 if (
auto atomPtr = it->second.value().lock()) {
16 if (atomPtr->isBlank()) {
17 return std::static_pointer_cast<Blank>(atomPtr);
22 auto inserted =
table().emplace(name, std::nullopt);
23 auto &jt = inserted.first;
24 auto atom = std::make_shared<knowrob::Blank>(jt->first);
26 auto locked = jt->second.value().lock();
28 throw std::runtime_error(
"Failed to lock Blank");
30 return std::static_pointer_cast<Blank>(locked);
37 class_<Blank, std::shared_ptr<Blank>, bases<Atom, RDFNode>>
38 (
"Blank", init<std::string_view>());
static AtomTable & table()
static std::shared_ptr< Blank > Tabled(std::string_view stringForm)
void createType< Blank >()