summaryrefslogtreecommitdiff
path: root/src/T2DLL/LComparator.h
blob: 3d949962cd523629b2b881207ef6bc78f5ff10e7 (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
#pragma once
#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;
};