agg.xt_basis
Class Constraint_InheritAttribute

java.lang.Object
  extended by agg.util.csp.BinaryConstraint
      extended by agg.xt_basis.Constraint_InheritAttribute
All Implemented Interfaces:
InstantiationHook

public class Constraint_InheritAttribute
extends BinaryConstraint
implements InstantiationHook

Please note: This class is only for internal use of the critical pair analysis for grammars with node type inheritance. Do not use it for any kind of implementations.


Field Summary
 
Fields inherited from class agg.util.csp.BinaryConstraint
itsVar1, itsVar2, itsWeight
 
Constructor Summary
Constraint_InheritAttribute(GraphObject graphobj, Variable var, AttrContext ac, AttrManager man)
           
 
Method Summary
 void clear()
           
 boolean execute()
          Return true iff the attributes of graphobj and of the current instance of var match.
 GraphObject getGraphObject()
           
 void instantiate(Variable var)
          This method is called whenever the variable I'm hooked to gets instantiated.
 void uninstantiate(Variable var)
          This method is called whenever the variable I'm hooked to gets uninstantiated, or when it is set to a new value.
 
Methods inherited from class agg.util.csp.BinaryConstraint
activate, deactivate, getCause, getVar1, getVar2, getWeight, isApplicable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Constraint_InheritAttribute

public Constraint_InheritAttribute(GraphObject graphobj,
                                   Variable var,
                                   AttrContext ac,
                                   AttrManager man)
Method Detail

clear

public void clear()
Specified by:
clear in class BinaryConstraint

execute

public final boolean execute()
Return true iff the attributes of graphobj and of the current instance of var match. (The names correspond to my constructor arguments.)

Specified by:
execute in class BinaryConstraint

instantiate

public final void instantiate(Variable var)
Description copied from interface: InstantiationHook
This method is called whenever the variable I'm hooked to gets instantiated. It is called after the new value has been set, with the variable as an argument.

Specified by:
instantiate in interface InstantiationHook

uninstantiate

public final void uninstantiate(Variable var)
Description copied from interface: InstantiationHook
This method is called whenever the variable I'm hooked to gets uninstantiated, or when it is set to a new value. It is called before the value is re- or unset, with the variable as an argument.

Specified by:
uninstantiate in interface InstantiationHook

getGraphObject

public GraphObject getGraphObject()