///////////////////////////////////////////////////////////////////////////////
/// @file deLogDestiny.hpp
///
/// @brief Error and Logging Class - Destiny Version I
///
/// @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 DELOGDESTINY_HPP
#define DELOGDESTINY_HPP



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

#include "deLog.hpp"
#include "deString.hpp"
#include "deShared.hpp"
#include "deArray.hpp"



//=================================================================================
// Internal Data Structures
//=================================================================================

typedef struct FileInfo
{
   unsigned int ThreadID;
   deWinFile *ErrorFile;
   deWinFile *LogFile;
} FileInfo;



//=================================================================================
// deLogDestiny Class
//
// Error and Logging Class - Destiny Version I
//=================================================================================

class deLogDestiny : public IdeLog
{
public:
   deLogDestiny(char *LogName);
   ~deLogDestiny();

   deBoolean GetCreationResult(void) { return CreationResult; }

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

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

   void Log(char *Format, ...);

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

   void LogVariable(const char *VarName, char *Format, ...);

private:
   deBoolean GetThreadFileInfo(FileInfo *Info);

   deBoolean CreationResult;
   char BaseFileName[120];
   deTArray<FileInfo> LogFiles;
};




#endif  // End DELOGDESTINY_HPP


