#if !defined(__CONV_VAR_H__)
#define __CONV_VAR_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
 
/************************************************************************************************************************/
/* DsgVar*/
#if defined(__DEBUG_AI__)
EXTERN_AI_DLL CPA_EXPORT char *szFindDsgVarTypeScriptNameFromId(enum tdeDsgVarTypeId_ eDsgVarTypeId);
#endif
 
#if defined(_AI_LIB_)
tdp_fn_ucGetDsgVarFunctionPtr fn_p_fn_pGetDsgVarGetFunctionPtr(enum tdeDsgVarTypeId_ eDsgVarTypeId);
tdp_fn_ucSetDsgVarFunctionPtr fn_p_fn_pGetDsgVarSetFunctionPtr(enum tdeDsgVarTypeId_ eDsgVarTypeId);
#endif
 
#if defined(ACTIVE_EDITOR)
	EXTERN_AI_DLL CPA_EXPORT enum tdeDsgVarTypeId_ fn_eFindDsgVarTypeIdFromEditorName(char *szDsgVarType);
	EXTERN_AI_DLL CPA_EXPORT char *szFindDsgVarTypeEditorNameFromId(enum tdeDsgVarTypeId_ eDsgVarTypeId);
 
	EXTERN_AI_DLL CPA_EXPORT char *fn_szFindStringTypeFromVariableType(enum tdeVariableType_ eType);
	EXTERN_AI_DLL CPA_EXPORT char *fn_szFindStringTypeFromDsgVarType(enum tdeDsgVarTypeId_ eDsgVarTypeId);
	EXTERN_AI_DLL CPA_EXPORT char *fn_szFindStringSubTypeFromDsgVarType(enum tdeDsgVarTypeId_ eDsgVarTypeId);
#endif /* ACTIVE_EDITOR*/
 
EXTERN_AI_DLL CPA_EXPORT enum tdeVariableType_ fn_GetDsgVarType(enum tdeDsgVarTypeId_ eDsgVarTypeId);
EXTERN_AI_DLL CPA_EXPORT enum tdeDsgVarTypeId_ fn_eFindDsgVarTypeIdFromScriptName(char *szDsgVarType);
EXTERN_AI_DLL CPA_EXPORT enum tdeDsgVarTypeId_ fn_eGetNbDsgVarType();
#define M_IsDsgVarTypeIdValid(eDsgVarTypeId) ((eDsgVarTypeId)<fn_eGetNbDsgVarType())
/*************************************************************************************/
 
/*************************************************************************************/
/* SAI save type*/
EXTERN_AI_DLL CPA_EXPORT unsigned char fn_ucDefaultSaveTypeNumber();
EXTERN_AI_DLL CPA_EXPORT unsigned char fn_ucGetSaveTypeNumber();
EXTERN_AI_DLL CPA_EXPORT char *fn_szFindScriptNameFromSaveTypeNumber(unsigned char ucSaveTypeNumber);
 
#if defined(_AI_LIB_)
	EXTERN_AI_DLL CPA_EXPORT SAI_tdeFlags fn_eFindSaveTypeFromScriptName(char *szSaveType, char *_p_szPersoName, unsigned char _ucVarId);
	EXTERN_AI_DLL CPA_EXPORT SAI_tdeFlags fn_eFindSaveTypeFromSaveTypeNumber(unsigned char ucSaveTypeNumber);
#endif /* _AI_LIB_*/
 
 
#if defined(ACTIVE_EDITOR)
	EXTERN_AI_DLL CPA_EXPORT char *fn_szFindEditorNameFromSaveTypeNumber(unsigned char ucSaveTypeNumber);
	#if defined(_AI_LIB_)
		EXTERN_AI_DLL CPA_EXPORT SAI_tdeFlags fn_eFindSaveTypeFromEditorName(char *szSaveType);
		EXTERN_AI_DLL CPA_EXPORT char *fn_szFindEditorNameFromSaveType(SAI_tdeFlags eFlags);
		EXTERN_AI_DLL CPA_EXPORT char *fn_szFindScriptNameFromSaveType(SAI_tdeFlags eFlags);
		EXTERN_AI_DLL CPA_EXPORT unsigned char fn_ucFindSaveTypeNumberFromScriptName(char *szSaveType);
	#endif /* _AI_LIB_*/
#endif /* ACTIVE_EDITOR*/
/*************************************************************************************/
 
/*************************************************************************************/
/* OTI init type*/
EXTERN_AI_DLL CPA_EXPORT unsigned char fn_ucDefaultInitTypeNumber();
EXTERN_AI_DLL CPA_EXPORT unsigned char fn_ucGetInitTypeNumber();
EXTERN_AI_DLL CPA_EXPORT char *fn_szFindScriptNameFromInitTypeNumber(unsigned char ucInitTypeNumber);
 
#if defined(_AI_LIB_)
	EXTERN_AI_DLL CPA_EXPORT enum tdeObjectTreeInit_ fn_eFindInitTypeFromScriptName(char *szInitType);
	EXTERN_AI_DLL CPA_EXPORT enum tdeObjectTreeInit_ fn_eFindInitTypeFromInitTypeNumber(unsigned char ucInitTypeNumber);
#endif /* _AI_LIB_*/
 
#if defined(ACTIVE_EDITOR)
	EXTERN_AI_DLL CPA_EXPORT char *fn_szFindEditorNameFromInitTypeNumber(unsigned char ucInitTypeNumber);
	#if defined(_AI_LIB_)
		EXTERN_AI_DLL CPA_EXPORT enum tdeObjectTreeInit_ fn_eFindInitTypeFromEditorName(char *szInitType);
		EXTERN_AI_DLL CPA_EXPORT char *fn_szFindEditorNameFromInitType(enum tdeObjectTreeInit_ eFlags);
		EXTERN_AI_DLL CPA_EXPORT char *fn_szFindScriptNameFromInitType(enum tdeObjectTreeInit_ eFlags);
		EXTERN_AI_DLL CPA_EXPORT unsigned char fn_ucFindInitTypeNumberFromScriptName(char *szInitType);
	#endif /* _AI_LIB_*/
#endif /* ACTIVE_EDITOR*/
/*************************************************************************************/
 
/*******************************************************************************/
#undef EXTERN_AI_DLL
 
#endif /* __CONV_VAR_H__*/
