Ejemplo n.º 1
0
        public static TREE GenerateEmpty(BHAV bhav)
        {
            var result = new TREE();

            result.ChunkLabel     = "";
            result.ChunkID        = bhav.ChunkID;
            result.AddedByPatch   = true;
            result.ChunkProcessed = true;
            result.RuntimeInfo    = ChunkRuntimeState.Modified;
            result.ChunkType      = "TREE";

            result.CorrectConnections(bhav);
            return(result);

            /*
             * var additionID = bhav.Instructions.Length;
             *
             * Func<byte, short> resolveTrueFalse = (byte pointer) =>
             * {
             *  switch (pointer)
             *  {
             *      case 253:
             *          return -1;
             *      case 255:
             *          //generate false
             *      case 254:
             *          //generate true
             *  }
             *  if (pointer == 255) return -1;
             *  else if (pointer == 2)
             * };
             *
             * //make an entry for each instruction. positions and sizes don't matter - we have a runtime flag to indicate they are not valid
             * for (int i=0; i<bhav.Instructions.Length; i++)
             * {
             *  var inst = bhav.Instructions[i];
             *  var box = new TREEBox(result);
             *  box.InternalID = i;
             *  box.PosisionInvalid = true;
             *  box.Type = TREEBoxType.Primitive;
             *  box.TruePointer =
             * }
             */
        }
Ejemplo n.º 2
0
 public TREEBox(TREE parent)
 {
     Parent = parent;
 }