| 54 | } |
| 55 | |
| 56 | std::unordered_map<uint32_t, std::vector<uint32_t>> IfcCache::PopulateRelAggregatesMap() |
| 57 | { |
| 58 | std::unordered_map<uint32_t, std::vector<uint32_t>> resultVector; |
| 59 | auto relAggregates = _loader.GetExpressIDsWithType(schema::IFCRELAGGREGATES); |
| 60 | |
| 61 | for (uint32_t relAggregateID : relAggregates) |
| 62 | { |
| 63 | _loader.MoveToArgumentOffset(relAggregateID, 4); |
| 64 | |
| 65 | uint32_t relatingBuildingElement = _loader.GetRefArgument(); |
| 66 | auto aggregates = _loader.GetSetArgument(); |
| 67 | auto relVoidsIt2 = _relVoids.find(relatingBuildingElement); |
| 68 | |
| 69 | for (auto &aggregate : aggregates) |
| 70 | { |
| 71 | uint32_t aggregateID = _loader.GetRefArgument(aggregate); |
| 72 | resultVector[relatingBuildingElement].push_back(aggregateID); |
| 73 | if (relVoidsIt2 != _relVoids.end() && !relVoidsIt2->second.empty()) |
| 74 | { |
| 75 | auto relVoidsIt1 = _relVoids.find(aggregateID); |
| 76 | // any any voids that are aggregated to the voids map |
| 77 | if (relVoidsIt1 == _relVoids.end()) |
| 78 | { |
| 79 | _relVoids[aggregateID] = std::vector<uint32_t>(); |
| 80 | relVoidsIt1 = _relVoids.find(aggregateID); |
| 81 | } |
| 82 | relVoidsIt1->second.insert(relVoidsIt1->second.end(), relVoidsIt2->second.begin(), relVoidsIt2->second.end()); |
| 83 | } |
| 84 | } |
| 85 | } |
| 86 | return resultVector; |
| 87 | } |
| 88 | |
| 89 | std::unordered_map<uint32_t, std::vector<uint32_t>> IfcCache::PopulateRelNestsMap() |
| 90 | { |
nothing calls this directly
no test coverage detected