| 232 | } |
| 233 | |
| 234 | IEventPtr EventManager::addAdvancedToggle(const std::string& name, |
| 235 | const AdvancedToggleCallback& onToggled) |
| 236 | { |
| 237 | if (alreadyRegistered(name)) |
| 238 | { |
| 239 | return _emptyEvent; |
| 240 | } |
| 241 | |
| 242 | IEventPtr event = std::make_shared<Toggle>(onToggled); |
| 243 | |
| 244 | // Add the command to the list |
| 245 | _events[name] = event; |
| 246 | |
| 247 | // Return the pointer to the newly created event |
| 248 | return event; |
| 249 | } |
| 250 | |
| 251 | void EventManager::setToggled(const std::string& name, const bool toggled) |
| 252 | { |
no outgoing calls
no test coverage detected