コード例 #1
0
        // This isn't an MHEG action as such but is used as part of the implementation of "Clone"
        public override void MakeClone(MHRoot pTarget, MHRoot pRef, MHEngine engine)
        {
            MHIngredient pClone = pTarget.Clone(engine);                      // Clone it.

            pClone.ObjectIdentifier.GroupId.Copy(m_ObjectIdentifier.GroupId); // Group id is the same as this.
            pClone.ObjectIdentifier.ObjectNo = ++m_nLastId;                   // Create a new object id.
            m_Items.Append(pClone);
            // Set the object reference result to the newly constructed ref.
            pRef.SetVariableValue(new MHUnion(pClone.ObjectIdentifier));
            pClone.Preparation(engine); // Prepare the clone.
        }
コード例 #2
0
 public override void Preparation(MHEngine engine)
 {
     // Prepare the ingredients first if they are initially active or are initially available programs.
     for (int i = 0; i < m_Items.Size; i++)
     {
         MHIngredient pIngredient = m_Items.GetAt(i);
         if (pIngredient.InitiallyActive() || pIngredient.InitiallyAvailable())
         {
             pIngredient.Preparation(engine);
         }
     }
     base.Preparation(engine); // Prepare the root object and send the IsAvailable event.
 }