implementation of getEnergy()
[cluster_expansion.git] / StringTokenizer.h
blob602f8643957c73ebdcd65f289f5653166ab545ec
1 /*
2 ***********************************************************************
3 * Class: StringTokenizer *
4 * By Arash Partow - 2000 *
5 * URL: http://www.partow.net/programming/stringtokenizer/index.html *
6 * *
7 * Copyright Notice: *
8 * Free use of this library is permitted under the guidelines and *
9 * in accordance with the most current version of the Common Public *
10 * License. *
11 * http://www.opensource.org/licenses/cpl.php *
12 * *
13 ***********************************************************************
18 #ifndef INCLUDE_STRINGTOKENIZER_H
19 #define INCLUDE_STRINGTOKENIZER_H
22 #include <stdio.h>
23 #include <stdlib.h>
24 #include <iostream>
25 #include <string>
28 class StringTokenizer
31 public:
33 StringTokenizer(const std::string& _str, const std::string& _delim);
34 ~StringTokenizer(){};
36 int countTokens();
37 bool hasMoreTokens();
38 std::string nextToken();
39 int nextIntToken();
40 double nextFloatToken();
41 std::string nextToken(const std::string& delim);
42 std::string remainingString();
43 std::string filterNextToken(const std::string& filterStr);
45 private:
47 std::string token_str;
48 std::string delim;
52 #endif