/****************************************************************************************************

		IShSafeUtilities.h
		Copyright: (c) 2001 Eovia Corp. All rights reserved.

		Author:	Arnaud
		Date:	3/18/2005

****************************************************************************************************/

#ifndef __IShSafeUtilities__
#define __IShSafeUtilities__

#if CP_PRAGMA_ONCE
#pragma once
#endif



#include "MCCompObj.h"

struct IComDll;
struct TProcessorInfo;
class  TMCString;

MCDEFINE_GUID_H(IID_IShSafeUtilities);


/// \addtogroup Utilities
/// \{

/// Utility functions that can be used safely when you don't override the memory allocators
/// (they are of course also safe if you override the allocators).
struct IShSafeUtilities: public IMCUnknown
{
public:
	// ****************************************************************************
	//								CreateIComDll
	// 
	/// Creates an IComDll
	/// 
	/// \param outDll          the created dll
	/// \param inFullPathName  the full path of the dll to create
	/// \param inHasDta        true if the extension/dll is supposed to have an associated resource file (.dta)
	/// 
	virtual void	 MCCOMAPI CreateIComDll		(	IComDll**			outDll, 
													const TMCString&	inFullPathName, 
													boolean				inHasDta) = 0;


	// ****************************************************************************
	//								GetAsciiTranslationTable
	// 
	/// Returns the global ASCII translation table.  
	/// \see TMCAsciiTranslationTable
	/// \return A pointer to the translation table object
	///
	virtual TMCAsciiTranslationTable* MCCOMAPI GetAsciiTranslationTable() = 0;	


	// ****************************************************************************
	//								GetProcessorInfo
	// 
	/// returns info about the processor of the computer
	/// 
	/// \param outInfo  the processor info.
	/// 
	virtual void	MCCOMAPI GetProcessorInfo(TProcessorInfo& outInfo) = 0;	
};


/// \}


/// \addtogroup Utilities
/// \{

///stores which mmx optimisations are available
struct TProcessorInfo : public TMCObject
{
	boolean fUseMMX;
	boolean fIsPentiumProcessor;
	boolean fIsPentiumIIProcessor;
	boolean fIsPentiumIIIProcessor;

	TProcessorInfo ()
	{
		fUseMMX					= false;
		fIsPentiumProcessor		= false;
		fIsPentiumIIProcessor	= false;
		fIsPentiumIIIProcessor	= false;
	}
};

/// \}








#endif
