Scanner.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #pragma once
  2. #include "ThirdPartyHeadersBegin.h"
  3. #include <string>
  4. #include <stack>
  5. #include "ThirdPartyHeadersEnd.h"
  6. #include "StandardIntegralTypes.h"
  7. #if defined MAKEARCHIVE
  8. #define common_strutil_API
  9. #else
  10. #include "common_strutil_Exports.h"
  11. #endif
  12. namespace tecplot
  13. {
  14. class common_strutil_API ___3441
  15. {
  16. public:
  17. ___3441();
  18. ___3441(___3441 const &___2888);
  19. ___3441(std::string const &source);
  20. ___3441(std::string const &source, char delimiter);
  21. ___3441(std::string const &source, std::string const &delimiters);
  22. virtual ~___3441();
  23. ___3441 &operator=(___3441 const &___2888);
  24. virtual void append(std::string const &source);
  25. virtual void reset();
  26. virtual void reset(std::string const &source);
  27. virtual void reset(std::string const &source, std::string const &delimiters);
  28. virtual std::string const &source() const;
  29. virtual std::string::size_type position() const;
  30. virtual void savePosition();
  31. virtual void forgetPosition();
  32. virtual void eraseToPosition();
  33. virtual void restorePosition();
  34. virtual bool hasNextToken() const;
  35. virtual bool hasNextToken(char customDelimiter) const;
  36. virtual bool hasNextToken(std::string const &customDelimiters) const;
  37. virtual bool hasNextInt64Token() const;
  38. virtual bool hasNextInt64Token(char customDelimiter) const;
  39. virtual bool hasNextInt64Token(std::string const &customDelimiters) const;
  40. virtual bool hasNextDoubleToken() const;
  41. virtual bool hasNextDoubleToken(char customDelimiter) const;
  42. virtual bool hasNextDoubleToken(std::string const &customDelimiters) const;
  43. virtual bool hasNextTokenBeginningWith(std::string const &pattern) const;
  44. virtual bool hasNextTokenBeginningWith(std::string const &pattern, char customDelimiter) const;
  45. virtual bool hasNextTokenBeginningWith(std::string const &pattern, std::string const &customDelimiters) const;
  46. virtual bool hasNextTokenEndingWith(std::string const &pattern) const;
  47. virtual bool hasNextTokenEndingWith(std::string const &pattern, char customDelimiter) const;
  48. virtual bool hasNextTokenEndingWith(std::string const &pattern, std::string const &customDelimiters) const;
  49. virtual bool hasNextTokenContaining(std::string const &pattern) const;
  50. virtual bool hasNextTokenContaining(std::string const &pattern, char customDelimiter) const;
  51. virtual bool hasNextTokenContaining(std::string const &pattern, std::string const &customDelimiters) const;
  52. virtual bool hasNextChar() const;
  53. virtual bool hasNextChar(char matchChar) const;
  54. virtual bool hasNext(std::string const &pattern) const;
  55. virtual bool hasNextInt64() const;
  56. virtual bool hasNextDouble() const;
  57. virtual bool hasNextLine() const;
  58. virtual std::string nextToken();
  59. virtual std::string nextToken(char customDelimiter);
  60. virtual std::string nextToken(std::string const &customDelimiters);
  61. virtual std::string peekNextToken() const;
  62. virtual std::string peekNextToken(char customDelimiter) const;
  63. virtual std::string peekNextToken(std::string const &customDelimiters) const;
  64. virtual int64_t nextInt64Token();
  65. virtual int64_t nextInt64Token(char customDelimiter);
  66. virtual int64_t nextInt64Token(std::string const &customDelimiters);
  67. virtual double nextDoubleToken();
  68. virtual double nextDoubleToken(char customDelimiter);
  69. virtual double nextDoubleToken(std::string const &customDelimiters);
  70. virtual bool skipTokens(size_t NumTokensToSkip);
  71. virtual void skipWhitespace();
  72. virtual void skipDelimiters();
  73. virtual void skipDelimiters(char customDelimiter);
  74. virtual void skipDelimiters(std::string const &customDelimiters);
  75. virtual char nextChar();
  76. virtual char peekNextChar() const;
  77. virtual std::string peekNext(std::string::size_type numChars) const;
  78. virtual std::string next(std::string::size_type numChars);
  79. virtual std::string remaining();
  80. virtual int64_t nextInt64();
  81. virtual double nextDouble();
  82. virtual std::string nextLine();
  83. virtual bool findInLine(std::string const &pattern);
  84. virtual bool find(std::string const &pattern);
  85. static std::string const noDelimiters;
  86. static std::string const whitespaceDelimiters;
  87. static std::string const newlineDelimiters;
  88. private:
  89. void ___1932(std::string const &source, std::string const &delimiters);
  90. std::string m_sourceStr;
  91. std::string::size_type m_sourcePos;
  92. std::string m_defaultDelimiters;
  93. std::stack<std::string::size_type> m_savedPositions;
  94. };
  95. }