Пример #1
0
        public override object Visit(PairwiseModel model)
        {
            if (model != this.model)
            {
                throw new ArgumentException("Can't generate for a different model!");
            }

            using (StringWriter sw = new StringWriter(PictConstants.Culture))
            {
                sw.Write(GetComment(model));
                foreach (PairwiseParameter p in model.Parameters)
                {
                    sw.WriteLine(this.GetParameterLine(p));
                }

                sw.WriteLine();
                foreach (PairwiseSubModel sub in model.SubModels)
                {
                    sw.WriteLine(sub.Accept(this));
                }

                sw.WriteLine();
                foreach (PairwiseIfThenConstraint rule in model.IfThenConstraints)
                {
                    sw.WriteLine(rule.Accept(this));
                }

                foreach (PairwiseCondition cond in model.ParameterConstraints)
                {
                    sw.Write(GetComment(cond));
                    sw.WriteLine(cond.Accept(this) + ";");
                }

                return(sw.ToString());
            }
        }
Пример #2
0
 public PairwiseModelLookupContext(PairwiseModel model, PairwiseSettings settings)
 {
     this.parameters = new PairwiseParameterCollection(model.Parameters);
     this.settings   = settings;
 }
Пример #3
0
 public PictPairwiseVisitor(PairwiseModel model, PairwiseSettings settings)
 {
     this.model    = model;
     this.settings = settings;
     this.context  = model.CreateLookupContext(settings);
 }
Пример #4
0
 public abstract object Visit(PairwiseModel model);