------------------------------------------------------------------------------
| 1611 | |
| 1612 | //------------------------------------------------------------------------------ |
| 1613 | void vtkTecplotReader::ReadFile(vtkMultiBlockDataSet* multZone) |
| 1614 | { |
| 1615 | if ((this->Internal->Completed == 1) || (this->FileName == nullptr) || |
| 1616 | (strcmp(this->FileName, "") == 0)) |
| 1617 | { |
| 1618 | return; |
| 1619 | } |
| 1620 | |
| 1621 | if (multZone == nullptr) |
| 1622 | { |
| 1623 | vtkErrorMacro("vtkMultiBlockDataSet multZone nullptr!"); |
| 1624 | return; |
| 1625 | } |
| 1626 | |
| 1627 | #define READ_UNTIL_LINE_END \ |
| 1628 | !this->Internal->NextCharEOF&& tok != "TITLE" && tok != "VARIABLES" && tok != "ZONE" && \ |
| 1629 | tok != "GEOMETRY" && tok != "TEXT" && tok != "DATASETAUXDATA" |
| 1630 | int zoneIndex = 0; |
| 1631 | bool firstToken = true; |
| 1632 | bool tokenReady = false; |
| 1633 | |
| 1634 | this->Init(); |
| 1635 | this->Internal->ASCIIStream.open(this->FileName); |
| 1636 | std::string tok = this->Internal->GetNextToken(); |
| 1637 | |
| 1638 | while (!this->Internal->NextCharEOF) |
| 1639 | { |
| 1640 | tokenReady = false; |
| 1641 | if (tok.empty()) |
| 1642 | { |
| 1643 | // whitespace: do nothing |
| 1644 | } |
| 1645 | else if (tok == "TITLE") |
| 1646 | { |
| 1647 | this->DataTitle = this->Internal->GetNextToken(); |
| 1648 | } |
| 1649 | else if (tok == "GEOMETRY") |
| 1650 | { |
| 1651 | // unsupported |
| 1652 | tok = this->Internal->GetNextToken(); |
| 1653 | while (READ_UNTIL_LINE_END) |
| 1654 | { |
| 1655 | // skipping token |
| 1656 | tok = this->Internal->GetNextToken(); |
| 1657 | } |
| 1658 | tokenReady = true; |
| 1659 | } |
| 1660 | else if (tok == "TEXT") |
| 1661 | { |
| 1662 | // unsupported |
| 1663 | tok = this->Internal->GetNextToken(); |
| 1664 | while (READ_UNTIL_LINE_END) |
| 1665 | { |
| 1666 | // Skipping token |
| 1667 | tok = this->Internal->GetNextToken(); |
| 1668 | } |
| 1669 | tokenReady = true; |
| 1670 | } |
no test coverage detected