00001 /* 00002 * =========================== 00003 * VDK Visual Development Kit 00004 * xdb subsystem 00005 * =========================== 00006 * 00007 * Copyright (C) 1998,2004, Mario Motta 00008 * Developed by Mario Motta <mmotta@guest.net> 00009 * 00010 * This library is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Library General Public 00012 * License as published by the Free Software Foundation; either 00013 * version 2 of the License, or (at your option) any later version. 00014 * 00015 * This library is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Library General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Library General Public 00021 * License along with this library; if not, write to the Free Software 00022 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00023 * 02111-1307, USA. 00024 */ 00025 #ifndef _vdkxparser_h 00026 #define _vdkxparser_h 00027 00028 #include <vdkxdb2/vdkxdb.h> 00029 #include <vdkxdb2/vdkxtable.h> 00030 class VDKXParser 00031 { 00032 00033 protected: 00034 VDKXDatabase* xdb; 00035 VDKXTable* table; 00036 char type; 00037 char *expr; 00038 public: 00039 VDKXParser(VDKXDatabase* xdb,VDKXTable* table = NULL); 00040 virtual ~VDKXParser(); 00041 xbShort Parse(char* opnd1, char* opr = NULL, char* opnd2 = NULL ); 00042 char* Expression(); 00043 char ResultType(); 00044 int GetIntResult(); 00045 double GetDoubleResult(); 00046 const char* GetStringResult() ; 00047 }; 00048 #endif 00049