///////////////////////////////////////////////////////////////////////////////
/// @file deIDServer.hpp
///
/// @brief 32-bit UINT ID server
///
/// @author Assassin
///
/// This file is the intellectual property of Novus Delta, LLC.. Usage of the
/// contents of this file is subject to the Destiny3D Member License which
/// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
///
/// This file is distributed "AS IS" without warranty of any kind.  Novus
/// Delta, LLC. does not guarantee the fitness of the contents of this file
/// for any particular purpose.
///
/// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
///
/// <hr>
///                                 Change History
/// <hr>
///
/// @date Sept 2002
/// @author Assassin
/// @remarks Creation
///
///////////////////////////////////////////////////////////////////////////////

#ifndef DEIDSERVER_HPP
#define DEIDSERVER_HPP

#include "deGlobalTypes.hpp"

#if defined(DEUTIL_DLL_EXPORTS) || defined(DESTINY3D_EXPORT_ALL)
#	define DEIDSERVER_API extern "C" DEDLL_EXPORT
#elif defined(DESTINY3D_STATIC_LINK)
#	define DEIDSERVER_API extern "C"
#else
#	define DEIDSERVER_API extern "C" DEDLL_IMPORT
#endif

#ifdef USING_DESTINY3D
#ifdef _DEBUG
#	ifdef DESTINY3D_STATIC_LINK
#		pragma comment(lib, "deUtil_sd")
#	else
#		pragma comment(lib, "deUtild")
#	endif //DESTINY3D_STATIC_LINK
#else
#	ifdef DESTINY3D_STATIC_LINK
#		pragma comment(lib, "deUtil_s")
#	else
#		pragma comment(lib, "deUtil")
#	endif //DESTINY3D_STATIC_LINK
#endif //_DEBUG
#endif //USING_DESTINY3D


class IdeIDServer;
class IdeIDMapper;

	DEIDSERVER_API IdeIDServer * IdeIDServer_CreateServer(deBoolean RecycleIDs = deTRUE, int InitialSize = 8);
//	DEIDSERVER_API IdeIDMapper * IdeIDServer_CreateMapper();

typedef unsigned long int deID_t;

//class IdeIDServer
DE3D_INTERFACE_(IdeIDServer)
{
protected:
	virtual ~IdeIDServer() {}
public:
	virtual int			Release() = 0;

	virtual deID_t		AddData(void* Data) = 0;
	virtual deBoolean	AddDataWithID(void* Data, deID_t ID) = 0;
	virtual void*		LookupData(deID_t ID) = 0;
	virtual deBoolean	RemoveData(deID_t ID, void* Data) = 0;
	virtual void*		WalkData(deID_t & ID) = 0;
};

//class IdeIDMapper
DE3D_INTERFACE_(IdeIDMapper)
{
protected:
	virtual ~IdeIDMapper() {}
public:
	virtual int			Release() = 0;

	virtual IdeIDServer*GetMappedIDServer(IdeIDServer* Input) = 0;
	virtual deID_t		MapID(deID_t InputID) = 0;
};

#endif
