![]() |
Main Page
Class Hierarchy
Alphabetical List
Compound List
File List
Compound Members
![]() |
00001 /******************************************************************************** 00002 * * 00003 * ODBC Database connector * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 2003 by Mathew Robertson. All Rights Reserved. * 00007 * Copyright (C) 2003 by Giancarlo Formicuccia. All Rights Reserved. * 00008 ********************************************************************************* 00009 * This library is free software; you can redistribute it and/or * 00010 * modify it under the terms of the GNU Lesser General Public * 00011 * License as published by the Free Software Foundation; either * 00012 * version 2.1 of the License, or (at your option) any later version. * 00013 * * 00014 * This library 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 GNU * 00017 * Lesser General Public License for more details. * 00018 * * 00019 * You should have received a copy of the GNU Lesser General Public * 00020 * License along with this library; if not, write to the Free Software * 00021 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * 00022 *********************************************************************************/ 00023 #ifndef FXODBC_H 00024 #define FXODBC_H 00025 00026 #ifndef FXDATABASEINTERFACE_H 00027 #include "FXDatabaseInterface.h" 00028 #endif 00029 namespace FXEX { 00030 00031 /** 00032 * ODBC datasource connection/driver 00033 */ 00034 class FXODBC: public FXDatabaseInterface { 00035 FXDECLARE(FXODBC) 00036 00037 protected: 00038 /// serialisation 00039 FXODBC(); 00040 00041 public: 00042 /// ctor 00043 FXODBC(FXApp *a,FXObject *tgt=NULL,FXSelector sel=0); 00044 00045 /// connect to ODBC datasource 00046 virtual FXbool connect() { return FALSE; } 00047 00048 /// children implement a real disconnect method 00049 virtual void disconnect() {} 00050 00051 /// implement real query mechanism 00052 virtual FXbool query(const FXString& qry) { return FALSE; } 00053 00054 /// this returns a list of tables implemented for this database 00055 virtual FXStringList getTables() { return FXStringList(); } 00056 00057 /// create resources 00058 virtual void create(); 00059 00060 /// Stream save and load 00061 virtual void save(FXStream& store) const; 00062 virtual void load(FXStream& store); 00063 00064 /// dtor 00065 virtual ~FXODBC(); 00066 }; 00067 00068 } // namespace FXEX 00069 #endif // FXODBC_H