ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/utils/StringTokenizer.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-4/src/utils/StringTokenizer.hpp (file contents):
Revision 1736 by tim, Fri Nov 12 22:28:35 2004 UTC vs.
Revision 1746 by tim, Wed Nov 17 06:37:56 2004 UTC

# Line 43 | Line 43 | namespace oopse {
43  
44   /**
45   * @class StringTokenizer.hpp "util/StringTokenizer.hpp"
46 *
46   * @brief The string tokenizer class allows an application to break a string into tokens
48 *
47   * The set of delimiters (the characters that separate tokens) may be specified either
48   * at creation time or on a per-token basis.
49   * An instance of StringTokenizer behaves in one of two ways, depending on whether it was
# Line 61 | Line 59 | class StringTokenizer {
59           * separators between tokens.
60           * @param str a string to be parsed.
61           * @param delim the delimiters, default value is " \t\n\r".
62 +         * @note this is still a little bit java like implementation. Pure c++ one should use TokenIterator.
63 +         * Boost's tokenizer class is one of them
64           */
65          StringTokenizer(const std::string & str,
66                          const std::string & delim = defaultDelim);
67  
68 +        /**
69 +         * Constructs a string tokenizer for an iterator range [first, last). The characters in the delim argument
70 +         * are the delimiters for separating tokens. characters are skipped and only serve as
71 +         * separators between tokens.
72 +         * @param first begin iterator
73 +         * @param last end iterator
74 +         * @param delim the delimiters, default value is " \t\n\r".
75 +         * @note this is still a little bit java like implementation. Pure c++ one should use TokenIterator.
76 +         * Boost's tokenizer class is one of them
77 +         */
78          StringTokenizer(std::string::const_iterator& first, std::string::const_iterator& last,
79                          const std::string & delim = defaultDelim);
80  
# Line 114 | Line 124 | class StringTokenizer {
124          float nextTokenAsFloat();
125  
126          /**
127 +         * Returns the next token from this string tokenizer as a double.
128 +         * @return the next token from this string tokenizer as a double.
129 +         */
130 +        double nextTokenAsDouble();
131 +
132 +        /**
133           * Returns the next token without advancing the position of the StringTokenizer.
134           * @return the next token
135           */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines