summaryrefslogtreecommitdiff
path: root/src/T2DLL/CLink.h
blob: ed7304a2a7d63c827444d8b8b27078e5c98a4db4 (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
#pragma once
#include "common.h"

class AFX_CLASS_EXPORT CLink {
public:
	CLink();
	CLink(CLink* prev);
	virtual ~CLink();
	void InsertAt(CLink* before);
	void Remove();
	void RemoveLink();
	unsigned int Count() const;

	CLink* GetNext() { return mNext; }
	CLink* GetPrev() { return mPrev; }
	void SetNext(CLink* l) { mNext = l; }
	void SetPrev(CLink* l) { mPrev = l; }

protected:
	CLink *mNext;
	CLink *mPrev;

	friend class CLinkIterator;
	friend class DbgPeopleView;
    friend class T2PeopleLinkIterator;
};

class AFX_CLASS_EXPORT CLinkIterator {
public:
	CLinkIterator(CLink* start);
	virtual ~CLinkIterator();
	BOOL Current(CLink** p);
	BOOL Prev(CLink** p);
	BOOL Next(CLink** p);

private:
	CLink *mStart;
	CLink *mCurrent;
};