MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / getKeys

Method getKeys

src/blackboard.cpp:140–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140std::vector<StringView> Blackboard::getKeys() const
141{
142 // Lock storage_mutex_ (shared) to prevent iterator invalidation and
143 // dangling StringView from concurrent modifications (BUG-6 fix).
144 const std::shared_lock storage_lock(storage_mutex_);
145 if(storage_.empty())
146 {
147 return {};
148 }
149 std::vector<StringView> out;
150 out.reserve(storage_.size());
151 for(const auto& entry_it : storage_)
152 {
153 out.push_back(entry_it.first);
154 }
155 return out;
156}
157
158void Blackboard::clear()
159{

Callers 4

ExportBlackboardToJSONFunction · 0.80
TESTFunction · 0.80
TESTFunction · 0.80
TESTFunction · 0.80

Calls 3

push_backMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by 3

TESTFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64