MetaTermUnify() public method

Called after the variable bound to this Metastructure is unified with a non-variable term.
public MetaTermUnify ( object value ) : IEnumerable
value object The term to which to unify.
return IEnumerable
Esempio n. 1
0
        IEnumerable <bool> UnifyMetaTerm(Metastructure m, object value)
        {
            Value = value;
            try
            {
#pragma warning disable 414, 168, 219
                // ReSharper disable UnusedVariable
                foreach (var ignore in m.MetaTermUnify(value))
                // ReSharper restore UnusedVariable
#pragma warning restore 414, 168, 219
                {
                    yield return(false);
                }
            }
            finally
            {
                mValue = m;
                //IsBound = false;
            }
        }
Esempio n. 2
0
 IEnumerable<bool> UnifyMetaTerm(Metastructure m, object value)
 {
     Value = value;
     try
     {
     #pragma warning disable 414, 168, 219
         // ReSharper disable UnusedVariable
         foreach (var ignore in m.MetaTermUnify(value))
             // ReSharper restore UnusedVariable
     #pragma warning restore 414, 168, 219
             yield return false;
     }
     finally
     {
         mValue = m;
         //IsBound = false;
     }
 }
Esempio n. 3
0
 /// <summary>
 /// This is an attributed variable with attribute m, unify it with value.
 /// </summary>
 /// <param name="m">Current attribute</param>
 /// <param name="value">Value to give it</param>
 /// <param name="context">Prolog context (to get trail and wakeup list)</param>
 /// <returns>Success</returns>
 void UnifyMetaTerm(Metastructure m, object value, PrologContext context)
 {
     Value = value;
     m.MetaTermUnify(value, context);
 }
Esempio n. 4
0
 /// <summary>
 /// This is an attributed variable with attribute m, unify it with value.
 /// </summary>
 /// <param name="m">Current attribute</param>
 /// <param name="value">Value to give it</param>
 /// <param name="context">Prolog context (to get trail and wakeup list)</param>
 /// <returns>Success</returns>
 void UnifyMetaTerm(Metastructure m, object value, PrologContext context)
 {
     Value = value;
     m.MetaTermUnify(value, context);
 }