base/zz_string_tokenizer.h

Go to the documentation of this file.
00001 /* libzz
00002  *
00003  * This program is distributed under the GNU General Public License, version 2.
00004  * A copy of this license is included with this source.
00005  *
00006  * Copyright 2000-2006, Toni Thomsson <toni@tonjac.org> 
00007 */
00008 
00009 #ifndef zz_string_tokenizer_h
00010 #define zz_string_tokenizer_h
00011 
00012 #include <zz_string.h>
00013 #include <string.h>
00014 #include <zz_export.h>
00015 
00016 /*
00017         Description:
00018         Sträng tolk
00019 
00020         Author: 
00021         Toni Thomsson, toni@tonjac.org
00022 
00023         Library:
00024         libzz.a (HPUX) libzz.lib (win32)
00025 
00026         Platform:
00027         HPUX, win32
00028 */
00029 class ZZ_API CzzStringTokenizer
00030 {
00031 public:
00032 
00033         // Description: Skapar objekt
00034         CzzStringTokenizer( const CzzString& str,       // IN, sträng
00035                                                 const CzzString& sep    // IN, separator tecken
00036                                                 );
00037 
00038         // Description: Destruktor
00039         virtual ~CzzStringTokenizer();
00040 
00041         // Description: Kontrollerar om det finns fler tokens
00042         bool hasMoreTokens( void );
00043 
00044         // Description: Hämtar nästa token
00045         CzzString nextToken( void );
00046 
00047 protected:
00048 
00049         CzzString m_Separators;
00050         CzzString m_String;
00051         CzzString m_NextToken;
00052 
00053 private:        
00054         char* m_Token;
00055         bool m_End;
00056 };
00057 
00058 #endif // zz_string_tokenizer_h

Generated on Thu Sep 21 21:45:41 2006 for tonjac.org MINI/C++ library by  doxygen 1.4.6-NO