AsciiOutputInfo.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. #pragma once
  2. #include "ThirdPartyHeadersBegin.h"
  3. #include <utility>
  4. #include "ThirdPartyHeadersEnd.h"
  5. #include "MASTER.h"
  6. #include "GLOBAL.h"
  7. #include "CodeContract.h"
  8. #include "fileStuff.h"
  9. #include "StandardIntegralTypes.h"
  10. namespace tecplot
  11. {
  12. namespace ___3933
  13. {
  14. typedef std::pair<float, float> StdPairFloat;
  15. typedef std::pair<double, double> StdPairDouble;
  16. typedef std::pair<int32_t, int32_t> StdPairInt32;
  17. typedef std::pair<int16_t, int16_t> StdPairInt16;
  18. typedef std::pair<uint8_t, uint8_t> StdPairUInt8;
  19. template <typename T, bool ___2025>
  20. struct ___199;
  21. template <>
  22. struct ___199<char, false>
  23. {
  24. static int32_t const size = ___194;
  25. static char const *___1474;
  26. };
  27. template <>
  28. struct ___199<uint8_t, false>
  29. {
  30. static int32_t const size = ___211;
  31. static char const *___1474;
  32. };
  33. template <>
  34. struct ___199<int16_t, false>
  35. {
  36. static int32_t const size = ASCII_INT16_LEN;
  37. static char const *___1474;
  38. };
  39. template <>
  40. struct ___199<uint16_t, false>
  41. {
  42. static int32_t const size = ___208;
  43. static char const *___1474;
  44. };
  45. template <>
  46. struct ___199<int32_t, false>
  47. {
  48. static int32_t const size = ASCII_INT32_LEN;
  49. static char const *___1474;
  50. };
  51. template <>
  52. struct ___199<uint32_t, false>
  53. {
  54. static int32_t const size = ___209;
  55. static char const *___1474;
  56. };
  57. template <>
  58. struct ___199<int64_t, false>
  59. {
  60. static int32_t const size = ASCII_INT64_LEN;
  61. static char const *___1474;
  62. };
  63. template <>
  64. struct ___199<uint64_t, false>
  65. {
  66. static int32_t const size = ___210;
  67. static char const *___1474;
  68. };
  69. template <>
  70. struct ___199<float, false>
  71. {
  72. static int32_t const size = ___196;
  73. static char const *___1474;
  74. };
  75. template <>
  76. struct ___199<double, false>
  77. {
  78. static int32_t const size = ___195;
  79. static char const *___1474;
  80. };
  81. template <>
  82. struct ___199<StdPairUInt8, false>
  83. {
  84. static int32_t const size = ASCII_UINT8_MINMAX_LEN;
  85. };
  86. template <>
  87. struct ___199<StdPairInt16, false>
  88. {
  89. static int32_t const size = ASCII_INT16_MINMAX_LEN;
  90. };
  91. template <>
  92. struct ___199<StdPairInt32, false>
  93. {
  94. static int32_t const size = ASCII_INT32_MINMAX_LEN;
  95. };
  96. template <>
  97. struct ___199<StdPairFloat, false>
  98. {
  99. static int32_t const size = ASCII_FLOAT_MINMAX_LEN;
  100. };
  101. template <>
  102. struct ___199<StdPairDouble, false>
  103. {
  104. static int32_t const size = ASCII_DOUBLE_MINMAX_LEN;
  105. };
  106. template <>
  107. struct ___199<uint8_t, true>
  108. {
  109. static int32_t const size = ASCII_HEXUINT8_LEN;
  110. static char const *___1474;
  111. };
  112. template <>
  113. struct ___199<uint16_t, true>
  114. {
  115. static int32_t const size = ASCII_HEXUINT16_LEN;
  116. static char const *___1474;
  117. };
  118. template <>
  119. struct ___199<uint64_t, true>
  120. {
  121. static int32_t const size = ___197;
  122. static char const *___1474;
  123. };
  124. template <typename T, bool ___2025, int base>
  125. ___372 encodeAsciiValue(char *str, int ___418, T const &___4298)
  126. {
  127. REQUIRE(VALID_REF(str));
  128. REQUIRE(___418 > 0);
  129. int nChars = 0;
  130. if (___4298 == ___4298)
  131. nChars = snprintf(str, ___418, ___199<T, ___2025>::___1474, -___199<T, ___2025>::size, ___4298 + base);
  132. else
  133. nChars = snprintf(str, ___418, ___199<T, ___2025>::___1474, -___199<T, ___2025>::size, (T)0);
  134. ___372 ___2039 = (nChars > 0 && nChars < ___418);
  135. ENSURE(VALID_BOOLEAN(___2039));
  136. return ___2039;
  137. }
  138. }
  139. }