choco.set.var
Class SetVarEvent

java.lang.Object
  extended by choco.prop.VarEvent
      extended by choco.set.var.SetVarEvent
All Implemented Interfaces:
PropagationEvent, IPrioritizable

public class SetVarEvent
extends VarEvent

Created by IntelliJ IDEA. User: Hadrien Date: 6 juin 2004 Time: 14:21:13 To change this template use File | Settings | File Templates.


Field Summary
static int ADDKER
           
static int BOUNDSEVENT
           
static int ENVEVENT
           
static int INSTSET
           
static int INSTSETEVENT
           
static int KEREVENT
           
static int REMENV
          Constants for the eventType bitvector: index of bit for events on SetVars
 
Fields inherited from class choco.prop.VarEvent
cause, EMPTYEVENT, eventType, logger, modifiedVar, NOCAUSE, NOEVENT
 
Fields inherited from interface choco.prop.PropagationEvent
POPPING
 
Constructor Summary
SetVarEvent(AbstractVar var)
           
 
Method Summary
 void clear()
          Clears the var: delegates to the basic events.
protected  void freeze()
          freezes the state of the "delta domain": the set of values that are considered for removal from the domain.
 IntIterator getEnvEventIterator()
           
 SetVar getIntVar()
           
 IntIterator getKerEventIterator()
           
 boolean getReleased()
           
 void propagateEnveloppeEvents(int evtCause)
          Propagates a set of value removals
 boolean propagateEvent()
          Propagates the event through calls to the propagation engine.
 void propagateInstEvent(int evtCause)
          Propagates the instantiation event
 void propagateKernelEvents(int evtCause)
          Propagates a set of value removals
protected  boolean release()
           
 java.lang.String toString()
          useful for debugging
 
Methods inherited from class choco.prop.VarEvent
getCause, getModifiedObject, getModifiedVar, getPriority, getProblem, isActive, isEnqueued, recordEventTypeAndCause
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REMENV

public static final int REMENV
Constants for the eventType bitvector: index of bit for events on SetVars

See Also:
Constant Field Values

ADDKER

public static final int ADDKER
See Also:
Constant Field Values

INSTSET

public static final int INSTSET
See Also:
Constant Field Values

ENVEVENT

public static final int ENVEVENT
See Also:
Constant Field Values

KEREVENT

public static final int KEREVENT
See Also:
Constant Field Values

BOUNDSEVENT

public static final int BOUNDSEVENT
See Also:
Constant Field Values

INSTSETEVENT

public static final int INSTSETEVENT
See Also:
Constant Field Values
Constructor Detail

SetVarEvent

public SetVarEvent(AbstractVar var)
Method Detail

getIntVar

public SetVar getIntVar()

toString

public java.lang.String toString()
useful for debugging

Overrides:
toString in class java.lang.Object

clear

public void clear()
Clears the var: delegates to the basic events.

Specified by:
clear in interface PropagationEvent
Specified by:
clear in class VarEvent

freeze

protected void freeze()
Description copied from class: VarEvent
freezes the state of the "delta domain": the set of values that are considered for removal from the domain. Further removals will be treated as a further event.

Overrides:
freeze in class VarEvent

release

protected boolean release()
Overrides:
release in class VarEvent

getReleased

public boolean getReleased()

getEnvEventIterator

public IntIterator getEnvEventIterator()

getKerEventIterator

public IntIterator getKerEventIterator()

propagateEvent

public boolean propagateEvent()
                       throws ContradictionException
Propagates the event through calls to the propagation engine.

Specified by:
propagateEvent in interface PropagationEvent
Specified by:
propagateEvent in class VarEvent
Returns:
true if the event has been fully propagated (and can thus be discarded), false otherwise
Throws:
ContradictionException

propagateInstEvent

public void propagateInstEvent(int evtCause)
                        throws ContradictionException
Propagates the instantiation event

Throws:
ContradictionException

propagateKernelEvents

public void propagateKernelEvents(int evtCause)
                           throws ContradictionException
Propagates a set of value removals

Throws:
ContradictionException

propagateEnveloppeEvents

public void propagateEnveloppeEvents(int evtCause)
                              throws ContradictionException
Propagates a set of value removals

Throws:
ContradictionException