summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2RequestIDArray.h
blob: df904110d427793155cb80f5e14b7e614e3e552e (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
#ifndef T2DLL_T2REQUESTIDARRAY_H
#define T2DLL_T2REQUESTIDARRAY_H
#include "../common.h"
#include "LArray.h"

enum EReqIDArrayPos {
    ReqIDArrayPos_0 = 0,
    ReqIDArrayPos_1 = 1,
};

class AFX_CLASS_EXPORT T2RequestIDArray : private LArray {
public:
	T2RequestIDArray();
	virtual ~T2RequestIDArray();
	void Init(const RECT&);
	unsigned int GetItemCount() const;
	void AllClear();
	void Expand(EReqIDArrayPos, int);
	void SetRequestIDAt(int, ERequestUpDown, unsigned int);
	unsigned int GetRequestIDAt(int, ERequestUpDown) const;
	BOOL IsStopPosition(int) const;
	void RemoveRequest(T2TowerDoc*, int, ERequestUpDown);
	void Union(T2RequestIDArray*);
	void MoverIDChanged(T2FloorInfo*, unsigned int);
	void StopRemoved(T2TowerDoc*, int);
	void ModuleRemoved(T2TowerDoc*, unsigned int);

	static T2RequestIDArray* ReadReqIDArray(T2Archive&);
	static void WriteReqIDArray(T2RequestIDArray*, T2Archive&);

private:
    int GetIndex(int, ERequestUpDown) const;
};
#endif