Xbase64 4.0.1
C++ Library for handling Xbase (DBF) format type files
xblnknod.h
Go to the documentation of this file.
1/* xblnknod.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
14*/
15
16
17#ifndef __XB_XBLNKNOD_H__
18#define __XB_XBLNKNOD_H__
19
20
21
22#ifdef XB_LINKLIST_SUPPORT
23
24namespace xb{
25
26template<class xbNodeType>
27class XBDLLEXPORT xbLinkListNode {
28 public:
29 xbLinkListNode( const xbNodeType & );
30 xbLinkListNode( const xbNodeType &, const xbString & );
31 xbNodeType GetKey() const;
32 xbString &GetData();
33 xbLinkListNode<xbNodeType> *GetNextNode() const;
34 xbLinkListNode<xbNodeType> *GetPrevNode() const;
35 void SetNextNode( xbLinkListNode<xbNodeType> *llNext );
36 void SetPrevNode( xbLinkListNode<xbNodeType> *llPrev );
37
38 private:
39 xbNodeType ntKey;
40 xbString sData;
41 xbLinkListNode *llNext;
42 xbLinkListNode *llPrev;
43};
44
45 template<class xbNodeType>
46 xbLinkListNode<xbNodeType>::xbLinkListNode( const xbNodeType &key ){
47 ntKey = key;
48 llNext = NULL;
49 llPrev = NULL;
50 }
51
52 template<class xbNodeType>
53 xbLinkListNode<xbNodeType>::xbLinkListNode( const xbNodeType &key, const xbString &s ){
54 ntKey = key;
55 sData = s;
56 llNext = NULL;
57 llPrev = NULL;
58 }
59
60 template<class xbNodeType>
61 xbNodeType xbLinkListNode<xbNodeType>::GetKey() const {
62 return ntKey;
63 }
64
65 template<class xbNodeType>
66 xbString &xbLinkListNode<xbNodeType>::GetData(){
67 return sData;
68 }
69
70 template<class xbNodeType>
71 xbLinkListNode<xbNodeType> *xbLinkListNode<xbNodeType>::GetNextNode() const {
72 return llNext;
73 }
74
75 template<class xbNodeType>
76 xbLinkListNode<xbNodeType> *xbLinkListNode<xbNodeType>::GetPrevNode() const {
77 return llPrev;
78 }
79
80 template<class xbNodeType>
81 void xbLinkListNode<xbNodeType>::SetNextNode( xbLinkListNode<xbNodeType> *lln ){
82 llNext = lln;
83 }
84
85 template<class xbNodeType>
86 void xbLinkListNode<xbNodeType>::SetPrevNode( xbLinkListNode<xbNodeType> *llp ){
87 llPrev = llp;
88 }
89
90} // namespace
91#endif // XB_LINKLIST_SUPPORT
92#endif // XB_XBLNKNOD_H__
93
94
Definition: xbdate.cpp:19