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

Method subscribe

include/behaviortree_cpp/utils/signal.h:37–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 }
36
37 Subscriber subscribe(CallableFunction func)
38 {
39 Subscriber sub = std::make_shared<CallableFunction>(std::move(func));
40 subscribers_.emplace_back(sub);
41 return sub;
42 }
43
44private:
45 std::vector<std::weak_ptr<CallableFunction>> subscribers_;

Callers 1

Calls 1

moveFunction · 0.85

Tested by

no test coverage detected