public Event Clone() { Trigger tc = (trigger == null ? null : trigger.Clone()); Intention ic = (intention == null ? null : intention.Clone()); return(new Event(tc, ic)); }
public Intention Clone() { Intention i = new Intention(); i.id = id; i.atomicCount = atomicCount; i.plans = new List <IntendedPlan>(); foreach (IntendedPlan ip in plans) { i.plans.Add((IntendedPlan)ip.Clone()); } return(i); }
// Implements atomic intentions greater than non-atomic intentions public int CompareTo(Intention o) { if (o.atomicCount > atomicCount) { return(1); } if (atomicCount > o.atomicCount) { return(-1); } if (o.id > id) { return(1); } if (id > o.id) { return(-1); } return(0); }
// Used by fork public void CopyTo(Intention i) { i.atomicCount = atomicCount; i.plans = new List <IntendedPlan>(plans); }
public Event(Trigger t, Intention i) { trigger = t; intention = i; }
public void SetIntention(Intention i) { intention = i; }