private void PopulateInterp( NvdlDispatcher d, NvdlInterpretation i, NvdlSection parentState) { SimpleMode m = FindContextMode(i.Action, parentState); SimpleRule rule = FindElementRule(m, dispatcher.Reader); NvdlDebug.Writer.WriteLine("***** populate interp from action {0} whose mode is {1}. Rule is {2} whose actions are {3}", i.Action.Location, m.Location, rule.Location, rule.Actions.Length); foreach (SimpleAction a in rule.Actions) { NvdlInterpretation cur = i; for (; cur != null; cur = cur.Parent) { if (cur.CreatedMode == m && cur.Action == a) { NvdlDebug.Writer.WriteLine("------- corresponding PlanElem already exists."); break; } } if (cur == null) { cur = CreateInterp(d, m, a, i); } ilist.Add(cur); } }
public NvdlInterpretation(NvdlDispatcher dispatcher, SimpleMode createdMode, SimpleAction action, NvdlInterpretation parent) { this.dispatcher = dispatcher; this.createdMode = createdMode; this.action = action; this.parent = parent; }
public NvdlValidateInterp(NvdlDispatcher dispatcher, SimpleMode createdMode, SimpleValidate validate, NvdlInterpretation parent) : base(dispatcher, createdMode, validate, parent) { this.reader = new NvdlFilteredXmlReader(dispatcher.Reader, this); this.validate = validate; validator = validate.CreateValidator(this.reader); dispatcher.Validator.OnMessage(validate.Messages); }
private NvdlInterpretation CreateInterp(NvdlDispatcher d, SimpleMode m, SimpleAction a, NvdlInterpretation p) { SimpleValidate v = a as SimpleValidate; if (v != null) { return(new NvdlValidateInterp(d, m, v, p)); } return(new NvdlResultInterp(d, m, (SimpleResultAction)a, p)); }
private NvdlInterpretation CreateInterp(NvdlDispatcher d, SimpleMode m, SimpleAction a, NvdlInterpretation p) { NvdlDebug.Writer.WriteLine("***** new interp from action {0} from mode {1}", a.Location, m.Location); SimpleValidate v = a as SimpleValidate; if (v != null) { return(new NvdlValidateInterp(d, m, v, p)); } return(new NvdlResultInterp(d, m, (SimpleResultAction)a, p)); }
public NvdlResultInterp(NvdlDispatcher dispatcher, SimpleMode createdMode, SimpleResultAction resultAction, NvdlInterpretation parent) : base(dispatcher, createdMode, resultAction, parent) { NvdlDebug.Writer.WriteLine("++++++ new resultAction " + resultAction.Location); type = resultAction.ResultType; if (type == NvdlResultType.AttachPlaceholder && parent != null) { parent.AttachPlaceholder(); } }
private void PopulateInterp( NvdlDispatcher d, NvdlInterpretation i, NvdlSection parentState) { SimpleMode m = FindContextMode(i.Action, parentState); SimpleRule rule = FindElementRule(m, dispatcher.Reader); foreach (SimpleAction a in rule.Actions) { NvdlInterpretation cur = i; for (; cur != null; cur = cur.Parent) { if (cur.CreatedMode == m && cur.Action == a) { break; } } if (cur == null) { cur = CreateInterp(d, m, a, i); } ilist.Add(cur); } }
public void Remove(NvdlInterpretation i) { List.Remove(i); }
public void Add(NvdlInterpretation i) { List.Add(i); }
public NvdlValidateInterp (NvdlDispatcher dispatcher, SimpleMode createdMode, SimpleValidate validate, NvdlInterpretation parent) : base (dispatcher, createdMode, validate, parent) { NvdlDebug.Writer.WriteLine ("++++++ new validate " + validate.Location); this.reader = new NvdlFilteredXmlReader (dispatcher.Reader, this); this.validate = validate; validator = validate.CreateValidator (this.reader); dispatcher.Validator.OnMessage (validate.Messages); }
public NvdlResultInterp (NvdlDispatcher dispatcher, SimpleMode createdMode, SimpleResultAction resultAction, NvdlInterpretation parent) : base (dispatcher, createdMode, resultAction, parent) { NvdlDebug.Writer.WriteLine ("++++++ new resultAction " + resultAction.Location); type = resultAction.ResultType; if (type == NvdlResultType.AttachPlaceholder && parent != null) parent.AttachPlaceholder (); }
public NvdlInterpretation (NvdlDispatcher dispatcher, SimpleMode createdMode, SimpleAction action, NvdlInterpretation parent) { this.dispatcher = dispatcher; this.createdMode = createdMode; this.action = action; this.parent = parent; }
public void Remove (NvdlInterpretation i) { List.Remove (i); }
public void Add (NvdlInterpretation i) { List.Add (i); }
private void PopulateInterp ( NvdlDispatcher d, NvdlInterpretation i, NvdlSection parentState) { SimpleMode m = FindContextMode (i.Action, parentState); SimpleRule rule = FindElementRule (m, dispatcher.Reader); NvdlDebug.Writer.WriteLine ("***** populate interp from action {0} whose mode is {1}. Rule is {2} whose actions are {3}", i.Action.Location, m.Location, rule.Location, rule.Actions.Length); foreach (SimpleAction a in rule.Actions) { NvdlInterpretation cur = i; for (;cur != null; cur = cur.Parent) if (cur.CreatedMode == m && cur.Action == a) { NvdlDebug.Writer.WriteLine ("------- corresponding PlanElem already exists."); break; } if (cur == null) cur = CreateInterp (d, m, a, i); ilist.Add (cur); } }
private NvdlInterpretation CreateInterp (NvdlDispatcher d, SimpleMode m, SimpleAction a, NvdlInterpretation p) { NvdlDebug.Writer.WriteLine ("***** new interp from action {0} from mode {1}", a.Location, m.Location); SimpleValidate v = a as SimpleValidate; if (v != null) return new NvdlValidateInterp (d, m, v, p); return new NvdlResultInterp (d, m, (SimpleResultAction) a, p); }