summaryrefslogtreecommitdiffstats
path: root/public/sdk/inc/cdlink.hxx
blob: c9658d31860086822c935cb98748745519ff1453 (plain) (blame)
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
//+-------------------------------------------------------------------------
//
//  Microsoft Windows
//  Copyright (C) Microsoft Corporation, 1991 - 1992.
//
//  File:	cdlink.hxx
//
//  Contents:
//
//  Classes:    CDlink
//
//  History:    16-Oct-91  KevinRo Created
//
//--------------------------------------------------------------------------

#ifndef _CDLINK_HXX_
#define _CDLINK_HXX_

//+----------------------------------------------------------------------
//
// Class:	CDLink, dl
//
// Purpose:	A double linked list class
//
//----------------------------------------------------------------------

class CDLink {
public:
                    CDLink();
	virtual         ~CDLink();
    CDLink *		Next() const;
    void            SetNext(CDLink * dlNext);
    CDLink *		Prev() const;
    void            SetPrev(CDLink * dlPrev);
    EXPORTDEF VOID	LinkAfter(CDLink * dlPrev);
    EXPORTDEF VOID	LinkBefore(CDLink * dlNext);
    EXPORTDEF VOID	UnLink();

private:
    CDLink	*_dlNext;
    CDLink	*_dlPrev;
};

//+----------------------------------------------------------------------
//
// Member:	CDLink::CDLink
//
// Purpose:	Constructor for CDLink
//
//-----------------------------------------------------------------------

inline CDLink::CDLink()
{
    _dlNext = NULL;
    _dlPrev = NULL;
}
//+----------------------------------------------------------------------
//
// Member:	CDLink::~CDLink
//
// Purpose:	Destructor for CDLink
//
//-----------------------------------------------------------------------

inline CDLink::~CDLink()
{
    _dlNext = NULL;
    _dlPrev = NULL;
}

//+----------------------------------------------------------------------
//
// Member:	CDLink::Next
//
// Purpose:	Member variable access function
//
// Returns:	_dlNext
//
//-----------------------------------------------------------------------

inline CDLink *CDLink::Next() const
{
    return _dlNext;
}

//+----------------------------------------------------------------------
//
// Member:	CDLink::SetNext
//
// Purpose:	Member variable set function
//
// Returns:	Nothing
//
//-----------------------------------------------------------------------

inline void CDLink::SetNext(CDLink * dlNext) 
{
    _dlNext = dlNext;
}

//+----------------------------------------------------------------------
//
// Member:	CDLink::Prev
//
// Purpose:	Member variable access function
//
// Returns:	_dlPrev
//
//-----------------------------------------------------------------------

inline CDLink *CDLink::Prev() const
{
    return _dlPrev;
}

//+----------------------------------------------------------------------
//
// Member:	CDLink::SetPrev
//
// Purpose:	Member variable set function
//
// Returns:	Nothing
//
//-----------------------------------------------------------------------

inline void CDLink::SetPrev(CDLink * dlPrev) 
{
    _dlPrev = dlPrev;
}

#endif