gSAFE  1.3.8
xbioconn.h
1 /*
2  gSAFE - LIB
3  general Sql dAtabase FrontEnd
4 
5  (C) 2011 Peter Deak (hyper80@gmail.com)
6 
7  License: GPLv2 http://www.gnu.org/licenses/gpl-2.0.html
8 
9  XBase Connection to gDAFE datelib (based on XBase Import/Export lib)
10  xbioconn.h
11 */
12 
13 /*
14  * WARNING: This file's is depends on xbio.h/xbio.cpp which requires XBase library
15  * (http://linux.techass.com/projects/xdb/)
16  * If you don't want to use the XBase support just remove
17  * the xbio* files from your project, or undefine (remove) the ENABLE_XBASE_SUPPORT macro!
18  */
19 
20 #ifdef ENABLE_XBASE_SUPPORT
21 
22 #ifndef GSAFE_XBASE_IOCONN_H
23 #define GSAFE_XBASE_IOCONN_H
24 
25 #include <QtCore>
26 
27 #include "datalib.h"
28 #include "xbio.h"
29 
31 /* @{ */
32 
33 
34 class HFieldPairs
35 {
36 public:
37  HFieldPairs(QString s,QString x)
38  {
39  gsafefieldname = s;
40  xbasefieldname = x;
41  }
42  QString gsafefieldname;
43  QString xbasefieldname;
44 };
45 
110 class HXBaseRecordSync : public HBase
111 {
112  Q_OBJECT
113 
114 private:
115  QList<HFieldPairs> fieldconn;
116 
117 public:
118 
121  ~HXBaseRecordSync();
122 
124  void assign(QString htablefieldsqlname,QString xbasefieldname);
126  void clearAssigns(void);
127 
129  int syncHTableToXBase(HTable *record,HXBaseFileWriter *dbf);
131  int syncXBaseToHTable(HXBaseFileReader *dbf,HTable *record);
132 };
133 
134 /* @} */
135 
136 #endif // GSAFE_XBASE_IOCONN_H
137 
138 #endif // ENABLE_XBASE_SUPPORT
void assign(QString htablefieldsqlname, QString xbasefieldname)
Definition: xbioconn.cpp:37
void clearAssigns(void)
Definition: xbioconn.cpp:42
int syncHTableToXBase(HTable *record, HXBaseFileWriter *dbf)
Definition: xbioconn.cpp:47
Definition: datalib.h:312
int syncXBaseToHTable(HXBaseFileReader *dbf, HTable *record)
Definition: xbioconn.cpp:94