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