StringTokenizer.h

00001 /**********************************************************************
00002  *
00003  * GEOS - Geometry Engine Open Source
00004  * http://geos.osgeo.org
00005  *
00006  * Copyright (C) 2005-2006 Refractions Research Inc.
00007  * Copyright (C) 2001-2002 Vivid Solutions Inc.
00008  *
00009  * This is free software; you can redistribute and/or modify it under
00010  * the terms of the GNU Lesser General Public Licence as published
00011  * by the Free Software Foundation. 
00012  * See the COPYING file for more information.
00013  *
00014  **********************************************************************
00015  *
00016  * Last port: ORIGINAL WORK
00017  *
00018  **********************************************************************/
00019 
00020 #ifndef GEOS_IO_STRINGTOKENIZER_H
00021 #define GEOS_IO_STRINGTOKENIZER_H
00022 
00023 #include <geos/export.h>
00024 
00025 #include <string>
00026 
00027 #ifdef _MSC_VER
00028 #pragma warning(push)
00029 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00030 #endif
00031 
00032 namespace geos {
00033 namespace io {
00034 
00035 class GEOS_DLL StringTokenizer {
00036 public:
00037         enum {
00038                 TT_EOF,
00039                 TT_EOL,
00040                 TT_NUMBER,
00041                 TT_WORD
00042         };
00043         //StringTokenizer();
00044         StringTokenizer(const std::string& txt);
00045         ~StringTokenizer() {}
00046         int nextToken();
00047         int peekNextToken();
00048         double getNVal();
00049         std::string getSVal();
00050 private:
00051         const std::string &str;
00052         std::string stok;
00053         double ntok;
00054         std::string::const_iterator iter;
00055 
00056     // Declare type as noncopyable
00057     StringTokenizer(const StringTokenizer& other);
00058     StringTokenizer& operator=(const StringTokenizer& rhs);
00059 };
00060 
00061 } // namespace io
00062 } // namespace geos
00063 
00064 #ifdef _MSC_VER
00065 #pragma warning(pop)
00066 #endif
00067 
00068 #endif // #ifndef GEOS_IO_STRINGTOKENIZER_H

Generated on 23 Sep 2013 for GEOS by  doxygen 1.4.7