summaryrefslogtreecommitdiff
path: root/src/T2DLL/LComparator.h
blob: a8d9fa0a6e1c735049204f4a26ed42cf13fea1c9 (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
#ifndef T2DLL_LCOMPARATOR_H
#define T2DLL_LCOMPARATOR_H
#define DONT_INCLUDE_AFXTEMPL
#include "../common.h"

class LComparator {
public:
	LComparator();
	virtual ~LComparator();
	virtual int Compare(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const;
	virtual BOOL IsEqualTo(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const;
	virtual int CompareToKey(const void* inItem, unsigned int inSize, const void* inKey) const;
	virtual BOOL IsEqualToKey(const void* inItem, unsigned int inSize, const void* inKey) const;
	static LComparator* GetComparator();
	virtual LComparator* Clone();
protected:
	static LComparator* sComparator;
};

class LLongComparator : public LComparator {
public:
	LLongComparator();
	virtual ~LLongComparator();
	virtual int Compare(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const;
	virtual BOOL IsEqualTo(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const;
	static LLongComparator* GetComparator();
	virtual LComparator* Clone();
protected:
	static LLongComparator* sLongComparator;
};
#endif