GEOS 3.3.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

StringTokenizer.h
1 /**********************************************************************
2 * $Id: StringTokenizer.h 3255 2011-03-01 17:56:10Z mloskot $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2005-2006 Refractions Research Inc.
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
9 *
10 * This is free software; you can redistribute and/or modify it under
11 * the terms of the GNU Lesser General Public Licence as published
12 * by the Free Software Foundation.
13 * See the COPYING file for more information.
14 *
15 **********************************************************************
16 *
17 * Last port: ORIGINAL WORK
18 *
19 **********************************************************************/
20
21 #ifndef GEOS_IO_STRINGTOKENIZER_H
22 #define GEOS_IO_STRINGTOKENIZER_H
23
24 #include <geos/export.h>
25
26 #include <string>
27
28 #ifdef _MSC_VER
29 #pragma warning(push)
30 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
31 #endif
32
33 namespace geos {
34 namespace io {
35
36 class GEOS_DLL StringTokenizer {
37 public:
38 enum {
39 TT_EOF,
40 TT_EOL,
41 TT_NUMBER,
42 TT_WORD
43 };
44 //StringTokenizer();
45 StringTokenizer(const std::string& txt);
46 ~StringTokenizer() {};
47 int nextToken();
48 int peekNextToken();
49 double getNVal();
50 std::string getSVal();
51 private:
52 const std::string &str;
53 std::string stok;
54 double ntok;
55 std::string::const_iterator iter;
56
57 // Declare type as noncopyable
58 StringTokenizer(const StringTokenizer& other);
59 StringTokenizer& operator=(const StringTokenizer& rhs);
60 };
61
62 } // namespace io
63 } // namespace geos
64
65 #ifdef _MSC_VER
66 #pragma warning(pop)
67 #endif
68
69 #endif // #ifndef GEOS_IO_STRINGTOKENIZER_H
70
71 /**********************************************************************
72 * $Log$
73 * Revision 1.1 2006/03/20 18:18:14 strk
74 * io.h header split
75 *
76 **********************************************************************/