blob: f10f1832edb6a015d954819f8920492e0daecc66 (
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
|
#include <pch.cxx>
#define _ULIB_MEMBER_
#include "ulib.hxx"
#include "listit.hxx"
DEFINE_CONSTRUCTOR( LIST_ITERATOR, ITERATOR );
DEFINE_CAST_MEMBER_FUNCTION( LIST_ITERATOR );
VOID
LIST_ITERATOR::Reset(
)
{
_current = NULL;
}
POBJECT
LIST_ITERATOR::GetCurrent(
)
{
return _current ? _current->data : NULL;
}
POBJECT
LIST_ITERATOR::GetNext(
)
{
_current = _current ? _current->next : _list->_head;
return _current ? _current->data : NULL;
}
POBJECT
LIST_ITERATOR::GetPrevious(
)
{
_current = _current ? _current->prev : _list->_tail;
return _current ? _current->data : NULL;
}
|