예제 #1
0
 /// <summary>
 /// Returns a list that shows how each instruction will be processed
 /// </summary>
 /// <returns></returns>
 public Instruction.ProcessedAs[] getInstructionMap()
 {
     Instruction.ProcessedAs[] processMap = new Instruction.ProcessedAs[instructions.Count];
     for (int i = 0; i < instructions.Count; i++)
     {
         if (instructions[i] != null)
         {
             ProcessContext context = new ProcessContext(this, i);
             instructions[i].updateInstructionMap(context, ref processMap);
         }
     }
     return(processMap);
 }
예제 #2
0
    public Color getColor(Instruction.ProcessedAs pa)
    {
        switch (pa)
        {
        case Instruction.ProcessedAs.COMMAND:
            return(commandColor);

        case Instruction.ProcessedAs.CONSTANT:
            return(constantColor);

        case Instruction.ProcessedAs.DO_NOTHING:
            return(doNothingColor);

        case Instruction.ProcessedAs.QUERY:
            return(queryColor);

        default:
            return(doNothingColor);
        }
    }