GEOS  3.9.1dev
StringTokenizer.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2005-2006 Refractions Research Inc.
7  * Copyright (C) 2001-2002 Vivid Solutions Inc.
8  *
9  * This is free software; you can redistribute and/or modify it under
10  * the terms of the GNU Lesser General Public Licence as published
11  * by the Free Software Foundation.
12  * See the COPYING file for more information.
13  *
14  **********************************************************************
15  *
16  * Last port: ORIGINAL WORK
17  *
18  **********************************************************************/
19 
20 #ifndef GEOS_IO_STRINGTOKENIZER_H
21 #define GEOS_IO_STRINGTOKENIZER_H
22 
23 #include <geos/export.h>
24 
25 #include <string>
26 
27 #ifdef _MSC_VER
28 #pragma warning(push)
29 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
30 #endif
31 
32 namespace geos {
33 namespace io {
34 
36 public:
37  enum {
41  TT_WORD
42  };
43  //StringTokenizer();
44  explicit StringTokenizer(const std::string& txt);
46  int nextToken();
47  int peekNextToken();
48  double getNVal();
49  std::string getSVal();
50 private:
51  const std::string& str;
52  std::string stok;
53  double ntok;
54  std::string::const_iterator iter;
55 
56  // Declare type as noncopyable
57  StringTokenizer(const StringTokenizer& other) = delete;
58  StringTokenizer& operator=(const StringTokenizer& rhs) = delete;
59 };
60 
61 } // namespace io
62 } // namespace geos
63 
64 #ifdef _MSC_VER
65 #pragma warning(pop)
66 #endif
67 
68 #endif // #ifndef GEOS_IO_STRINGTOKENIZER_H
#define GEOS_DLL
Definition: export.h:28
const std::string & str
std::string::const_iterator iter
Basic namespace for all GEOS functionalities.