///////////////////////////////////////////////////////////////////////////////
/// @file deLog.hpp
///
/// @brief Error and Logging Class
///
/// @author Hootie
///
/// 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 Dec 2001
/// @author Hootie
/// @remarks Creation
///
///////////////////////////////////////////////////////////////////////////////

#ifndef DELOG_HPP
#define DELOG_HPP



//=================================================================================
// Includes
//=================================================================================

#include "deGlobalTypes.hpp"
#include "deInternalValues.hpp"


//=================================================================================
// DLL Import/Export Defines
//=================================================================================

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

#ifdef USING_DESTINY3D
#ifdef _DEBUG
#	ifdef DESTINY3D_STATIC_LINK
#		pragma comment(lib, "deLog_sd")
#	else
#		pragma comment(lib, "deLogd")
#	endif //DESTINY3D_STATIC_LINK
#else
#	ifdef DESTINY3D_STATIC_LINK
#		pragma comment(lib, "deLog_s")
#	else
#		pragma comment(lib, "deLog")
#	endif //DESTINY3D_STATIC_LINK
#endif //_DEBUG
#endif //USING_DESTINY3D



//=================================================================================
// deLog Config File Keys
//=================================================================================

const char ConfigLogType[] = "Destiny";



//=================================================================================
// Log and Error Level Types
//=================================================================================



//=================================================================================
// IdeLog Class
//
// Error and Logging Interface Base Class
//=================================================================================

/// an error and event logging class
//class IdeLog
DE3D_INTERFACE_(IdeLog)
{
protected:
public:
	virtual ~IdeLog()  {};

	typedef enum
	{
		DEERROR_WARNING,
		DEERROR_ERROR,
		DEERROR_FATAL
	} deErrorLevelType;

	virtual deBoolean GetCreationResult(void) = 0;

	virtual void Error(deErrorLevelType ErrorLevel, unsigned int ErrorCode) = 0;
	virtual void Error(deErrorLevelType ErrorLevel, char *Format, ...) = 0;

	virtual void ErrorStart(deErrorLevelType ErrorLevel) = 0;
	virtual void ErrorAddLine(unsigned int ErrorCode) = 0;
	virtual void ErrorAddLine(char *Format, ...) = 0;
	virtual void ErrorEnd(deErrorLevelType ErrorLevel) = 0;

	virtual void Log(char *Format, ...) = 0;

	virtual void LogFunctionStart(const char *FunctionName) = 0;
	virtual void LogParamListStart() = 0;
	virtual void LogParamListEnd() = 0;
	virtual void LogFunctionEnd(const char *FunctionName) = 0;

	virtual void LogVariable(const char *VarName, char *Format, ...) = 0;
};



//=================================================================================
// Error and Logging Interface Factories
//=================================================================================

	DELOGAPI IdeLog *GetIdeLogInterface(char *LogName);
typedef IdeLog* (*fGetIdeLogInterface)(char *LogName);



#endif  //End DELOG_HPP

