ioDescription.h 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #pragma once
  2. #include "ThirdPartyHeadersBegin.h"
  3. #include <string>
  4. #include "ThirdPartyHeadersEnd.h"
  5. #include "SzlFileLoader.h"
  6. #include "stringformat.h"
  7. namespace tecplot
  8. {
  9. namespace ___3933
  10. {
  11. class IODescription
  12. {
  13. public:
  14. typedef uint32_t SegmentIndex_t;
  15. static ___4352 const NO_VAR = BAD_VAR_INDEX;
  16. static ___4636 const NO_ZONE = BAD_ZONE_INDEX;
  17. static ___2090::___2980 const NO_PARTITION = ___2090::INVALID_PARTITION;
  18. static SegmentIndex_t const NO_SEGMENT = SegmentIndex_t(-1);
  19. private:
  20. char const *___2495;
  21. ___4352 m_var;
  22. ___4636 ___2677;
  23. ___2090::___2980 m_partition;
  24. SegmentIndex_t m_segment;
  25. char const *m_suffix;
  26. public:
  27. explicit IODescription(char const *___2685 = NULL, ___4352 ___4336 = NO_VAR, ___4636 zone = NO_ZONE, ___2090::___2980 ___2977 = NO_PARTITION, SegmentIndex_t segment = NO_SEGMENT, char const *suffix = NULL) : ___2495(___2685), m_var(___4336), ___2677(zone), m_partition(___2977), m_segment(segment), m_suffix(suffix) {}
  28. char const *___2685() const { return ___2495; }
  29. ___4352 ___4336() const { return m_var; }
  30. ___4636 zone() const { return ___2677; }
  31. ___2090::___2980 ___2977() const { return m_partition; }
  32. SegmentIndex_t segment() const { return m_segment; }
  33. char const *suffix() const { return m_suffix; }
  34. ___372 ___2067() const { return ___4226; }
  35. ___372 isEmpty() const { return ___2495 == NULL; }
  36. void getFormattedDescription(char *formattedDescription, size_t formattedDescriptionSize) const
  37. {
  38. ___372 isAsciiOnly = ___1305;
  39. size_t ___2865;
  40. if (___2495 != NULL)
  41. {
  42. ___2865 = snprintf(formattedDescription, formattedDescriptionSize, "%s", ___2495);
  43. if (___2865 > 0 && formattedDescription[___2865 - 1] == '*')
  44. {
  45. ___2865--;
  46. formattedDescription[___2865] = '\0';
  47. isAsciiOnly = ___4226;
  48. }
  49. }
  50. else
  51. ___2865 = snprintf(formattedDescription, formattedDescriptionSize, "unspecified");
  52. if (m_var != NO_VAR && ___2865 < formattedDescriptionSize)
  53. ___2865 += snprintf(formattedDescription + ___2865, formattedDescriptionSize - ___2865, "%sVar%" PRIu64, ___2495 != NULL ? "For" : "", uint64_t(m_var + 1));
  54. if (___2677 != NO_ZONE && ___2865 < formattedDescriptionSize)
  55. ___2865 += snprintf(formattedDescription + ___2865, formattedDescriptionSize - ___2865, "%sZone%" PRIu64, ___2495 != NULL && m_var == NO_VAR ? "For" : "", uint64_t(___2677 + 1));
  56. if (m_partition != NO_PARTITION && ___2865 < formattedDescriptionSize)
  57. ___2865 += snprintf(formattedDescription + ___2865, formattedDescriptionSize - ___2865, "%sPartition%" PRIu64, ___2495 != NULL && m_var == NO_VAR && ___2677 == NO_ZONE ? "For" : "", uint64_t(m_partition + 1));
  58. if (m_segment != NO_SEGMENT && ___2865 < formattedDescriptionSize)
  59. ___2865 += snprintf(formattedDescription + ___2865, formattedDescriptionSize - ___2865, "%sSegment%" PRIu64, ___2495 != NULL && m_var == NO_VAR && ___2677 == NO_ZONE && m_partition == NO_PARTITION ? "For" : "", uint64_t(m_segment + 1));
  60. if (m_suffix != NULL && ___2865 < formattedDescriptionSize)
  61. ___2865 += snprintf(formattedDescription + ___2865, formattedDescriptionSize - ___2865, "%s", m_suffix);
  62. if (isAsciiOnly && ___2865 < formattedDescriptionSize)
  63. {
  64. formattedDescription[___2865] = '*';
  65. if (___2865 < formattedDescriptionSize)
  66. ___2865++;
  67. formattedDescription[___2865] = '\0';
  68. }
  69. }
  70. };
  71. }
  72. }