#if !defined(__CONV_PROC_H__)
#define __CONV_PROC_H__
 
#include "..\AiBase\Specif\AiOption.h"
 
/**************************************/
#if !defined(CPA_EXPORT)
#if defined(CPA_WANTS_IMPORT)
#define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
#define CPA_EXPORT __declspec(dllexport)
#else
#define CPA_EXPORT
#endif /*CPA_WANTS_IMPORT || CPA_WANTS_EXPORT*/
#endif /*CPA_EXPORT*/
/**************************************/
#undef extern
#define EXTERN_AI_DLL extern
 
/************************************************************************************************************************/
 
/* Procedure for editor and/or debugger + readrule.c*/
#if defined(__DEBUG_AI__) || defined(ACTIVE_EDITOR) || defined (U64_AIDEBUG)
	EXTERN_AI_DLL CPA_EXPORT char *szGetProcedureTypeInParamFromId(enum tdeProcedureId_ eProcedureId);
#endif /* __DEBUG_AI__ ACTIVE_EDITOR*/
 
#if defined(ACTIVE_EDITOR)
	EXTERN_AI_DLL CPA_EXPORT char *szGetProcedureTypeOutParamFromId(enum tdeProcedureId_ eProcedureId);
	EXTERN_AI_DLL CPA_EXPORT enum tdeProcedureId_ fn_eFindProcedureIdFromEditorName(char *szProcedure);
	EXTERN_AI_DLL CPA_EXPORT char *szFindProcedureEditorNameFromId(enum tdeProcedureId_ eProcedureId);
#endif /* ACTIVE_EDITOR*/
	
EXTERN_AI_DLL CPA_EXPORT char *szFindProcedureScriptNameFromId(enum tdeProcedureId_ eProcedureId);
EXTERN_AI_DLL CPA_EXPORT enum tdeProcedureId_ fn_eFindProcedureIdFromScriptName(char *szFunction);
EXTERN_AI_DLL CPA_EXPORT enum tdeProcedureId_ fn_eGetNbProcedure();
#define M_IsProcedureIdValid(eProcId) ((eProcId) < fn_eGetNbProcedure())
EXTERN_AI_DLL CPA_EXPORT unsigned char fn_ucGetProcedureUltraOperator(enum tdeProcedureId_ eProcId);
 
#if defined(_AI_LIB_)
	tdp_fn_p_stProcedureFunctionPtr fn_p_fn_pGetProcedureFunctionPtr(enum tdeProcedureId_ eProcedureId);
#endif /* _AI_LIB_*/
 
#if !defined(OPTIMIZED_COMMAND)
	void fn_vSetProcedureUltraOperator(enum tdeProcedureId_ eProcId,unsigned char bFlag);
	
	#if defined(ACTIVE_EDITOR)
		#define M_PROCEDURE_ENTRY(a,b,english,c,d,e) a,b,english,c,d,e
		void fn_vDefineProcedureEntry(enum tdeProcedureId_ eProcedureId,char *szProcedureEditorName,char *szProcedureEditorName_En,char *szProcedureScriptName,tdp_fn_p_stProcedureFunctionPtr p_fn_p_stProcedureFunction,char *szProcedureTypeInParam);				
	#elif defined(_AI_LIB_)
		#define M_PROCEDURE_ENTRY(a,b,english,c,d,e) a,c,d,e
	void fn_vDefineProcedureEntry(enum tdeProcedureId_ eProcedureId,char *szProcedureScriptName,tdp_fn_p_stProcedureFunctionPtr p_fn_p_stProcedureFunction,char *szProcedureTypeInParam);				
	#endif /* ACTIVE_EDITOR _AI_LIB_*/
 
	#if defined(__DEBUG_AI__)
		void fn_vInitProcedureTable(tdp_fn_p_stProcedureFunctionPtr fn_p_stDefaultProcedureFunctionPointer);
		void fn_vCheckProcedureTable(tdp_fn_p_stProcedureFunctionPtr fn_p_stDefaultProcedureFunctionPointer);
	#endif /* __DEBUG_AI__*/
 
#endif /* OPTIMIZED_COMMAND*/
 
/*******************************************************************************/
#undef EXTERN_AI_DLL
 
#endif /* __CONV_PROC_H__*/
