ParseBT.hGo to the documentation of this file.00001 00006 /* 00007 Copyright (C) 2005 Anders Hedstrom 00008 00009 This program is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License 00011 as published by the Free Software Foundation; either version 2 00012 of the License, or (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00022 */ 00023 #ifndef _PARSE_H 00024 #define _PARSE_H 00025 00032 /* 00033 Copyright (C) 1999 Anders Hedstrom 00034 00035 This program is free software; you can redistribute it and/or 00036 modify it under the terms of the GNU General Public License 00037 as published by the Free Software Foundation; either version 2 00038 of the License, or (at your option) any later version. 00039 00040 This program is distributed in the hope that it will be useful, 00041 but WITHOUT ANY WARRANTY; without even the implied warranty of 00042 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00043 GNU General Public License for more details. 00044 00045 You should have received a copy of the GNU General Public License 00046 along with this program; if not, write to the Free Software 00047 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00048 */ 00049 00050 /***************************************************/ 00051 /* interface of class ParseBT */ 00052 00054 00055 class ParseBT 00056 { 00057 public: 00058 ParseBT(); 00059 ParseBT(char *); 00060 ParseBT(char *,char *); 00061 ParseBT(char *,char *,short); 00062 ~ParseBT(); 00063 short issplit(char); 00064 void getsplit(void); 00065 void getsplit(char *); 00066 void getword(void); 00067 void getword(char *); 00068 void getword(char *,int); 00069 void getword(char *,char *,int); 00070 void getrest(char *); 00071 long getvalue(void); 00072 void setbreak(char); 00073 int getwordlen(void); 00074 int getrestlen(void); 00075 void enablebreak(char c) { 00076 pa_enable = c; 00077 } 00078 void disablebreak(char c) { 00079 pa_disable = c; 00080 } 00081 void getline(void); 00082 void getline(char *); 00083 void getline(char *,int); 00084 int getptr(void) { return pa_the_ptr; } 00085 void EnableQuote(bool b) { pa_quote = b; } 00086 00087 private: 00088 char *pa_the_str; 00089 char *pa_splits; 00090 char *pa_ord; 00091 int pa_the_ptr; 00092 char pa_breakchar; 00093 char pa_enable; 00094 char pa_disable; 00095 short pa_nospace; 00096 bool pa_quote; 00097 }; 00098 00099 #endif // _PARSE_H |