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

◆ unrelate()

bool MayaFlux::Portal::Forma::Layer::unrelate ( uint32_t  primary_id,
uint32_t  related_id 
)

Remove a specific relation between two elements.

Does not remove either element from the layer.

Definition at line 222 of file Layer.cpp.

223{
224 auto it = m_relations.find(primary_id);
225 if (it == m_relations.end())
226 return false;
227 auto& rel = it->second;
228 auto rit = std::ranges::find(rel, related_id);
229 if (rit == rel.end())
230 return false;
231 rel.erase(rit);
232 if (rel.empty())
233 m_relations.erase(it);
234 return true;
235}
std::unordered_map< uint32_t, std::vector< uint32_t > > m_relations
Definition Layer.hpp:321

References m_relations.