MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / semicolonCount

Method semicolonCount

src/ifcparse/IfcParse.cpp:1377–1399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1375}
1376
1377size_t IfcParse::InstanceStreamer::semicolonCount() const {
1378 auto local_stream = stream_->clone();
1379 auto local_lexer = IfcSpfLexer(&local_stream);
1380 Token t;
1381 size_t count = 0;
1382 try {
1383 t = local_lexer.Next();
1384 } catch (const std::out_of_range&) {
1385 return false;
1386 }
1387 while (t.type != Token_NONE) {
1388 if (TokenFunc::isOperator(t, ';')) {
1389 count++;
1390 }
1391 try {
1392 t = local_lexer.Next();
1393 } catch (const std::out_of_range&) {
1394 // This most likely happens when a page boundary is contained within a string
1395 break;
1396 }
1397 }
1398 return count;
1399}
1400
1401void IfcParse::InstanceStreamer::pushPage(const std::string& page)
1402{

Callers 1

feedMethod · 0.80

Calls 3

IfcSpfLexerClass · 0.85
cloneMethod · 0.45
NextMethod · 0.45

Tested by

no test coverage detected