MCPcopy Create free account
hub / github.com/FastLED/FastLED / addComponent

Method addComponent

src/platforms/shared/ui/json/ui_manager.cpp.hpp:41–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void JsonUiManager::addComponent(fl::weak_ptr<JsonUiInternal> component) FL_NOEXCEPT {
42 //FL_WARN("*** JsonUiManager::addComponent ENTRY ***");
43 fl::unique_lock<fl::mutex> lock(mMutex);
44 mComponents.insert(component);
45 mItemsAdded = true;
46
47 // Mark the component as changed so it gets sent to the frontend initially
48 if (auto ptr = component.lock()) {
49 ptr->markChanged();
50 //FL_WARN("*** COMPONENT REGISTERED: ID " << ptr->id() << " name=" << ptr->name() << " (Total: " << mComponents.size() << ")");
51 }
52}
53
54void JsonUiManager::removeComponent(fl::weak_ptr<JsonUiInternal> component) FL_NOEXCEPT {
55 fl::unique_lock<fl::mutex> lock(mMutex);

Callers 2

setJsonUiHandlersFunction · 0.80
addJsonUiComponentFunction · 0.80

Calls 3

markChangedMethod · 0.80
insertMethod · 0.45
lockMethod · 0.45

Tested by

no test coverage detected