summaryrefslogtreecommitdiff
path: root/1Tdata/xbase/xbase64-4.1.4/src/include/xblnknod.h
blob: ef45be87b22c46a0a9e311e282af1dff0808626e (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*  xblnknod.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

*/


#ifndef __XB_XBLNKNOD_H__
#define __XB_XBLNKNOD_H__



#ifdef XB_LINKLIST_SUPPORT

namespace xb{

template<class xbNodeType>
class XBDLLEXPORT xbLinkListNode {
  public:
   xbLinkListNode( const xbNodeType & );
   xbLinkListNode( const xbNodeType &, const xbString & );
   xbNodeType GetKey() const;
   xbString   &GetData();
   xbLinkListNode<xbNodeType> *GetNextNode() const;
   xbLinkListNode<xbNodeType> *GetPrevNode() const;
   void       SetNextNode( xbLinkListNode<xbNodeType> *llNext );
   void       SetPrevNode( xbLinkListNode<xbNodeType> *llPrev );

  private:
   xbNodeType     ntKey;
   xbString       sData;
   xbLinkListNode *llNext;
   xbLinkListNode *llPrev;
};

 template<class xbNodeType>
 xbLinkListNode<xbNodeType>::xbLinkListNode( const xbNodeType &key ){
   ntKey  = key;
   llNext = NULL;
   llPrev = NULL;
 }

 template<class xbNodeType>
 xbLinkListNode<xbNodeType>::xbLinkListNode( const xbNodeType &key, const xbString &s ){
   ntKey  = key;
   sData  = s;
   llNext = NULL;
   llPrev = NULL;
 }

 template<class xbNodeType>
 xbNodeType xbLinkListNode<xbNodeType>::GetKey() const {
   return ntKey;
 }

 template<class xbNodeType>
 xbString &xbLinkListNode<xbNodeType>::GetData(){
   return sData;
 }

 template<class xbNodeType>
 xbLinkListNode<xbNodeType> *xbLinkListNode<xbNodeType>::GetNextNode() const {
   return llNext;
 }

 template<class xbNodeType>
 xbLinkListNode<xbNodeType> *xbLinkListNode<xbNodeType>::GetPrevNode() const {
   return llPrev;
 }

 template<class xbNodeType>
 void xbLinkListNode<xbNodeType>::SetNextNode( xbLinkListNode<xbNodeType> *lln ){
   llNext = lln;
 }

 template<class xbNodeType>
 void xbLinkListNode<xbNodeType>::SetPrevNode( xbLinkListNode<xbNodeType> *llp ){
   llPrev = llp;
 }

}               // namespace
#endif          // XB_LINKLIST_SUPPORT
#endif          // XB_XBLNKNOD_H__