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

hk_definitions.h

00001 // ****************************************************************************
00002 // copyright (c) 2000-2004 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_DEFINITIONS
00012 #define HK_DEFINITIONS
00013 #include "hk_string.h"
00014 #include <list>
00015 #include <stdlib.h>
00016 #include <stdio.h>
00017 
00018 using namespace std;
00019 
00020 #define  HK_DEBUG
00021 #define HK_VERSION "072"
00022 
00025 enum filetype{ft_table=1,ft_query=2,ft_form=3,ft_report=4,ft_view=6};
00026 enum listtype{lt_table=1,lt_query=2,lt_form=3,lt_report=4,lt_index=5,lt_view=6};
00027 
00028 enum datasourcetype {dt_table=1,dt_query=2,dt_view=3};
00029 enum objecttype{ot_database=0,ot_table=1,ot_query=2,ot_form=3,ot_report=4,ot_view=6};
00030 
00035 typedef class struct_raw_data
00036 {
00037     public:
00038         struct_raw_data(){length=0;data=NULL;}
00039         unsigned long   length;
00040         const char* data;
00041 
00042 } ;
00043 
00044 typedef class struct_connectionfields
00045 {
00046     public:
00047         struct_connectionfields(){cancel=false;save=false;allowdatabaseselect=true;};
00048         hk_string host;
00049         hk_string user;
00050         hk_string password;
00051         hk_string sql_delimiter;
00052         hk_string port;
00053         hk_string database;
00054         bool allowdatabaseselect;
00055         bool cancel;
00056         bool save;
00057         bool emulateboolean;
00058 } ;
00059 
00060 
00061 class struct_commands;
00062 
00063 typedef class struct_commandlinefields
00064 {
00065     public:
00066         struct_commandlinefields()
00067             {
00068                runtime_only=false;
00069                p_guicommands=NULL;
00070             };
00071         hk_string driver;
00072         hk_string database;
00073         hk_string form;
00074         
00075         hk_string host;
00076         hk_string user;
00077         hk_string password;
00078         hk_string port;
00079         bool runtime_only;
00080         struct_commands* p_guicommands;
00081 } ;
00082 
00083 
00084 int hk_random(int min,int max);
00085 
00086 class hk_column;
00090 bool is_numerictype(hk_column*);
00094 bool is_integertype(hk_column*);
00098 bool is_realtype(hk_column*);
00099 double inch2cm(double);
00100 double cm2inch(double);
00101 //the following functions and datatypes are all needed for hk_report
00102 class hk_report;
00103 class hk_reportdata;
00104 class hk_reportsection;
00105 
00106 typedef hk_string   recodefunctiontype(const hk_string&,hk_report*);
00107 typedef hk_string   data_replacefunctiontype(hk_reportdata*,const hk_string&);
00108 typedef bool report_configurefunction(hk_report*,int);
00109 typedef bool reporttypefunction(hk_report*,bool);
00110 typedef unsigned long reportsectioncounttype(hk_reportsection*);
00111 typedef void reportsectionautomaticcreatedatatype(hk_reportsection*);
00112 typedef unsigned long reportdatacounttype(hk_reportdata*);
00113 typedef void    data_configurefunctiontype(hk_reportdata*);
00114 
00115 union number
00116 {
00117     long integer;
00118     double real;
00119 };
00120 
00121 union longnumber
00122 {
00123     long long integer;
00124     long double real;
00125 };
00126 
00127 
00128 typedef class
00129 {
00130  public:
00131  hk_string dependingfield;
00132  hk_string masterfield;
00133 } dependingclass;
00134 
00135 
00136 typedef class referentialclass
00137 {
00138 public:
00139 referentialclass();
00140 bool operator=(const referentialclass&);
00141 
00142 
00143 hk_string p_name;
00144 hk_string p_masterdatasource;
00145 list<dependingclass> p_fields;
00146 bool p_deletecascade;
00147 bool p_updatecascade;
00148 } ;
00149 
00150 #endif

Generated on Tue Mar 22 19:28:08 2005 for Databaseconnectionclasses by  doxygen 1.4.1