12 std::unique_lock<std::mutex> lock(
mutex_);
21 const auto& remapped_key = remapping_it->second;
24 return parent->getAny(remapped_key);
31 return parent->getAny(key);
36 return &(it->second->value);
41 std::unique_lock<std::mutex> lock(
mutex_);
44 return (it ==
storage_.end()) ? nullptr : &(it->second->port_info);
50 {
static_cast<std::string
>(
internal),
static_cast<std::string
>(external)});
57 const auto& key = it.first;
58 const auto& entry = it.second;
60 auto port_type = entry->port_info.type();
63 port_type = &(entry->value.type());
66 std::cout << key <<
" (" <<
demangle(port_type) <<
") -> ";
73 std::cout <<
"remapped to parent [" << remapping_it->second <<
"]" << std::endl;
77 std::cout << ((entry->value.empty()) ?
"empty" :
"full") << std::endl;
87 std::vector<StringView> out;
89 for (
const auto& entry_it :
storage_)
91 out.push_back(entry_it.first);
96 std::shared_ptr<Blackboard::Entry>
99 std::unique_lock<std::mutex> lock(
mutex_);
104 auto storage_it =
storage_.find(key);
107 const auto& prev_info = storage_it->second->port_info;
108 if (prev_info.type() != info.
type() &&
109 prev_info.isStronglyTyped() &&
112 throw LogicError(
"Blackboard: once declared, the type of a port "
113 "shall not change. Previously declared type [",
117 return storage_it->second;
120 std::shared_ptr<Entry> entry;
126 const auto& remapped_key = remapping_it->second;
129 entry = parent->createEntryImpl(remapped_key, info);
136 entry = parent->createEntryImpl(key, info);
141 entry = std::make_shared<Entry>(info);