Xbase64 4.0.1
C++ Library for handling Xbase (DBF) format type files
xbtblmgr.h
Go to the documentation of this file.
1/* xbtblmgr.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 a list of open tables, open indices are connected to the open tables
15
16*/
17
18
19#ifndef __XB_XBMGR_H__
20#define __XB_XBMGR_H__
21
22#ifdef CMAKE_COMPILER_IS_GNUCC
23#pragma interface
24#endif
25
26namespace xb{
27
28class XBDLLEXPORT xbDbf;
29
30/* this structure is a linked list of open tables */
31struct XBDLLEXPORT xbTblList{
33 xbString *psTblName; /* Name of table - same table can be opened multiple times, but must have unique alias */
34 xbString *psTblAlias; /* TblAliasName must be unique */
36};
37
38class XBDLLEXPORT xbTblMgr : public xbSsv {
39 public:
40 xbTblMgr();
41 ~xbTblMgr();
42 xbInt16 AddTblToTblList ( xbDbf *d, const xbString &sTblName );
43 xbInt16 AddTblToTblList ( xbDbf *d, const xbString &sTblName, const xbString &sTblAlias );
44 xbInt16 DisplayTableList () const;
45 xbDbf * GetDbfPtr ( const xbString &sTblAlias ) const;
46 xbDbf * GetDbfPtr ( xbInt16 sItemNo ) const;
47 xbTblList * GetTblListEntry ( xbDbf *d );
48 xbInt16 GetOpenTableCount () const;
49 xbInt16 RemoveTblFromTblList ( const xbString &sTblAlias );
50 xbInt16 RemoveTblFromTblList ( xbDbf *d );
51
52 protected:
53
54 private:
55 xbTblList * TblList; // List of open database tables
56 xbInt16 iOpenTableCount; // Number of open tables
57
58};
59
60} /* namespace xb */
61
62#endif /* __XB_XBMGR_H__ */
Base class for handling dbf files/tables.
Definition: xbdbf.h:150
Class for handling shared system variables.
Definition: xbssv.h:59
Class for handling string data.
Definition: xbstring.h:50
Definition: xbtblmgr.h:38
Definition: xbdate.cpp:19
Definition: xbtblmgr.h:31
xbString * psTblName
Definition: xbtblmgr.h:33
xbDbf * pDbf
Definition: xbtblmgr.h:35
xbTblList * pNext
Definition: xbtblmgr.h:32
xbString * psTblAlias
Definition: xbtblmgr.h:34