#include "exceptions.h"

SingletonException *SingletonException::_pInstance = 0;
Exception *SingletonException::_exception = 0;

SingletonException::SingletonException ()
{
}
SingletonException::~SingletonException()
{
}

SingletonException* SingletonException::instance()
{
	if(_pInstance == 0)
		_pInstance = new SingletonException();

	return _pInstance;
}
void SingletonException::set(Exception *e)
{
	_exception = e;
}
int SingletonException::isa(Exception &e)
{
	if(_exception != 0)
	return (e.type() == _exception->type()? 1 : 0);
	return 0;
}
Exception* SingletonException::get()
{
	return _exception;
}