-
Notifications
You must be signed in to change notification settings - Fork 1
/
LinkedList.h
42 lines (39 loc) · 899 Bytes
/
LinkedList.h
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
// pickit.cpp
// by Gayak ([email protected])
// original program (0.82 and previous) by [email protected]
#pragma once
#include <windows.h>
typedef struct LinkedItem_t
{
LinkedItem_t* pPrev;
LinkedItem_t* pNext;
char Name[100];
DWORD dwUnitId;
} LinkedItem;
/*
typedef struct LinkedItem_p
{
LinkedItem_p* pPrev;
LinkedItem_p* pNext;
LPVOID lpData;
} LinkedItem;
*/
class LinkedList
{
private:
LinkedItem* pFirst;
LinkedItem* pLast;
UINT cItemCount;
public:
LinkedList();
virtual ~LinkedList();
LinkedItem* AddItem(char* name);
LinkedItem* AddItem1(DWORD dwUnitId);
LinkedItem* RemoveItem(LinkedItem* pItem);
LinkedItem* RemoveItem1(DWORD dwUnitId);
LinkedItem* GetFirstItem();
LinkedItem* GetLastItem();
LinkedItem* GetPrevItem(LinkedItem* pItem);
LinkedItem* GetNextItem(LinkedItem* pItem);
UINT LinkedList::GetItemCount();
};