summaryrefslogtreecommitdiff
path: root/src/include/xbfilter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/xbfilter.h')
-rwxr-xr-xsrc/include/xbfilter.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/include/xbfilter.h b/src/include/xbfilter.h
new file mode 100755
index 0000000..635d117
--- /dev/null
+++ b/src/include/xbfilter.h
@@ -0,0 +1,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( xbDbf *dbf );
+ ~xbFilter();
+ xbInt16 Set( xbString &sFilterExpression );
+ xbInt16 Set( const char *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
+ 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__ */ \ No newline at end of file