00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef INCLUDE_STRINGTOKENIZER_H
00019 #define INCLUDE_STRINGTOKENIZER_H
00020
00021
00022 #include <stdio.h>
00023 #include <stdlib.h>
00024 #include <iostream>
00025 #include <string>
00026
00027
00028 class StringTokenizer
00029 {
00030
00031 public:
00032
00033 StringTokenizer(const std::string& _str, const std::string& _delim);
00034 ~StringTokenizer(){};
00035
00036 int countTokens();
00037 bool hasMoreTokens();
00038 std::string nextToken();
00039 int nextIntToken();
00040 double nextFloatToken();
00041 std::string nextToken(const std::string& delim);
00042 std::string remainingString();
00043 std::string filterNextToken(const std::string& filterStr);
00044
00045 private:
00046
00047 std::string token_str;
00048 std::string delim;
00049
00050 };
00051
00052 #endif