ColPack
Utilities/StringTokenizer.h
Go to the documentation of this file.
00001 /************************************************************************************
00002     Copyright (C) 2005-2008 Assefaw H. Gebremedhin, Arijit Tarafdar, Duc Nguyen,
00003     Alex Pothen
00004 
00005     This file is part of ColPack.
00006 
00007     ColPack is free software: you can redistribute it and/or modify
00008     it under the terms of the GNU Lesser General Public License as published
00009     by the Free Software Foundation, either version 3 of the License, or
00010     (at your option) any later version.
00011 
00012     ColPack is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU Lesser General Public License for more details.
00016 
00017     You should have received a copy of the GNU Lesser General Public License
00018     along with ColPack.  If not, see <http://www.gnu.org/licenses/>.
00019 ************************************************************************************/
00020 
00021 #ifndef STRINGTOKENIZER_H
00022 #define STRINGTOKENIZER_H
00023 
00024 using namespace std;
00025 
00026 namespace ColPack
00027 {
00037         class StringTokenizer
00038         {
00039          private:
00040 
00041                 string DelimiterString;
00042                 string InputString;
00043                 string TokenString;
00044 
00045          public:
00046 
00047                 //Public Constructor 4151
00048                 StringTokenizer();                      
00049           
00050                 //Public Constructor 4152
00051                 StringTokenizer(char *);                
00052           
00053                 //Public Constructor 4153
00054                 StringTokenizer(char *, char *);        
00055           
00056                 //Public Constructor 4154
00057                 StringTokenizer(string, char *);        
00058           
00059                 //Public Constructor 4155
00060                 StringTokenizer(string, string);        
00061           
00062                 //Public Destructor 4156
00063                 ~StringTokenizer();             
00064 
00065                 //Public Function 4157
00066                 int CountTokens();                      
00067 
00068                 //Public Function 4158
00069                 int CountTokens(char *);                
00070 
00071                 //Public Function 4159
00072                 string GetDelimiterString() const;      
00073 
00074                 //Public Function 4160
00075                 string GetFirstToken();         
00076           
00077                 //Public Function 4161
00078                 string GetInputString() const;
00079           
00080                 //Public Function 4162
00081                 string GetLastToken();          
00082           
00083                 //Public Function 4163
00084                 string GetNextToken();          
00085           
00086                 //Public Function 4164
00087                 string GetNextToken(char *);            
00088           
00089                 //Public Function 4165
00090                 string GetToken(int);                   
00091 
00092                 //Public Function 4166
00093                 int HasMoreTokens();                    
00094           
00095                 //Public Function 4167
00096                 int HasMoreTokens(char *);              
00097           
00098                 //Public Function 4168
00099                 int SetInputString(char *);             
00100           
00101                 //Public Function 4169
00102                 int SetDelimiterString(char *);
00103 
00104         };
00105 }
00106 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines