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 #ifdef _MSC_VER
00029 #pragma warning(push)
00030 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00031 #endif
00032
00033 namespace geos {
00034 namespace io {
00035
00036 class GEOS_DLL StringTokenizer {
00037 public:
00038 enum {
00039 TT_EOF,
00040 TT_EOL,
00041 TT_NUMBER,
00042 TT_WORD
00043 };
00044
00045 StringTokenizer(const std::string& txt);
00046 ~StringTokenizer() {};
00047 int nextToken();
00048 int peekNextToken();
00049 double getNVal();
00050 std::string getSVal();
00051 private:
00052 const std::string &str;
00053 std::string stok;
00054 double ntok;
00055 std::string::const_iterator iter;
00056
00057
00058 StringTokenizer(const StringTokenizer& other);
00059 StringTokenizer& operator=(const StringTokenizer& rhs);
00060 };
00061
00062 }
00063 }
00064
00065 #ifdef _MSC_VER
00066 #pragma warning(pop)
00067 #endif
00068
00069 #endif // #ifndef GEOS_IO_STRINGTOKENIZER_H
00070
00071
00072
00073
00074
00075
00076