GEOS 3.14.0dev
StringTokenizer.h
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#pragma once
21
22#include <geos/export.h>
23
24#include <string>
25
26#ifdef _MSC_VER
27#pragma warning(push)
28#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
29#endif
30
31namespace geos {
32namespace io {
33
34class GEOS_DLL StringTokenizer {
35public:
36 enum {
37 TT_EOF,
38 TT_EOL,
39 TT_NUMBER,
40 TT_WORD
41 };
42 //StringTokenizer();
43 explicit StringTokenizer(const std::string& txt);
44 ~StringTokenizer() {}
45 int nextToken();
46 int peekNextToken();
47 double getNVal() const;
48 std::string getSVal() const;
49private:
50 const std::string& str;
51 std::string stok;
52 double ntok;
53 std::string::const_iterator iter;
54
55 // Declare type as noncopyable
56 StringTokenizer(const StringTokenizer& other) = delete;
57 StringTokenizer& operator=(const StringTokenizer& rhs) = delete;
58};
59
60} // namespace io
61} // namespace geos
62
63#ifdef _MSC_VER
64#pragma warning(pop)
65#endif
66
Basic namespace for all GEOS functionalities.
Definition geos.h:39