--- trunk/src/utils/StringTokenizer.hpp 2009/11/25 20:02:06 1390 +++ trunk/src/utils/StringTokenizer.hpp 2015/03/07 23:52:07 2073 @@ -35,15 +35,15 @@ * * [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). * [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). - * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). - * [4] Vardeman & Gezelter, in progress (2009). + * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). + * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). + * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). */ /** * @file StringTokenizer.hpp * @author tlin * @date 09/20/2004 - * @time 11:30am * @version 1.0 */ @@ -57,7 +57,7 @@ namespace OpenMD { namespace OpenMD { /** - * @class StringTokenizer.hpp "util/StringTokenizer.hpp" + * @class StringTokenizer * @brief The string tokenizer class allows an application to break a string into tokens * The set of delimiters (the characters that separate tokens) may be specified either * at creation time or on a per-token basis. @@ -89,7 +89,8 @@ namespace OpenMD { * @note this is still a little bit java like implementation. Pure c++ one should use TokenIterator. * Boost's tokenizer class is one of them */ - StringTokenizer(std::string::const_iterator& first, std::string::const_iterator& last, + StringTokenizer(std::string::const_iterator& first, + std::string::const_iterator& last, const std::string & delim = " ;\t\n\r"); /** @@ -125,6 +126,12 @@ namespace OpenMD { */ std::string nextToken(); + /** + * Skips the next token from this string tokenizer. + * @exception NoSuchElementException if there are no more tokens in this tokenizer's string + */ + void skipToken(); + //actually, nextToken Can be template function //template //ReturnType nextToken(); @@ -180,6 +187,11 @@ namespace OpenMD { * @return all of the tokens */ std::vector getAllTokens(); + /** + * Returns the remaining unparsed string + * @return the remaining unparsed string + */ + std::string getRemainingString(); private: /**