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

Method GetWordTypeName

IO/XML/vtkXMLWriter.cxx:1470–1576  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1468
1469//------------------------------------------------------------------------------
1470const char* vtkXMLWriter::GetWordTypeName(int dataType)
1471{
1472 char isSigned = 0;
1473 int size = 0;
1474
1475 // These string values must match vtkXMLDataElement::GetWordTypeAttribute().
1476 switch (dataType)
1477 {
1478 case VTK_BIT:
1479 return "Bit";
1480 case VTK_STRING:
1481 return "String";
1482 case VTK_FLOAT:
1483 return "Float32";
1484 case VTK_DOUBLE:
1485 return "Float64";
1486 case VTK_ID_TYPE:
1487 {
1488 switch (this->IdType)
1489 {
1490 case vtkXMLWriter::Int32:
1491 return "Int32";
1492 case vtkXMLWriter::Int64:
1493 return "Int64";
1494 default:
1495 return nullptr;
1496 }
1497 }
1498#if VTK_TYPE_CHAR_IS_SIGNED
1499 case VTK_CHAR:
1500 isSigned = 1;
1501 size = sizeof(char);
1502 break;
1503#else
1504 case VTK_CHAR:
1505 isSigned = 0;
1506 size = sizeof(char);
1507 break;
1508#endif
1509 case VTK_INT:
1510 isSigned = 1;
1511 size = sizeof(int);
1512 break;
1513 case VTK_LONG:
1514 isSigned = 1;
1515 size = sizeof(long);
1516 break;
1517 case VTK_SHORT:
1518 isSigned = 1;
1519 size = sizeof(short);
1520 break;
1521 case VTK_SIGNED_CHAR:
1522 isSigned = 1;
1523 size = sizeof(signed char);
1524 break;
1525 case VTK_UNSIGNED_CHAR:
1526 isSigned = 0;
1527 size = sizeof(unsigned char);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected