MCPcopy Create free account
hub / github.com/Kitware/VTK / GetDataArraysList

Method GetDataArraysList

IO/Geometry/vtkTecplotReader.cxx:1432–1610  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1430
1431//------------------------------------------------------------------------------
1432void vtkTecplotReader::GetDataArraysList()
1433{
1434 if ((this->Internal->Completed == 1) || (this->DataArraySelection->GetNumberOfArrays() > 0) ||
1435 (this->FileName == nullptr) || (strcmp(this->FileName, "") == 0))
1436 {
1437 return;
1438 }
1439
1440#define READ_UNTIL_TITLE_OR_VARIABLES \
1441 !this->Internal->NextCharEOF&& theTpToken != "TITLE" && theTpToken != "VARIABLES"
1442 int i;
1443 int tpTokenLen = 0;
1444 int guessedXid = -1;
1445 int guessedYid = -1;
1446 int guessedZid = -1;
1447 bool tokenReady = false;
1448 std::string noSpaceTok;
1449
1450 this->Variables.clear();
1451 this->NumberOfVariables = 0;
1452
1453 this->Internal->Init();
1454 this->Internal->ASCIIStream.open(this->FileName);
1455 std::string theTpToken = this->Internal->GetNextToken();
1456
1457 while (!this->Internal->NextCharEOF)
1458 {
1459 tokenReady = false;
1460
1461 if (theTpToken.empty())
1462 {
1463 // whitespace: do nothing
1464 }
1465 else if (theTpToken == "TITLE")
1466 {
1467 this->Internal->GetNextToken();
1468 }
1469 else if (theTpToken == "VARIABLES")
1470 {
1471 theTpToken = this->Internal->GetNextToken();
1472
1473 while (this->Internal->TokenIsString)
1474 {
1475 tpTokenLen = int(theTpToken.length());
1476 for (i = 0; i < tpTokenLen; i++)
1477 {
1478 if (theTpToken[i] == '(')
1479 {
1480 theTpToken[i] = '[';
1481 }
1482 else if (theTpToken[i] == ')')
1483 {
1484 theTpToken[i] = ']';
1485 }
1486 else if (theTpToken[i] == '/')
1487 {
1488 theTpToken[i] = '_';
1489 }

Callers 1

RequestInformationMethod · 0.95

Calls 15

GetDataAttributeNameMethod · 0.95
SimplifyWhitespaceFunction · 0.85
GetCoordFunction · 0.85
GuessCoordFunction · 0.85
GetNextTokenMethod · 0.80
rewindMethod · 0.80
EnableArrayMethod · 0.80
GetNumberOfArraysMethod · 0.45
clearMethod · 0.45
InitMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected