From 4875a3dd9b183dcd2256e2abfc4ccf7484c233b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 7 Dec 2022 13:17:14 +0100 Subject: New upstream version 4.0.2 --- src/include/xbtblmgr.h | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100755 src/include/xbtblmgr.h (limited to 'src/include/xbtblmgr.h') diff --git a/src/include/xbtblmgr.h b/src/include/xbtblmgr.h new file mode 100755 index 0000000..d551002 --- /dev/null +++ b/src/include/xbtblmgr.h @@ -0,0 +1,61 @@ +/* xbtblmgr.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 a list of open tables, open indices are connected to the open tables + +*/ + + +#ifndef __XB_XBMGR_H__ +#define __XB_XBMGR_H__ + +#ifdef CMAKE_COMPILER_IS_GNUCC +#pragma interface +#endif + +namespace xb{ + +class XBDLLEXPORT xbDbf; + +/* this structure is a linked list of open tables */ +struct XBDLLEXPORT xbTblList{ + xbTblList *pNext; + xbString *psTblName; /* Name of table - same table can be opened multiple times, but must have unique alias */ + xbString *psTblAlias; /* TblAliasName must be unique */ + xbDbf *pDbf; +}; + +class XBDLLEXPORT xbTblMgr : public xbSsv { + public: + xbTblMgr(); + ~xbTblMgr(); + xbInt16 AddTblToTblList ( xbDbf *d, const xbString &sTblName ); + xbInt16 AddTblToTblList ( xbDbf *d, const xbString &sTblName, const xbString &sTblAlias ); + xbInt16 DisplayTableList () const; + xbDbf * GetDbfPtr ( const xbString &sTblAlias ) const; + xbDbf * GetDbfPtr ( xbInt16 sItemNo ) const; + xbInt16 GetOpenTableCount () const; + xbInt16 RemoveTblFromTblList ( const xbString &sTblAlias ); + xbInt16 RemoveTblFromTblList ( xbDbf *d ); + + protected: + + private: + xbTblList * TblList; // List of open database tables + xbInt16 iOpenTableCount; // Number of open tables + +}; + +} /* namespace xb */ + +#endif /* __XB_XBMGR_H__ */ \ No newline at end of file -- cgit v1.2.3