// FPDatabase.h: interface for the CFPDatabase class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_FPDATABASE_H__80B1B43C_91BC_460B_BF6C_38502109AF4E__INCLUDED_)
#define AFX_FPDATABASE_H__80B1B43C_91BC_460B_BF6C_38502109AF4E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "LogerInterface.h"
#include "FncMatcher.h"

#define MAX_DESCRIPTION 50

struct FPRecord
{
	WCHAR	description[MAX_DESCRIPTION];
	NInt	size;
	NByte * features;
};

class CFPDatabase
{
protected:
	CLogerInterface* m_loger;

	NInt m_count;
	CList<FPRecord, FPRecord> m_data[256];

public:
	NBool IdentifyG(NBool full, NBool G, NInt &count, TimeIntervalCounter* tc, 
		HFncMatcher hMatcher, FncmMatchDetails * MatchDetails);
	BOOL Identify(NByte * features, NSizeType size, NBool full, HFncMatcher hMatcher);

	inline void SetLoger(CLogerInterface* loger)
	{
		m_loger = loger;
	}

	void Load();
	void Store();
	void ClearDB();

	void AddFingerprint(FPRecord* finger);

	CFPDatabase();
	virtual ~CFPDatabase();
};

#endif // !defined(AFX_FPDATABASE_H__80B1B43C_91BC_460B_BF6C_38502109AF4E__INCLUDED_)
