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