Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

StringTokenizer.h

00001 /**********************************************************************
00002  * $Id: StringTokenizer.h 2556 2009-06-06 22:22:28Z strk $
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 <geos/export.h>
00021 
00022 #include <string>
00023 
00024 namespace geos {
00025 namespace io {
00026 
00027 class GEOS_DLL StringTokenizer {
00028 public:
00029         enum {
00030                 TT_EOF,
00031                 TT_EOL,
00032                 TT_NUMBER,
00033                 TT_WORD
00034         };
00035         //StringTokenizer();
00036         StringTokenizer(const std::string& txt);
00037         ~StringTokenizer() {};
00038         int nextToken();
00039         int peekNextToken();
00040         double getNVal();
00041         std::string getSVal();
00042 private:
00043         const std::string &str;
00044         std::string stok;
00045         double ntok;
00046         std::string::const_iterator iter;
00047 };
00048 
00049 } // namespace io
00050 } // namespace geos
00051 
00052 #endif // #ifndef GEOS_IO_STRINGTOKENIZER_H
00053 
00054 /**********************************************************************
00055  * $Log$
00056  * Revision 1.1  2006/03/20 18:18:14  strk
00057  * io.h header split
00058  *
00059  **********************************************************************/

Generated on Thu Jun 11 06:17:02 2009 for GEOS by  doxygen 1.4.4