StringTokenizer.h

00001 /**********************************************************************
00002  * $Id: StringTokenizer.h 1820 2006-09-06 16:54:23Z mloskot $
00003  *
00004  * GEOS - Geometry Engine Open Source
00005  * http://geos.refractions.net
00006  *
00007  * Copyright (C) 2005-2006 Refractions Research Inc.
00008  * Copyright (C) 2001-2002 Vivid Solutions Inc.
00009  *
00010  * This is free software; you can redistribute and/or modify it under
00011  * the terms of the GNU Lesser General Public Licence as published
00012  * by the Free Software Foundation. 
00013  * See the COPYING file for more information.
00014  *
00015  **********************************************************************/
00016 
00017 #ifndef GEOS_IO_STRINGTOKENIZER_H
00018 #define GEOS_IO_STRINGTOKENIZER_H
00019 
00020 #include <string>
00021 
00022 namespace geos {
00023 namespace io {
00024 
00025 class StringTokenizer {
00026 public:
00027         enum {
00028                 TT_EOF,
00029                 TT_EOL,
00030                 TT_NUMBER,
00031                 TT_WORD
00032         };
00033         //StringTokenizer();
00034         StringTokenizer(const std::string& txt);
00035         ~StringTokenizer() {};
00036         int nextToken();
00037         int peekNextToken();
00038         double getNVal();
00039         std::string getSVal();
00040 private:
00041         const std::string &str;
00042         std::string stok;
00043         double ntok;
00044         std::string::const_iterator iter;
00045 };
00046 
00047 } // namespace io
00048 } // namespace geos
00049 
00050 #endif // #ifndef GEOS_IO_STRINGTOKENIZER_H
00051 
00052 /**********************************************************************
00053  * $Log$
00054  * Revision 1.1  2006/03/20 18:18:14  strk
00055  * io.h header split
00056  *
00057  **********************************************************************/

Generated on Fri Mar 27 04:53:02 2009 for GEOS by  doxygen 1.5.4