func (d *Disjunction) AddToSeg(seg *capn.Segment) msgs.Condition { disjCap := msgs.NewDisjunction(seg) disjCap.SetLeft(d.Left.AddToSeg(seg)) disjCap.SetRight(d.Right.AddToSeg(seg)) condCap := msgs.NewCondition(seg) condCap.SetOr(disjCap) return condCap }
func (c *Conjunction) AddToSeg(seg *capn.Segment) msgs.Condition { conjCap := msgs.NewConjunction(seg) conjCap.SetLeft(c.Left.AddToSeg(seg)) conjCap.SetRight(c.Right.AddToSeg(seg)) condCap := msgs.NewCondition(seg) condCap.SetAnd(conjCap) return condCap }
func (g *Generator) AddToSeg(seg *capn.Segment) msgs.Condition { genCap := msgs.NewGenerator(seg) genCap.SetRmId(uint32(g.RMId)) genCap.SetUseNext(g.UseNext) genCap.SetIncludes(g.Includes) condCap := msgs.NewCondition(seg) condCap.SetGenerator(genCap) return condCap }