Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

hk_classes/hk_classes/hk_data.h

Go to the documentation of this file.
00001 // ****************************************************************************
00002 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>
00003 // This file is part of the hk_classes 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_DATA
00012 #define HK_DATA
00013 #include "hk_class.h"
00014 using namespace std;
00015 const hk_string defaulttextdelimiter="'";
00016 const hk_string defaultidentifierdelimiter="\"";
00026 class hk_data: public hk_class
00027 {
00028     friend class hk_database;
00029     public:
00034         virtual hk_string   name(void) const;
00035         virtual void    set_name(const hk_string& n);
00041         enum enum_datasourcetypes {ds_table,ds_query,ds_actionquery,ds_view,ds_unknown};
00042         virtual enum_datasourcetypes type(void) const;
00043         hk_string identifierdelimiter(void) const {return p_identifierdelimiter;}
00044         hk_string textdelimiter(void) const {return p_sqltextdelimiter;}
00045         static bool print_sqlstatements(void) {return p_print_sqlstatements;}
00046         static void set_print_sqlstatements(bool p);
00047 
00048     protected:
00049         hk_data();
00050         virtual ~hk_data();
00051         virtual void before_source_vanishes(void);
00052         virtual void before_connection_disconnects(void);
00053         virtual void filelist_changes(listtype t);
00054         virtual bool driver_specific_name(const hk_string& n);
00055         hk_string   p_name;
00056         hk_string p_sqltextdelimiter;
00057         hk_string  p_identifierdelimiter;
00058         static bool    p_print_sqlstatements;//will be used to decide whether sql statements will be printed to cerr
00059 
00060     private:
00061 //p_already_handled is used from hk_database in bulk operations to find out if this object has been already handled.
00062         bool    p_already_handled;
00063 
00064 };
00065 #endif

Generated on Thu Mar 9 18:40:40 2006 for hk_classes by  doxygen 1.4.1