예제 #1
0
        /// /////////////////////////////////////////////////
        protected override List <COperateurAnalysable> GetOperateursDynamiqueNiveau(int nNiveau, string strMot)
        {
            List <COperateurAnalysable> lst = new List <COperateurAnalysable>();

            if (nNiveau == 0 && strMot.StartsWith(":"))
            {
                string strTmp = strMot.Substring(1);
                if (CUtilUnite.GetIdClasseUnite(strTmp) != null)
                {
                    COperateurAnalysable operateur = new COperateurAnalysable(0,
                                                                              ":" + strTmp, ":" + strTmp, false);
                    lst.Add(operateur);
                }
            }
            return(lst);
        }
예제 #2
0
        /// //////////////////////////////////////////////////////////////
        public IExpression GetExpression(string strIdExpression)
        {
            Type tp = (Type)m_tableTypesExpression[strIdExpression];

            if (tp == null)
            {
                if (strIdExpression.StartsWith(":"))//Une unité ?
                {
                    if (CUtilUnite.GetIdClasseUnite(strIdExpression.Substring(1)) != null)
                    {
                        return(new C2iExpressionConvertUnit(strIdExpression.Substring(1)));
                    }
                }
                return(null);
            }
#if PDA
            return((IExpression)Activator.CreateInstance(tp));
#else
            return((IExpression)Activator.CreateInstance(tp, new object[0]));
#endif
        }