| 36 | BaseController::BaseController() {} |
| 37 | |
| 38 | void BaseController::AddCallback(const int id, std::function<void()> func) { |
| 39 | CHECK(func); |
| 40 | CHECK_GT(callbacks_.count(id), 0) << "Callback not registered"; |
| 41 | callbacks_.at(id).push_back(std::move(func)); |
| 42 | } |
| 43 | |
| 44 | void BaseController::RegisterCallback(const int id) { |
| 45 | callbacks_.emplace(id, std::list<std::function<void()>>()); |
nothing calls this directly
no outgoing calls
no test coverage detected