MCPcopy Create free account
hub / github.com/ThatOpen/engine_web-ifc / PopulateRelMaterialsMap

Method PopulateRelMaterialsMap

src/cpp/web-ifc/cache/IfcCache.cpp:136–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134 }
135
136 std::unordered_map<uint32_t, std::vector<std::pair<uint32_t, uint32_t>>> IfcCache::PopulateRelMaterialsMap()
137 {
138 std::unordered_map<uint32_t, std::vector<std::pair<uint32_t, uint32_t>>> resultVector;
139 auto styledItems = _loader.GetExpressIDsWithType(schema::IFCRELASSOCIATESMATERIAL);
140
141 for (uint32_t styledItemID : styledItems)
142 {
143 _loader.MoveToArgumentOffset(styledItemID, 5);
144
145 uint32_t materialSelect = _loader.GetRefArgument();
146
147 _loader.MoveToArgumentOffset(styledItemID, 4);
148
149 auto RelatedObjects = _loader.GetSetArgument();
150
151 for (auto &ifcRoot : RelatedObjects)
152 {
153 uint32_t ifcRootID = _loader.GetRefArgument(ifcRoot);
154 resultVector[ifcRootID].emplace_back(styledItemID, materialSelect);
155 }
156 }
157 return resultVector;
158 }
159
160 std::unordered_map<uint32_t, std::vector<std::pair<uint32_t, uint32_t>>> IfcCache::PopulateMaterialDefinitionsMap()
161 {

Callers

nothing calls this directly

Calls 4

GetExpressIDsWithTypeMethod · 0.80
MoveToArgumentOffsetMethod · 0.80
GetRefArgumentMethod · 0.80
GetSetArgumentMethod · 0.80

Tested by

no test coverage detected