<section id="r_fdint">
<title/The class <<OZ_FDIntVar>>/
<p>

An instance of this class is a mapping of a finite domain integer
variable on the heap of the emulator to a &ccpp; data structure. The
provided functionality allows to directly manipulate the domain
(constraint) of the heap variable.
<p>

<subsection id="r_fdint.constr">
<title/Constructor Member Functions/
<p>

<List proglang=cc>

<Entry class="constructor"><<OZ_FDIntVar>>
<Index class=proglang><<OZ_FDIntVar>></Index>
<Synopsis> <<OZ_FDIntVar(void);>>

<Item> This constructor creates an uninitialised instance of the class
<<OZ_FDIntVar>>, which can be initialised later by the member
functions <<ask()>>, <<read()>>, or <<readEncap()>>.


<Entry class="constructor"><<OZ_FDIntVar>>
<Index class=proglang><<OZ_FDIntVar>></Index>
<Synopsis> <<OZ_FDIntVar(OZ_Term v);>>

<Item>
This constructor creates an instance of class <<OZ_FDIntVar>> and
initialises it using <<read()>>.

</List>

<!-- ********************************************************************** -->

<subsection id="r_fdint.op">
<title/Operator Member Functions/
<p>

<List proglang=cc>

<Entry class="static operator member function"><<new>>
<Index class=proglang><<OZ_FDIntVar>><And><<new>></Index>
<Synopsis> <<static void * operator new(size_t);>>

<Item> This operator allocates memory for a single instance of class
<<OZ_FDIntVar>>. This operator must only be used inside the function
<<propagate()>> of class <<OZ_Propagator>>. The allocated memory is
automatically reclaimed when <<propagate()>> is left.


<Entry class="static operator member function"><<new[]>>
<Index class=proglang><<OZ_FDIntVar>><And><<new[]>></Index>
<Synopsis> <<static void * operator new[](size_t);>>

<Item> This operator allocates memory for an array of instances of
<<OZ_FDIntVar>>. This operator must only be used inside the function
<<propagate()>> of class <<OZ_Propagator>>. The allocated memory is
automatically reclaimed when <<propagate()>> is left.


<Entry class="static operator member function"><<delete>>
<Index class=proglang><<OZ_FDIntVar>><And><<delete>></Index>
<Synopsis> <<static void operator delete(void *, size_t);>>

<Item> This operator is a dummy since reclaiming memory happens
automatically.


<Entry class="static operator member function"><<delete[]>>
<Index class=proglang><<OZ_FDIntVar>><And><<delete[]>></Index>
<Synopsis> <<static void operator delete[](void *, size_t);>>

<Item> This operator is a dummy since reclaiming memory happens
automatically.


<Entry class="operator member function"><<operator *>>
<Index class=proglang><<OZ_FDIntVar>><And><<operator *>></Index>
<Synopsis> <<OZ_FiniteDomain &amp;operator * (void);>>

<Item> This operator returns a finite domain representing the
constraint of this variable.


<Entry class="operator member function"><<operator -&gt;>>
<Index class=proglang><<OZ_FDIntVar>><And><<operator -&gt;>></Index>
<Synopsis> <<OZ_FiniteDomain * operator -&gt; (void);>>

<Item> This operator returns a pointer to a finite domain representing
the constraint of this variable.

</List>

<!-- ********************************************************************** -->

<subsection id="r_fdint.member">
<title/Member Functions/
<p>

<List proglang=cc>

<Entry class="constant member function"><<isTouched>>
<Index class=proglang><<OZ_FDIntVar>><And><<isTouched>></Index>
<Synopsis> <<OZ_Boolean isTouched(void) const;>>

<Item> This function returns <<OZ_TRUE>> if at least one element has
been removed from the domain and otherwise <<OZ_FALSE>>.


<Entry class="member function"><<ask>>
<Index class=proglang><<OZ_FDIntVar>><And><<ask>></Index>
<Synopsis> <<void ask(OZ_Term);>>

<Item> This member function initialises an instance of <<OZ_FDIntVar>>
for only reading constraints from the store and it does not require a
call of <<leave()>> or <<fail()>>.


<Entry class="member function"><<read>>
<Index class=proglang><<OZ_FDIntVar>><And><<read>></Index>
<Synopsis> <<int read(OZ_Term);>>

<Item> This member function initialises an instance of <<OZ_FDIntVar>>
for constraints to be read from and to be written to the constraint
store. It returns the size of the domain. Using this function requires
to call either <<leave()>> or <<fail()>> when leaving the member
function <<propagate()>> of class <<OZ_Propagator>>.


<Entry class="member function"><<readEncap>>
<Index class=proglang><<OZ_FDIntVar>><And><<readEncap>></Index>
<Synopsis> <<int readEncap(OZ_Term);>>

<Item> This member function initialises an instance of <<OZ_FDIntVar>>
for constraints to be read from the constraint store and to perform
encapsulated constraint propagation as required by reified constraint
propagators. It returns the size of the domain. Using this function
requires to call either <<leave()>> or <<fail()>> when leaving the
member function <<OZ_Propagator::propagate()>>. For
further details see <Ptr.Extern to="ozdoc:cpitut"
key="u_advanced.reified">.


<Entry class="member function"><<leave>>
<Index class=proglang><<OZ_FDIntVar>><And><<leave>></Index>
<Synopsis <<OZ_Boolean leave(void);>>

<Item> This member function has to be applied to each object of type
<<OZ_FDIntVar>> when leaving the function <<propagate()>> of class
<<OZ_Propagator>> and <em/no/ inconsistency was detected (except it
was initialised with <<ask()>>). This member function returns
<<OZ_FALSE>> if the domain denotes a singleton. Otherwise it returns
<<OZ_TRUE>>.


<Entry class="member function"><<fail>>
<Index class=proglang><<OZ_FDIntVar>><And><<fail>></Index>
<Synopsis> <<void fail(void);>>

<Item> This member function has to be applied to each object of type
<<OZ_FDIntVar>> when leaving the function <<propagate()>> of class
<<OZ_Propagator>> and inconsistency <em/was/ detected (except it was
initialised with <<ask()>>).

<Entry class="member function"><<dropParameter>>
<Index class=proglang><<OZ_CtVar>><And><<dropParameter>></Index>
<Synopsis><<void dropParameter(void);>>

<Item> This member function removes the parameter associated with
<<*this>> from the parameter set of the current propagator. This
function takes care of multiple occurrences of a single variable as
parameter, i.e., a parameter is removed if there is only one
occurrence of the corresponding variable in the set of parameter left.

</List>
