Exemplo n.º 1
0
        /// <summary>
        /// Creates a Plan.
        /// </summary>
        /// <param name="transfomer">The state transformer that this plan represents.</param>
        /// <param name="parentPlans">The parent plans for this plan.</param>
        /// <param name="parameterChoosers">The parameter choosers for the parent plans.</param>
        /// <param name="resultTypes">The types (and number of) results that executing this plan yields.</param>
        public Plan(Transformer transfomer, Plan[] parentPlans, ParameterChooser[] parameterChoosers)
        {
            CanGenerateContractAssertion = new ContractState();
            UniqueId         = UniqueIdCounter++;
            transformer      = transfomer;
            this.parentPlans = parentPlans;

            this.parameterChoosers = parameterChoosers;
            activeTupleElements    = transformer.DefaultActiveTupleTypes;

            resultElementProperties = new ResultElementExecutionProperties[this.activeTupleElements.Length];
            for (int i = 0; i < resultElementProperties.Length; i++)
            {
                resultElementProperties[i] = new ResultElementExecutionProperties();
            }

            treeNodes = 1;
            foreach (Plan p in parentPlans)
            {
                treeNodes += p.treeNodes;
            }
        }
Exemplo n.º 2
0
 public void SetResultElementProperty(int i, ResultElementExecutionProperties value)
 {
     Util.Assert(i >= 0 && i < resultElementProperties.Length);
     Util.Assert(((this.transformer is ConstructorCallTransformer) ? i != 0 : true));
     resultElementProperties[i] = value;
 }
Exemplo n.º 3
0
 public void SetResultElementProperty(int i, ResultElementExecutionProperties value)
 {
     Util.Assert(i >= 0 && i < resultElementProperties.Length);
     Util.Assert(transformer is ConstructorCallTransformer ? i != 0 : true);
     resultElementProperties[i] = value;
 }