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