FastLED 3.9.15
Loading...
Searching...
No Matches

◆ visitControllers()

template<typename Visitor>
static void fl::CLEDController::visitControllers ( Visitor && visitor)
inlinestatic

Visit all controllers in the linked list with a visitor The visitor must be a callable that accepts (const CLEDController*, fl::span<const CRGB>)

Parameters
visitorthe visitor callable to call for each controller
Template Parameters
Visitorcallable type (function, lambda, functor, etc.)

Definition at line 220 of file cled_controller.h.

220 {
221 const CLEDController *pCur = head();
222 while(pCur) {
223 visitor(pCur, fl::span<const CRGB>(pCur->leds(), pCur->size()));
224 pCur = pCur->next();
225 }
226 }
CLEDController(RegistrationMode mode) FL_NOEXCEPT
Protected constructor with registration mode.
CLEDController * next() FL_NOEXCEPT
Get the next controller in the linked list after this one.
CRGB * leds() FL_NOEXCEPT
Pointer to the CRGB array for this controller.
virtual int size() const FL_NOEXCEPT
How many LEDs does this controller manage?
static CLEDController * head() FL_NOEXCEPT
Get the first LED controller in the linked list of controllers.

References CLEDController(), FL_NOEXCEPT, head(), leds(), next(), and size().

Referenced by CFastLED::getEstimatedPowerInMilliWatts().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: