#include "ErrorStream.h"

void PauseAndExitFunctor::operator()(void)
{
	system("pause");
	exit(0);
}
void ContinueFunctor::operator()(void)
{
	//do nothing...just continue the program
}



ExceptionStream< ostream&, PauseAndExitFunctor  >	KODIAK_ERROR	( cerr, "\n--------[ EXCEPTION ERROR ]--------\n", ">>", "\n-----------------------------------\n" );	//ERROR stream
ExceptionStream< ostream&, ContinueFunctor  >		KODIAK_PROGRESS ( cout, "\n Initialization ", "", "" );	//PROGRESS stream
ExceptionStream< ostream&, ContinueFunctor  >		KODIAK_PROGRESSL ( cout, " Initialization ", "", "" );	//PROGRESS stream
ExceptionStream< ostream&, ContinueFunctor  >		KODIAK_CONSOLE	( cout, "\n--------[ KODIAK CONSOLE ]--------\n", ">>", "\n-----------------------------------\n" );

/*
ExceptionStream< ostream&, ContinueFunctor  >		KODIAK_DEBUG_COUT	( cout, "\n--------[ KODIAK CONSOLE ]--------\n", ">>", "\n-----------------------------------\n" );
*/



#ifdef RELEASE_MODE
	NoStream KODIAK_DEBUG_COUT;
#else
	KODIAK_DEBUG_STREAM KODIAK_DEBUG_COUT(cout);
#endif


#ifdef RELEASE_MODE
	ExceptionStream< ostream&, ContinueFunctor  >		KODIAK_WARNING	( cerr, "", "", "", true );	//WARNING stream
#else
	ExceptionStream< ostream&, ContinueFunctor  >		KODIAK_WARNING	( cerr, "\n--------[ EXCEPTION WARNING ]--------\n", ">>", "\n-----------------------------------\n" );	//WARNING stream
#endif

//NoStream KODIAK_DEBUG_COUT;

//KODIAK_DEBUG_STREAM KODIAK_DEBUG_COUT(cout);

#define FATAL_EXIT {system("pause");exit(1);}