#if defined(_AI_LIB_) #include "AIUseCPA.h" #include "specif/AIOption.h" #include "AIMacros.h" #include "AI_Erm.h" #include "Convert.h" #include "EnumOper.h" #if defined(OPTIMIZED_COMMAND) #include "ProtOper.h" #endif #else #include #include "specif/AIOption.h" #include "ConvCst.h" #include "EnumOper.h" #include "ConvOper.h" #endif /* _AI_LIB_*/ #define C_MAX_SIZE_OPERATOR_EDITOR_NAME 4 #define C_MAX_SIZE_OPERATOR_SCRIPT_NAME 26 #define C_MAX_OPERATOR_NB_IN_PARAM 2 #define C_MAX_OPERATOR_NB_OUT_PARAM 1 typedef struct tdstOperatorEntry_ { #if defined(ACTIVE_EDITOR) /* Operator string used in editor*/ char szOperatorEditorName[C_MAX_SIZE_OPERATOR_EDITOR_NAME+1]; #endif /* ACTIVE_EDITOR*/ #if defined (AI_USE_SCRIPT) /* Operator string used in script*/ char szOperatorScriptName[C_MAX_SIZE_OPERATOR_SCRIPT_NAME+1]; #endif /* AI_USE_SCRIPT */ #if defined(_AI_LIB_) /* pointer on Operator function*/ tdp_fn_p_stOperatorFunctionPtr p_fn_p_stOperatorFunction; #endif /* _AI_LIB_*/ #if defined(ACTIVE_EDITOR) /* list of Operator parameters (taken from szAutorizedTypeParam) in parameter*/ char szOperatorTypeInParam[C_MAX_OPERATOR_NB_IN_PARAM+1]; /* out parameter*/ char szOperatorTypeOutParam[C_MAX_OPERATOR_NB_OUT_PARAM+1]; #endif /* ACTIVE_EDITOR*/ } tdstOperatorEntry; tdstOperatorEntry a_stOperatorTable[eNbOperator] #if defined(OPTIMIZED_COMMAND) = { #if defined (AI_USE_SCRIPT) /* Conditions initialisation*/ #if defined(_AI_LIB_) #if defined(ACTIVE_EDITOR) #define M_DEFINE_OPERATOR(a,b,c,d,e,f) { b,c,d,e,f }, #else #define M_DEFINE_OPERATOR(a,b,c,d,e,f) { c,d }, #endif /* ACTIVE_EDITOR*/ #else #if defined(ACTIVE_EDITOR) #define M_DEFINE_OPERATOR(a,b,c,d,e,f) { b,c,e,f }, #else #define M_DEFINE_OPERATOR(a,b,c,d,e,f) { c }, #endif /* ACTIVE_EDITOR*/ #endif #include "DefOper.h" #undef M_DEFINE_OPERATOR } #else /* AI_USE_SCRIPT */ /* Conditions initialisation*/ #if defined(_AI_LIB_) #if defined(ACTIVE_EDITOR) #define M_DEFINE_OPERATOR(a,b,c,d,e,f) { b,d }, #else #define M_DEFINE_OPERATOR(a,b,c,d,e,f) { d }, #endif /* ACTIVE_EDITOR*/ #else #if defined(ACTIVE_EDITOR) #define M_DEFINE_OPERATOR(a,b,c,d,e,f) { b }, #else #define M_DEFINE_OPERATOR(a,b,c,d,e,f) { }, #endif /* ACTIVE_EDITOR*/ #endif #include "DefOper.h" #undef M_DEFINE_OPERATOR } #endif /* AI_USE_SCRIPT */ #endif /* OPTIMIZED_COMMAND*/ ; #ifndef _FIRE_DEADCODE_U64_ /* Added by RUC */ enum tdeOperatorId_ fn_eGetNbOperator() { return(eNbOperator); } #endif /* _FIRE_DEADCODE_U64_ */ /* Added by RUC */ #if defined(_AI_LIB_) tdp_fn_p_stOperatorFunctionPtr fn_p_fn_pGetOperatorFunctionPtr(enum tdeOperatorId_ eOperatorId) { return(a_stOperatorTable[eOperatorId].p_fn_p_stOperatorFunction); } #endif /* _AI_LIB_*/ #if defined(ACTIVE_EDITOR) char *szGetOperatorTypeInParamFromId(enum tdeOperatorId_ eOperatorId) { return(a_stOperatorTable[eOperatorId].szOperatorTypeInParam); } char *szGetOperatorTypeOutParamFromId(enum tdeOperatorId_ eOperatorId) { return(a_stOperatorTable[eOperatorId].szOperatorTypeOutParam); } enum tdeOperatorId_ fn_eFindOperatorIdFromEditorName(char *szOperator) { short wOperatorEntry; for(wOperatorEntry=0;wOperatorEntrylMaxLengthScriptName) { lMaxLengthScriptName=lLen; } #if defined(ACTIVE_EDITOR) if ((lLen=strlen(a_stOperatorTable[wOperatorEntry].szOperatorEditorName))>lMaxLengthEditorName) { lMaxLengthEditorName=lLen; } if ((lLen=strlen(a_stOperatorTable[wOperatorEntry].szOperatorTypeInParam))>lMaxLengthInParam) { lMaxLengthInParam=lLen; } if ((lLen=strlen(a_stOperatorTable[wOperatorEntry].szOperatorTypeOutParam))>lMaxLengthOutParam) { lMaxLengthOutParam=lLen; } #endif /* ACTIVE_EDITOR*/ } #if !defined(U64) { if (lMaxLengthScriptName