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

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

		Author:	Arnaud
		Date:	3/17/2005

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

#ifndef __IShDebugUtilities__
#define __IShDebugUtilities__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "MCCompObj.h"


class TMCCountedObject;
class TMCSMPCountedObject;
class TMCAtomicCounter;


MCDEFINE_GUID_H(IID_IShDebugUtilities);


/// \addtogroup Utilities
/// \{

/// Utility functions used for debugging.
struct IShDebugUtilities: public IMCUnknown
{
public:
	virtual void		MC_CallAssert_					(pointer f, uint32 l) = 0;
	virtual void		MC_CallNotify_					(pointer f, uint32 l, const char* message) = 0; 
	virtual void		MC_CallNotify_					(pointer f, uint32 l, const char* message, real number) = 0; 
	virtual void		MC_CallNotify_					(pointer f, uint32 l, const char* message, real number1, real number2) = 0;
	virtual void		AddReference					(const void* object, const void* context) = 0;
	virtual void		RemoveReference					(const void* object, const void* context) = 0;

	#if Debug_  && qRecordCountedPtrRefs
	virtual uint32		GetNewCountedPtrContext			(void) = 0;
	virtual void		ReleaseCountedPtrContext		(uint32& ioContext) = 0;
	#endif
	virtual boolean*	GetStackReference				() = 0;
	virtual boolean*	GetIsReferencingOn				() = 0;
	virtual void		InitCountedObject				( TMCCountedObject**& first, TMCCountedObject**& last,
														  TMCSMPCountedObject**& firstSMP, TMCSMPCountedObject**& lastSMP,
														  TMCAtomicCounter**& current, TMCAtomicCounter**& total ) = 0;
};




/// \}

#endif
