00001
00002
00003
00004
00005
00006
00007
00008
00009
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
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