private StringFunctions(StringFunctions other) : base(other) {
     this.funcType = other.funcType;
     Query[] tmp = new Query[other.argList.Count]; {                
         for (int i = 0; i < tmp.Length; i ++) {
             tmp[i] = Clone(other.argList[i]);
         }
     }
     this.argList = tmp; 
 }
 private StringFunctions(StringFunctions other) : base(other)
 {
     this.funcType = other.funcType;
     Query[] queryArray = new Query[other.argList.Count];
     for (int i = 0; i < queryArray.Length; i++)
     {
         queryArray[i] = Query.Clone(other.argList[i]);
     }
     this.argList = queryArray;
 }
 private StringFunctions(StringFunctions other) : base(other)
 {
     this.funcType = other.funcType;
     Query[] tmp = new Query[other.argList.Count]; {
         for (int i = 0; i < tmp.Length; i++)
         {
             tmp[i] = Clone(other.argList[i]);
         }
     }
     this.argList = tmp;
 }
Пример #4
0
        /// <summary>
        ///   Creates a new function in this program.
        /// </summary>
        /// <param name="name"> The name of the function to create </param>
        /// <param name="desc"> The description of the function </param>
        /// <param name="functionType"> </param>
        /// <returns> The newly created function instance </returns>
        public Function CreateFunction(string name, string desc, Function.FunctionType functionType)
        {
            Function shaderFunction = GetFunctionByName(name);

            if (shaderFunction != null)
            {
                throw new Axiom.Core.AxiomException("Function " + name + " already declared in program.");
            }

            shaderFunction = new Function(name, desc, functionType);
            this.functions.Add(shaderFunction);

            return(shaderFunction);
        }
        /// <summary>
        /// Рассчитывает значение функции и привязывает его к необходимому объекту.
        /// </summary>
        /// <returns>Возвращает значение функции в строковом виде.</returns>
        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            try
            {
                double a             = double.Parse(values[0].ToString());
                double b             = double.Parse(values[1].ToString());
                int    c             = int.Parse(values[2].ToString());
                double x             = double.Parse(values[3].ToString());
                double y             = double.Parse(values[4].ToString());
                int    functionIndex = int.Parse(values[5].ToString());
                Function.FunctionType functionType = Function.GetFunctionTypeFromIndex(functionIndex);

                var    function      = new Function(x, y);
                double functionValue = function.Calculate(a, b, c, functionType);
                return(functionValue.ToString("0.00", CultureInfo.InvariantCulture));
            }
            catch
            {
                return(double.NaN);
            }
        }
Пример #6
0
 internal BooleanFunctions(IQuery qy, FT ftype)
 {
     _qy = qy;
     _FuncType = ftype;
 }
Пример #7
0
 public NumberFunctions(IQuery qy) {
     _qy = qy;
     _FuncType = FT.FuncNumber;
 }
Пример #8
0
 public StringFunctions(ArrayList qy, FT funcType)
 {
     this.argList  = qy;
     this.funcType = funcType;
 }
Пример #9
0
 public NumberFunctions(Query qy,
                        Function.FunctionType FType)
 {
     _Qy       = qy;
     _FuncType = FType;
 }
Пример #10
0
 public StringFunctions(Function.FunctionType funcType, IList <Query> argList)
 {
     Debug.Assert(argList != null, "Use 'new Query[]{}' instead.");
     _funcType = funcType;
     _argList  = argList;
 }
Пример #11
0
 internal MethodOperand(IQuery opnd, FT funcType)
 {
     this.funcType = funcType;
     this.opnd     = opnd;
 }
Пример #12
0
 internal BooleanFunctions(Query qy, Function.FunctionType FType)
 {
     _Qy       = qy;
     _FuncType = FType;
 }
 public NumberFunctions(Function.FunctionType ftype, Query arg)
 {
     this.arg = arg;
     this.ftype = ftype;
 }
 private NumberFunctions(NumberFunctions other) : base(other)
 {
     this.arg = Query.Clone(other.arg);
     this.ftype = other.ftype;
 }
Пример #15
0
 internal BooleanFunctions(IQuery qy)
 {
     _qy       = qy;
     _FuncType = FT.FuncBoolean;
 }
Пример #16
0
 internal BooleanFunctions(IQuery qy, FT ftype)
 {
     _qy       = qy;
     _FuncType = ftype;
 }
Пример #17
0
 public NumberFunctions(IQuery qy)
 {
     _qy       = qy;
     _FuncType = FT.FuncNumber;
 }
Пример #18
0
 public NumberFunctions(IQuery qy,
                        FT ftype)
 {
     _qy       = qy;
     _FuncType = ftype;
 }
Пример #19
0
 public BooleanFunctions(Function.FunctionType funcType, Query arg)
 {
     this.arg      = arg;
     this.funcType = funcType;
 }
Пример #20
0
 public void SetCurrentFunctionType(Function.FunctionType functionType)
 {
     function.CurrentFunctionType = functionType;
 }
Пример #21
0
 private NumberFunctions(NumberFunctions other) : base(other)
 {
     this.arg   = Query.Clone(other.arg);
     this.ftype = other.ftype;
 }
Пример #22
0
 internal BooleanFunctions(Query qy)
 {
     _Qy       = qy;
     _FuncType = Function.FunctionType.FuncBoolean;
 }
Пример #23
0
 public NumberFunctions(Function.FunctionType ftype, Query arg)
 {
     this.arg   = arg;
     this.ftype = ftype;
 }
Пример #24
0
 public StringFunctions(Function.FunctionType funcType, IList <Query> argList)
 {
     this.funcType = funcType;
     this.argList  = argList;
 }
Пример #25
0
 public NodeFunctions(Function.FunctionType funcType, Query arg)
 {
     this.funcType = funcType;
     this.arg      = arg;
 }
Пример #26
0
 internal ParamInfo(Function.FunctionType ftype, int minargs, int maxargs, XPathResultType[] argTypes)
 {
     _ftype = ftype;
     _minargs = minargs;
     _maxargs = maxargs;
     _argTypes = argTypes;
 }
 private BooleanFunctions(BooleanFunctions other) : base(other)
 {
     this.arg = Query.Clone(other.arg);
     this.funcType = other.funcType;
 }
Пример #28
0
 public NumberFunctions(Query qy)
 {
     _Qy       = qy;
     _FuncType = Function.FunctionType.FuncNumber;
 }
 internal ParamInfo(Function.FunctionType ftype, int minargs, int maxargs, XPathResultType[] argTypes)
 {
     this.ftype = ftype;
     this.minargs = minargs;
     this.maxargs = maxargs;
     this.argTypes = argTypes;
 }
Пример #30
0
 internal MethodOperand(IQuery opnd, FT funcType){
     this.funcType = funcType;
     this.opnd = opnd;
 }
 public StringFunctions(Function.FunctionType funcType, IList<Query> argList)
 {
     this.funcType = funcType;
     this.argList = argList;
 }
 public BooleanFunctions(Function.FunctionType funcType, Query arg)
 {
     this.arg = arg;
     this.funcType = funcType;
 }
Пример #33
0
        //private Query _Operand;

        #endregion

        #region Constructors

        internal MethodOperand(Query Operand, Function.FunctionType FuncType) => _FuncType = FuncType;//_Operand = operand;
Пример #34
0
 public NumberFunctions(IQuery qy,
                          FT ftype) {
     _qy = qy;
     _FuncType = ftype;
 }
 public NodeFunctions(Function.FunctionType funcType, Query arg)
 {
     this.funcType = funcType;
     this.arg = arg;
 }
Пример #36
0
 public StringFunctions(ArrayList qy, FT funcType){
     this.argList = qy;
     this.funcType = funcType;
 }
Пример #37
0
 public StringFunctions(Function.FunctionType funcType, IList<Query> argList) {
     Debug.Assert(argList != null, "Use 'new Query[]{}' instead.");
     this.funcType = funcType;
     this.argList = argList;
 }
Пример #38
0
 internal BooleanFunctions(IQuery qy)
 {
     _qy = qy;
     _FuncType = FT.FuncBoolean;
 }
Пример #39
0
 private BooleanFunctions(BooleanFunctions other) : base(other)
 {
     this.arg      = Query.Clone(other.arg);
     this.funcType = other.funcType;
 }