39 std::unique_lock lock(mutex);
40 if (clouds.find(name) == clouds.end())
42 clouds.emplace(name,
nullptr);
48 std::unique_lock lock(mutex);
49 auto find = clouds.find(name);
50 if (find != clouds.end())
52 if (find->second !=
nullptr)
54 int position = this->findChild(find->second);
57 this->removeChild(position);
66 std::unique_lock lock(mutex);
68 std::vector<std::string> cloud_list;
69 for (
const auto& [name, _] : clouds)
71 cloud_list.push_back(name);
78 std::unique_lock lock(mutex);
79 auto find = clouds.find(name);
80 return find != clouds.end() ? find->second :
nullptr;
85 std::unique_lock lock(mutex);
87 auto item = clouds.find(name);
88 if (item != clouds.end())
90 if (item->second !=
nullptr)
93 int position = this->findChild(item->second);
96 this->removeChild(position);
99 item->second = &cloud;
100 this->addChild(&cloud);