Xbase64 4.0.1
C++ Library for handling Xbase (DBF) format type files
xbfilter.h
Go to the documentation of this file.
1/* xbfilter.h
2
3XBase64 Software Library
4
5Copyright (c) 1997,2003,2014,2022 Gary A Kunkel
6
7The xb64 software library is covered under the terms of the GPL Version 3, 2007 license.
8
9Email Contact:
10
11 XDB-devel@lists.sourceforge.net
12 XDB-users@lists.sourceforge.net
13
14This class manages the user data area (UDA)
15
16*/
17
18
19#ifndef __XB_XBFILTER_H__
20#define __XB_XBFILTER_H__
21
22#ifdef CMAKE_COMPILER_IS_GNUCC
23#pragma interface
24#endif
25
26
27#ifdef XB_FILTER_SUPPORT
28
29
30namespace xb{
31
32//#ifdef XB_INDEX_SUPPORT
33//class XBDLLEXPORT xbIx;
34//#endif // XB_INDEX_SUPPORT
35
36
37class XBDLLEXPORT xbFilter {
38
39 public:
40 xbFilter( xbXBase *xbase, xbDbf *dbf );
41 ~xbFilter();
42 xbInt16 Set( xbString &sFilterExpression );
43 xbInt16 GetFirstRecord( xbInt16 iOpt = 1 );
44 xbInt16 GetNextRecord ( xbInt16 iOpt = 1 );
45 xbInt16 GetPrevRecord ( xbInt16 iOpt = 1 );
46 xbInt16 GetLastRecord ( xbInt16 iOpt = 1 );
47 void SetLimit( xbInt32 ulLimit );
48 xbInt32 GetLimit() const;
49 void ResetQryCnt();
50 xbInt32 GetQryCnt() const;
51
52 #ifdef XB_INDEX_SUPPORT
53// void Set( xbIx *pIx, void *vpTag );
54 xbInt16 GetFirstRecordIx( xbInt16 iOpt = 1 );
55 xbInt16 GetNextRecordIx ( xbInt16 iOpt = 1 );
56 xbInt16 GetPrevRecordIx ( xbInt16 iOpt = 1 );
57 xbInt16 GetLastRecordIx ( xbInt16 iOpt = 1 );
58 #endif // XB_INDEX_SUPPORT
59
60
61 private:
62 xbXBase *xbase;
63 xbDbf *dbf;
64 xbExp *exp;
65
66 xbInt32 lLimit; // max number rows returned
67 xbInt32 lCurQryCnt; // current count of rows returned, neg# is moving from bottom to top
68 // pos# is moving from top to bottom
69 #ifdef XB_INDEX_SUPPORT
70 xbIx *pIx; // if index is set, the class uses the index tag, otherwise table
71 void *vpTag;
72 #endif // XB_INDEX_SUPPORT
73
74
75};
76} /* namespace */
77#endif /* XB_FILTER_SUPPORT */
78#endif /* __XBFILTER_H__ */
Definition: xbdate.cpp:19
class XBDLLEXPORT xbXBase
Definition: xbssv.h:27
class XBDLLEXPORT xbDbf
Definition: xbtblmgr.h:28