コード例 #1
0
ファイル: Event.cs プロジェクト: nasa03/Jasonity
        public Event Clone()
        {
            Trigger   tc = (trigger == null ? null : trigger.Clone());
            Intention ic = (intention == null ? null : intention.Clone());

            return(new Event(tc, ic));
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        // 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);
        }
コード例 #4
0
 // Used by fork
 public void CopyTo(Intention i)
 {
     i.atomicCount = atomicCount;
     i.plans       = new List <IntendedPlan>(plans);
 }
コード例 #5
0
ファイル: Event.cs プロジェクト: nasa03/Jasonity
 public Event(Trigger t, Intention i)
 {
     trigger   = t;
     intention = i;
 }
コード例 #6
0
ファイル: Event.cs プロジェクト: nasa03/Jasonity
 public void SetIntention(Intention i)
 {
     intention = i;
 }