MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ closure()

std::vector< uint32_t > MayaFlux::Portal::Forma::Layer::closure ( uint32_t  id) const

Return id plus every id transitively related to it.

Definition at line 243 of file Layer.cpp.

244{
245 std::vector<uint32_t> result { id };
246
247 for (size_t i = 0; i < result.size(); ++i) {
248 auto it = m_relations.find(result[i]);
249 if (it == m_relations.end())
250 continue;
251 for (uint32_t rel_id : it->second) {
252 if (std::ranges::find(result, rel_id) == result.end())
253 result.push_back(rel_id);
254 }
255 }
256
257 return result;
258}
std::unordered_map< uint32_t, std::vector< uint32_t > > m_relations
Definition Layer.hpp:321

References m_relations.

Referenced by bring_to_front(), MayaFlux::Portal::Forma::destroy(), remove(), send_to_back(), and set_visible().

+ Here is the caller graph for this function: