00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef GEOS_IO_STRINGTOKENIZER_H
00022 #define GEOS_IO_STRINGTOKENIZER_H
00023
00024 #include <geos/export.h>
00025
00026 #include <string>
00027
00028 namespace geos {
00029 namespace io {
00030
00031 class GEOS_DLL StringTokenizer {
00032 public:
00033 enum {
00034 TT_EOF,
00035 TT_EOL,
00036 TT_NUMBER,
00037 TT_WORD
00038 };
00039
00040 StringTokenizer(const std::string& txt);
00041 ~StringTokenizer() {};
00042 int nextToken();
00043 int peekNextToken();
00044 double getNVal();
00045 std::string getSVal();
00046 private:
00047 const std::string &str;
00048 std::string stok;
00049 double ntok;
00050 std::string::const_iterator iter;
00051
00052
00053 StringTokenizer(const StringTokenizer& other);
00054 StringTokenizer& operator=(const StringTokenizer& rhs);
00055 };
00056
00057 }
00058 }
00059
00060 #endif // #ifndef GEOS_IO_STRINGTOKENIZER_H
00061
00062
00063
00064
00065
00066
00067