예제 #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;
         }
     }
 }