MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / ShouldRunActions

Method ShouldRunActions

lib/macro/macro.cpp:378–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376}
377
378bool Macro::ShouldRunActions() const
379{
380 if (CheckInParallel() && _conditionCheckFuture.valid()) {
381 vblog(LOG_INFO,
382 "%s not ready to perform actions as condition check is still running",
383 _name.c_str());
384 return false;
385 }
386
387 const bool hasActionsToExecute =
388 !_paused && (_matched || _elseActions.size() > 0) &&
389 _actionModeMatch;
390
391 if (VerboseLoggingEnabled() && !_actionModeMatch && !_paused) {
392 if (_matched && _actions.size() > 0) {
393 blog(LOG_INFO, "skip actions for Macro %s (on change)",
394 _name.c_str());
395 }
396 if (!_matched && _elseActions.size() > 0) {
397 blog(LOG_INFO,
398 "skip else actions for Macro %s (on change)",
399 _name.c_str());
400 }
401 }
402
403 return hasActionsToExecute;
404}
405
406void Macro::SetName(const std::string &name)
407{

Callers 2

RunMacrosFunction · 0.80
test-macro.cppFile · 0.80

Calls 4

VerboseLoggingEnabledFunction · 0.85
sizeMethod · 0.80
validMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected