示例#1
0
        protected override void InnerEvaluate()
        {
            bool runner = false;

            Decider.Evaluate(out runner);
            while (runner)
            {
                foreach (var n in Whilenodes)
                {
                    bool s = false;
                    n.Evaluate(out s);
                }
                Decider.Evaluate(out runner);
            }
        }
示例#2
0
        protected override void InnerEvaluate()
        {
            bool b = false;

            Decider.Evaluate(out b);
            if (b)
            {
                foreach (var n in IfNodes)
                {
                    bool s = false;
                    n.Evaluate(out s);
                }
            }
            else
            {
                //Else Zweig
                if (ElseNodes != null)
                {
                    foreach (var n in ElseNodes)
                    {
                        bool s = false;
                        n.Evaluate(out s);
                    }
                }
            }
        }
示例#3
0
        protected override void InnerEvaluate()
        {
            bool runner = false;
            bool nix    = false;

            InitNode.Evaluate(out nix);

            Decider.Evaluate(out runner);
            while (runner)
            {
                foreach (var n in ForNodes)
                {
                    bool s = false;
                    n.Evaluate(out s);
                }

                Iteration.Evaluate(out nix);
                Decider.Evaluate(out runner);
            }
        }
示例#4
0
        protected void EqualEvaluate()
        {
            if (typeof(T1) == typeof(int))
            {
                int a = 0;
                Left.Evaluate(out a);
                if (typeof(T2) == typeof(int))
                {
                    int b = 0;
                    Right.Evaluate(out b);
                    this.Content = (a == b);
                }
                else if (typeof(T2) == typeof(double))
                {
                    double b = 0;
                    Right.Evaluate(out b);
                    this.Content = a == b;
                }
            }

            if (typeof(T1) == typeof(double))
            {
                double a = 0.0;
                Left.Evaluate(out a);

                if (typeof(T2) == typeof(double))
                {
                    double b = 0.0;
                    Right.Evaluate(out b);
                    this.Content = a == b;
                }
            }

            if (typeof(T1) == typeof(bool))
            {
                bool a = false;
                Left.Evaluate(out a);

                if (typeof(T2) == typeof(bool))
                {
                    bool b = false;
                    Right.Evaluate(out b);
                    this.Content = a == b;
                }
            }
        }
示例#5
0
 protected override void InnerEvaluate()
 {
     if (typeof(T) == typeof(int))
     {
         int i = 0;
         OrgContentNode.Evaluate(out i);
         this.Content = (T)(object)i;
     }
     else if (typeof(T) == typeof(double))
     {
         double d = 0;
         OrgContentNode.Evaluate(out d);
         this.Content = (T)(object)d;
     }
     else if (typeof(T) == typeof(string))
     {
         string s = "";
         OrgContentNode.Evaluate(out s);
         this.Content = (T)(object)s;
     }
     else if (typeof(T) == typeof(bool))
     {
         if (typeof(O) == typeof(int))
         {
             int i = 0;
             OrgContentNode.Evaluate(out i);
             this.Content = (T)(object)(i != 0);
         }
         else if (typeof(O) == typeof(double))
         {
             double d = 0;
             OrgContentNode.Evaluate(out d);
             this.Content = (T)(object)(Math.Abs(d) > Double.Epsilon);
         }
         else
         {
             bool b = false;
             OrgContentNode.Evaluate(out b);
             this.Content = (T)(object)b;
         }
     }
 }