42 #ifndef BPP_TEXT_STRINGTOKENIZER_H
43 #define BPP_TEXT_STRINGTOKENIZER_H
49 #include "../Exceptions.h"
77 StringTokenizer(
const std::string& s,
const std::string& delimiters =
" \t\n\f\r",
bool solid =
false,
bool allowEmptyTokens =
false);
Exception base class. Overload exception constructor (to control the exceptions mechanism)....
size_t numberOfRemainingTokens() const
Tell how many tokens are available.
size_t currentPosition_
the current position in the token list.
const std::string & nextToken()
Get the next available token. If no token is availbale, throw an Exception.
bool hasMoreToken() const
Tell if some tokens are still available.
std::string unparseRemainingTokens() const
virtual ~StringTokenizer()
std::deque< std::string > splits_
std::deque< std::string > tokens_
Where the tokens are stored.
void removeEmptyTokens()
remove all empty token from the current position.
const std::deque< std::string > & getTokens() const
Retrieve all tokens.
const std::string & getToken(size_t pos) const
Get a particular token.