reman3/Rayman_X/cpa/tempgrp/AI/AIBase/Mth_Erm.h

109 lines
3.7 KiB
C

/*
------------------------------------------------------------------------------------------
HEADER FILE FOR :
Error definition file for mathematic module
------------------------------------------------------------------------------------------
File Name :
ErrMth.h
------------------------------------------------------------------------------------------
Creation :
* Date :
Feburary 18,1997
* Author :
Albert Pais
------------------------------------------------------------------------------------------
Contents :
This file contains definition for the error management concerning the mathematical
module
------------------------------------------------------------------------------------------
Modification :
* Date :
* Author :
* Modify :
------------------------------------------------------------------------------------------
*/
#ifndef __ERRMTH_H__
#define __ERRMTH_H__
#define C_szXxxVersion "MTH V5.0.0" /* The format is XXX Va.b.c with Xxx is the Tag of the module */
#define C_szXxxFullName "Module Mathematic for AI"/* the complete and clear name of the module */
#define C_szXxxDate __DATE__ /*The format is "Mmm dd yyyy".You can use __DATE__ but be careful that you have the control of the compilation*/
/*----------*/
/* Constant */
/*----------*/
/* error of the MTH Module*/
typedef enum e_uwMTHErrNumber_{
E_uwMTHFatalErr = 0,
#ifdef __FATAL_ERR_MTH__
/* -----------------*/
E_uwMTHFatalNotAFatalError,
E_uwMTHFatalInvalidParameter,
E_uwMTHFatalAssertionFailure,
E_uwMTHFatalFailedAllocationMem,
#endif /*__FATAL_ERR_MTH__*/
E_uwMTHStartOfWarning,/* important constant, it allows to recognize if an error is fatal or not.*/
E_uwMTHWarningCanNotFree,
#ifdef __WARNING_ERR_MTH__
/* -------------------*/
#endif /*__WARNING_ERR_MTH__*/
E_uwMTHErrNumber
} e_uwMTHErrNumber;
/*------------------*/
/* Global Variables*/
/*------------------*/
#undef EXTERN
#undef extern
#ifndef __DeclareGlobalVariableErrMth_h__
#define EXTERN_ERRMTH extern /*external declaration*/
#else /*__DeclareGlobalVariableErrMth_h__*/
#define EXTERN_ERRMTH /*replace by nothing : we have to declare*/
#endif /*__DeclareGlobalVariableErrMth_h__*/
EXTERN_ERRMTH unsigned char g_ucMTHModuleId /*number of identification of the Erm module*/
#ifdef __DeclareGlobalVariableErrMth_h__
= C_ucModuleNotInitialized
#endif /*__DeclareGlobalVariableErrMth_h__*/
;
#ifdef __ERROR_STRINGS__
EXTERN_ERRMTH CPA_EXPORT char * g_a_szMTHInformationModule []
#if defined(__DeclareGlobalVariableErrMth_h__) && !defined(CPA_WANTS_IMPORT)
= {C_szXxxVersion, C_szXxxFullName, C_szXxxDate}
#endif /*__DeclareGlobalVariableErrMth_h__ && CPA_WANTS_IMPORT*/
;
EXTERN_ERRMTH char * g_szMTHModuleName /* Obliged syntax 'g_sz'+[Abbreviation of ModuleName]+'ModuleName'*/
#ifdef __DeclareGlobalVariableErrMth_h__
= "Module Mathematic"
#endif /*__DeclareGlobalVariableErrMth_h__*/
;
EXTERN_ERRMTH /*struct!!y!!*/ tdstErrorMsg/*_!!y!!*/ g_a_stMTHTabErr [] /* Obliged syntax 'g_a_st'+[Abbreviation of ModuleName]+'TabErr'*/
#ifdef __DeclareGlobalVariableErrMth_h__/*Call from main program*/
={
#ifdef __FATAL_ERR_MTH__
E_uwMTHFatalNotAFatalError,"This not a valid mth fatal error",
E_uwMTHFatalInvalidParameter,"One or more parameters are invalid",
E_uwMTHFatalAssertionFailure,"Assertions failed",
E_uwMTHFatalFailedAllocationMem,"Allocation failure in module MTH",
/* -------------*/
#endif /*__FATAL_ERR_MTH__*/
#ifdef __WARNING_ERR_MTH__
E_uwMTHWarningCanNotFree,"Free failure in module MTH",
/* ----------------*/
#endif /*__WARNING_ERR_MTH__*/
0xFFFF, "\0"/*fin*/
};
#endif /*__DeclareGlobalVariableErrMth_h__*/
;
#undef extern
#endif /*__ERROR_STRINGS__*/
#endif /*__ERRMTH_H__*/