com.ugos.JIProlog.engine
Class JIPXCall

java.lang.Object
  |
  +--com.ugos.JIProlog.engine.JIPXCall

public abstract class JIPXCall
extends java.lang.Object

JIPXCall is the base class for custom built-in predicates.
See the section "How to write a custom built-in predicate" in the Reference Manual

Version:
2.0
Author:
Ugo Chirico 2002
Home Page: http://www.ugosweb.com/jiprolog

Constructor Summary
JIPXCall()
           
 
Method Summary
 JIPEngine getJIPEngine()
          Returns the current running JIPEngine object
 JIPFunctor getPredicate()
          Returns the functor of the predicate invoking this instance of JIPXCall class
 int getQueryHandle()
          Returns the handle of the current running query
abstract  boolean hasMoreChoicePoints()
          Invoked by xcall/2 to check if the custom predicate has more choice points on backtracking.
abstract  boolean unify(JIPCons params, java.util.Hashtable varsTbl)
          Invoked by xcall/2 to check if the custom predicate unify with the passed parameters For more information see the section "How to write a custom built-in predicate" in the Reference Manual.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JIPXCall

public JIPXCall()
Method Detail

getJIPEngine

public final JIPEngine getJIPEngine()
Returns the current running JIPEngine object

Returns:
current running JIPEngine object
See Also:
JIPEngine

getQueryHandle

public final int getQueryHandle()
Returns the handle of the current running query

Returns:
handle of the current running query

getPredicate

public final JIPFunctor getPredicate()
Returns the functor of the predicate invoking this instance of JIPXCall class

Returns:
functor of the predicate invoking this instance of JIPXCall class
See Also:
JIPFunctor

unify

public abstract boolean unify(JIPCons params,
                              java.util.Hashtable varsTbl)
Invoked by xcall/2 to check if the custom predicate unify with the passed parameters For more information see the section "How to write a custom built-in predicate" in the Reference Manual.

Parameters:
params - the parameters passed to the predicate.
Returns:
true if the custom predicates unify with the parameter passed, false otherwise
See Also:
JIPCons

hasMoreChoicePoints

public abstract boolean hasMoreChoicePoints()
Invoked by xcall/2 to check if the custom predicate has more choice points on backtracking.

Returns:
true if the custom predicate has more choice points, false otherwise.