//	Zinc Application Framework - Z_ERROR1.CPP
//	COPYRIGHT (C) 1990-1999.  All Rights Reserved.
//	Zinc Software Incorporated.  Pleasant Grove, Utah  USA

#include <z_error.hpp>
#include <z_stdarg.hpp>
#include <z_app.hpp>
#define ZAF_ERROR_SYSTEM_INFO
#include "lang_def.cpp"
#include "gbl_def.cpp"

// ----- ZafErrorSystem -----------------------------------------------------

ZafErrorSystem::ZafErrorSystem(void) :
	ZafErrorStub()
{
	// Initialize the global variable.
	if (!zafErrorSystem)
		zafErrorSystem = this;

	// Get the error strings.
	messages = ZafLanguageManager::Allocate(className, defaultMessages);
}

ZafErrorSystem::ZafErrorSystem(const ZafErrorSystem &) :
	ZafErrorStub()
{
}

ZafErrorSystem::~ZafErrorSystem(void)
{
	// Free the error strings.
	ZafLanguageManager::Free(messages);
}

bool ZafErrorSystem::IsA(ZafClassID compareID) const
{
	return ((compareID == classID) ? true : false);
}

bool ZafErrorSystem::IsA(ZafClassName compareName) const
{
	return (!strcmp(compareName, className) ? true : false);
}
