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

Method ReadCurveIndices

src/cpp/web-ifc/geometry/IfcGeometryLoader.cpp:4268–4309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4266 }
4267
4268 std::vector<IfcSegmentIndexSelect> IfcGeometryLoader::ReadCurveIndices() const
4269 {
4270 std::vector<IfcSegmentIndexSelect> result;
4271
4272 parsing::IfcTokenType t = _loader.GetTokenType();
4273 // If you receive a reference then go to the reference
4274 if (t == parsing::IfcTokenType::REF)
4275 {
4276 _loader.StepBack();
4277 _loader.MoveToArgumentOffset(_loader.GetRefArgument(), 0);
4278 }
4279
4280 _loader.StepBack();
4281 while (_loader.GetTokenType() != parsing::IfcTokenType::SET_END)
4282 {
4283 _loader.StepBack();
4284 if (_loader.GetTokenType() == parsing::IfcTokenType::LABEL)
4285 {
4286 IfcSegmentIndexSelect segment;
4287 _loader.StepBack();
4288 segment.type = _loader.GetStringArgument();
4289 while (_loader.GetTokenType() != parsing::IfcTokenType::SET_END)
4290 {
4291 _loader.StepBack();
4292 while (_loader.GetTokenType() != parsing::IfcTokenType::SET_END)
4293 {
4294 _loader.StepBack();
4295 t = _loader.GetTokenType();
4296 // If you receive a real then add the real to the list
4297 if (t == parsing::IfcTokenType::INTEGER)
4298 {
4299 _loader.StepBack();
4300 segment.indexs.push_back(static_cast<uint32_t>(_loader.GetIntArgument()));
4301 }
4302 }
4303 }
4304 result.push_back(segment);
4305 }
4306 }
4307
4308 return result;
4309 }
4310
4311}

Callers

nothing calls this directly

Calls 6

GetTokenTypeMethod · 0.80
StepBackMethod · 0.80
MoveToArgumentOffsetMethod · 0.80
GetRefArgumentMethod · 0.80
GetStringArgumentMethod · 0.80
GetIntArgumentMethod · 0.80

Tested by

no test coverage detected