GEOS 3.9.1
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#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
32namespace geos {
33namespace io {
34
35class GEOS_DLL StringTokenizer {
36public:
37 enum {
38 TT_EOF,
39 TT_EOL,
40 TT_NUMBER,
41 TT_WORD
42 };
43 //StringTokenizer();
44 explicit StringTokenizer(const std::string& txt);
45 ~StringTokenizer() {}
46 int nextToken();
47 int peekNextToken();
48 double getNVal();
49 std::string getSVal();
50private:
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
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26