hk_storagedatasource.h

00001 // ****************************************************************************
00002 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>  
00003 // This file is part of the hk_storageclasses library.
00004 // This file may be distributed and/or modified under the terms of the
00005 // GNU Library Public License version 2 as published by the Free Software
00006 // Foundation and appearing in the file COPYING included in the
00007 // packaging of this file.
00008 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00009 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00010 // ****************************************************************************
00011 #ifndef HK_STORAGEDATASOURCE
00012 #define HK_STORAGEDATASOURCE
00013 #include "hk_datasource.h"
00014 #include "hk_column.h"
00015 #include <list>
00016 #include <vector>
00017 #include <algorithm>
00018 using namespace std;
00019 
00020 class hk_presentation;
00021 
00022 class hk_storagedatasource:public hk_datasource
00023 {
00024     public:
00025 //      vector <struct_raw_data*>* data();
00026         struct_raw_data* columndata(unsigned long row, unsigned int fieldnr);
00027         enum_datasourcetypes type();
00028         virtual void    dump_data(void);
00029 
00030     protected:
00035         void delete_data(void);
00043         bool insert_data(struct_raw_data* datarow);
00047         void memory_error(void);
00048         hk_storagedatasource(hk_database* d,hk_presentation* p);
00049 
00050         virtual ~hk_storagedatasource();
00051 
00052         bool driver_specific_enable(void);
00053         bool driver_specific_disable(void);
00054         virtual list<hk_column*>* driver_specific_columns(void);
00055         virtual bool driver_specific_goto_row(unsigned long r);
00056         virtual unsigned long driver_specific_max_rows(void);
00057         virtual bool driver_specific_create_columns(void);
00058         virtual bool driver_specific_update_data(void);
00059         virtual bool driver_specific_insert_data(void);
00060         virtual bool driver_specific_delete_data_at(unsigned long);
00061         virtual bool driver_specific_batch_goto_previous(void);
00062         virtual bool driver_specific_batch_goto_next(void);
00063 
00064         bool p_data_changed;
00065         long p_debug_counter;
00066         struct_raw_data p_d;
00067         void set_maxrows(unsigned long);
00068         bool is_batchprevious(void){return use_batch_previous;}
00069 
00070     private:
00071         vector<struct_raw_data*> p_data;
00072         unsigned long p_rows;
00073         bool use_batch_previous;
00074 }
00075 
00076 
00077 ;
00078 #endif

Generated on Tue Nov 28 02:48:08 2006 for Databaseconnectionclasses by  doxygen 1.5.0