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

- File List

# StringTokenizer.h

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