コード例 #1
0
ファイル: BinaryOperation.cs プロジェクト: dbremner/Cortex
 public override void Build(IGraphBuilder builder)
 {
     //do nothing
       //we can do the linkage here
       if(OnFalseHook != null)
     builder.Link(Index, OnFalseHook.First().Index, "[label = \"f\"]");
       if(OnTrueHook != null)
     builder.Link(Index, OnTrueHook.First().Index, "[label = \"t\"]");
 }
コード例 #2
0
 public override void Build(IGraphBuilder builder)
 {
     //do nothing
     //we can do the linkage here
     if (OnFalseHook != null)
     {
         builder.Link(Index, OnFalseHook.First().Index, "[label = \"f\"]");
     }
     if (OnTrueHook != null)
     {
         builder.Link(Index, OnTrueHook.First().Index, "[label = \"t\"]");
     }
 }
コード例 #3
0
 public override void Build(IGraphBuilder builder)
 {
     if (OnTrueHook != null)
     {
         builder.Link(Index, OnTrueHook.Index, string.Empty);
     }
 }
コード例 #4
0
ファイル: BooleanOperation.cs プロジェクト: DrItanium/Cortex
        private void BuildCondition(Operation v0, IGraphBuilder builder)
        {
            string trueLabel  = "[label = \"t\"]";
            string falseLabel = "[label = \"f\"]";

            if (v0.OnFalseHook == null)
            {
                trueLabel = string.Empty;
            }
            if (v0.OnTrueHook != null)
            {
                builder.Link(v0.Index, v0.OnTrueHook.Index, trueLabel);
            }
            if (v0.OnFalseHook != null)
            {
                builder.Link(v0.Index, v0.OnFalseHook.Index, falseLabel);
            }
        }
コード例 #5
0
 private void BuildCondition(Operation v0,  IGraphBuilder builder)
 {
     string trueLabel = "[label = \"t\"]";
     string falseLabel = "[label = \"f\"]";
     if(v0.OnFalseHook == null)
         trueLabel = string.Empty;
     if(v0.OnTrueHook != null)
         builder.Link(v0.Index, v0.OnTrueHook.Index, trueLabel);
     if(v0.OnFalseHook != null)
         builder.Link(v0.Index, v0.OnFalseHook.Index, falseLabel);
 }
コード例 #6
0
ファイル: StandardOperation.cs プロジェクト: dbremner/Cortex
 public override void Build(IGraphBuilder builder)
 {
     if(OnTrueHook != null)
     builder.Link(Index, OnTrueHook.Index, string.Empty);
 }