#if !defined(__CONV_KEY_H__)
#define __CONV_KEY_H__
 
#include "..\AIBase\specif\AiOption.h"
#ifdef CODEWARRIOR
#include"AI\AIGame\TypePtr.h"
#endif
 
/**************************************/
#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
 
/************************************************************************************************************************/
/* KeyWord for editor and/or debugger + readrule.c*/
#if defined(ACTIVE_EDITOR) || defined (U64_AIDEBUG)
	EXTERN_AI_DLL CPA_EXPORT char *szGetKeyWordTypeInParamFromId(enum tdeKeyWordId_ eKeyWordId);
	EXTERN_AI_DLL CPA_EXPORT char *szGetKeyWordTypeOutParamFromId(enum tdeKeyWordId_ eKeyWordId);
#endif /* ACTIVE_EDITOR || defined (U64_AIDEBUG)*/
 
#if defined(ACTIVE_EDITOR)
	EXTERN_AI_DLL CPA_EXPORT char *szFindKeyWordScriptNameFromId(enum tdeKeyWordId_ eKeyWordId);
	EXTERN_AI_DLL CPA_EXPORT char *szFindKeyWordEditorNameFromId(enum tdeKeyWordId_ eKeyWordId);
	EXTERN_AI_DLL CPA_EXPORT enum tdeKeyWordId_ fn_eFindKeyWordIdFromEditorName(char *szKeyWord);
#endif /* ACTIVE_EDITOR*/
 
EXTERN_AI_DLL CPA_EXPORT enum tdeKeyWordId_ fn_eFindKeyWordIdFromScriptName(char *szKeyWord);
EXTERN_AI_DLL CPA_EXPORT enum tdeKeyWordId_ fn_eGetNbKeyWord();
#define M_IsKeyWordIdValid(eKeyWordId) ((eKeyWordId)<fn_eGetNbKeyWord())
 
#if defined(_AI_LIB_)
	tdp_fn_p_stKeyWordFunctionPtr fn_p_fn_pGetKeyWordFunctionPtr(enum tdeKeyWordId_ eKeyWordId);
#endif /* _AI_LIB_*/
 
#if !defined(OPTIMIZED_COMMAND)
 
	#if defined(ACTIVE_EDITOR)
		#define M_KEYWORD_ENTRY(a,b,g,c,d,e,f) a,b,g,c,d,e,f
		void fn_vDefineKeyWordEntry(enum tdeKeyWordId_ eKeyWordId,char *szKeyWordEditorName,char *szKeyWordEditorName_En,char *szKeyWordScriptName,tdp_fn_p_stKeyWordFunctionPtr p_fn_p_stKeyWordFunction,char *szKeyWordTypeInParam,char *szKeyWordTypeOutParam);				
	#elif defined(_AI_LIB_)
		#define M_KEYWORD_ENTRY(a,b,g,c,d,e,f) a,c,d,e,f
		void fn_vDefineKeyWordEntry(enum tdeKeyWordId_ eKeyWordId,char *szKeyWordScriptName,tdp_fn_p_stKeyWordFunctionPtr p_fn_p_stKeyWordFunction,char *szKeyWordTypeInParam,char *szKeyWordTypeOutParam);				
	#endif /* ACTIVE_EDITOR _AI_LIB_*/
 
	#if defined(__DEBUG_AI__)
		void fn_vInitKeyWordTable(tdp_fn_p_stKeyWordFunctionPtr fn_p_stDefaultKeyWordFunctionPointer);
		void fn_vCheckKeyWordTable(tdp_fn_p_stKeyWordFunctionPtr fn_p_stDefaultKeyWordFunctionPointer);
	#endif /* __DEBUG_AI__*/
 
#endif /* OPTIMIZED_COMMAND*/
 
 
/*******************************************************************************/
#undef EXTERN_AI_DLL
 
#endif /* __CONV_KEY_H__*/
