Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

stringtokenizer.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           stringtokenizer.h  -  description
00003                              -------------------
00004     begin                : Sun Jan 28 2001
00005     copyright            : (C) 2001 by Martin Bickel
00006     email                : bickel@asc-hq.org
00007  ***************************************************************************/
00008 
00013 /***************************************************************************
00014  *                                                                         *
00015  *   This program is free software; you can redistribute it and/or modify  *
00016  *   it under the terms of the GNU General Public License as published by  *
00017  *   the Free Software Foundation; either version 2 of the License, or     *
00018  *   (at your option) any later version.                                   *
00019  *                                                                         *
00020  ***************************************************************************/
00021 
00022 
00023 #ifndef stringtokenizerH
00024  #define stringtokenizerH
00025 
00026  #include "ascstring.h"
00027 
00029  class StringTokenizer {
00030        const ASCString& str;
00031        int i;
00032        bool includeOperators;
00033        ASCString delimitter;
00034     private:
00035        int CharSpace ( char c );
00036     public:
00037        StringTokenizer ( const ASCString& _str, bool includeOperators_ = false );
00038        StringTokenizer ( const ASCString& _str, const ASCString& delimitter_ );
00039        StringTokenizer ( const ASCString& _str, const char* delimitter_ );
00040        ASCString getNextToken ( );
00041        ASCString getRemaining ( );
00042        void skipTill(char endchar );
00043  };
00044 
00045   class StringSplit {
00046        const ASCString& str;
00047        int i;
00048        ASCString delimitter;
00049        bool isDelimitter ( char c );
00050      public:
00051        StringSplit ( const ASCString& _str, const ASCString& delimitter_ );
00052        ASCString getNextToken ( );
00053   };
00054 
00055 
00056 #endif

Generated on Tue Jun 24 01:27:52 2008 for Advanced Strategic Command by  doxygen 1.4.2