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

Method EntryUpdatedDecorator

src/decorators/updated_decorator.cpp:20–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18{
19
20EntryUpdatedDecorator::EntryUpdatedDecorator(const std::string& name,
21 const NodeConfig& config,
22 NodeStatus if_not_updated)
23 : DecoratorNode(name, config), if_not_updated_(if_not_updated)
24{
25 auto it = config.input_ports.find("entry");
26 if(it == config.input_ports.end() || it->second.empty())
27 {
28 throw LogicError("Missing port 'entry' in ", name);
29 }
30 const auto entry_str = it->second;
31 StringView stripped_key;
32 if(isBlackboardPointer(entry_str, &stripped_key))
33 {
34 entry_key_ = stripped_key;
35 }
36 else
37 {
38 entry_key_ = entry_str;
39 }
40}
41
42NodeStatus EntryUpdatedDecorator::tick()
43{

Callers

nothing calls this directly

Calls 3

LogicErrorClass · 0.85
endMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected