#if !defined(__CONV_FILD_H__)
#define __CONV_FILD_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
 
/************************************************************************************************************************/
/* Field for editor and/or debugger + readrule.c*/
#if defined(ACTIVE_EDITOR)
	EXTERN_AI_DLL CPA_EXPORT enum tdeFieldId_ fn_eFindFieldIdFromEditorName(char *szField);
	EXTERN_AI_DLL CPA_EXPORT char *szFindFieldScriptNameFromId(enum tdeFieldId_ eFieldId);
	EXTERN_AI_DLL CPA_EXPORT char *szFindFieldEditorNameFromId(enum tdeFieldId_ eFieldId);
#endif /* ACTIVE_EDITOR*/
 
EXTERN_AI_DLL CPA_EXPORT enum tdeVariableType_ fn_eGetFieldType(enum tdeFieldId_ eFieldId);
enum tdeFieldTypeId_ fn_eGetEngineFieldType(enum tdeFieldId_ eFieldId);
EXTERN_AI_DLL CPA_EXPORT enum tdeFieldId_ fn_eFindFieldIdFromScriptName(char *szField);
EXTERN_AI_DLL CPA_EXPORT enum tdeFieldId_ fn_eGetNbField(void);
#define M_IsFieldIdValid(eFieldId) ((eFieldId)<fn_eGetNbField())
 
#if defined(_AI_LIB_)
tdp_fn_vGetTypeFunctionPtr fn_p_fn_pGetFieldTypeGetFunctionPtr(enum tdeFieldTypeId_ eFieldTypeId);
tdp_fn_vSetTypeFunctionPtr fn_p_fn_pGetFieldTypeSetFunctionPtr(enum tdeFieldTypeId_ eFieldTypeId);
tdp_fn_cGetFunctionPtr fn_p_fn_pGetFieldGetFunctionPtr(enum tdeFieldId_ eFieldId);
tdp_fn_cSetFunctionPtr fn_p_fn_pGetFieldSetFunctionPtr(enum tdeFieldId_ eFieldId);
#endif
 
#if !defined(OPTIMIZED_COMMAND)
	
	#if defined(ACTIVE_EDITOR)
		#define M_FIELD_ENTRY(a,b,english,c,d,e,f) a,b,english,c,d,e,f
		void fn_vDefineFieldEntry(enum tdeFieldId_ eFieldId,char *szFieldEditorName,char *szFieldEditorName_En,char *szFieldScriptName,enum tdeFieldTypeId_ eType,tdp_fn_cGetFunctionPtr p_fn_cGetFieldFunction,tdp_fn_cSetFunctionPtr p_fn_cSetFieldFunction);
	#elif defined(_AI_LIB_)
		#define M_FIELD_ENTRY(a,b,english,c,d,e,f) a,c,d,e,f
		void fn_vDefineFieldEntry(enum tdeFieldId_ eFieldId,char *szFieldScriptName,enum tdeFieldTypeId_ eType,tdp_fn_cGetFunctionPtr p_fn_cGetFieldFunction,tdp_fn_cSetFunctionPtr p_fn_cSetFieldFunction);
	#endif /* ACTIVE_EDITOR*/
 
	#if defined(__DEBUG_AI__)
		void fn_vInitFieldTable(tdp_fn_cGetFunctionPtr fn_cGetFieldDefaultFunctionPointer,tdp_fn_cSetFunctionPtr fn_cSetFieldDefaultFunctionPointer);
		void fn_vCheckFieldTable(tdp_fn_cGetFunctionPtr fn_cGetFieldDefaultFunctionPointer,tdp_fn_cSetFunctionPtr fn_cSetFieldDefaultFunctionPointer);
	#endif /* __DEBUG_AI__*/
 
#endif /* OPTIMIZED_COMMAND*/
 
 
/*******************************************************************************/
#undef EXTERN_AI_DLL
 
#endif /* __CONV_FILD_H__*/
