/usr/share/mozart/doc/cpiref/node6.html is in mozart-doc 1.4.0-8ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>1.6 The class OZ_FSetVar</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node5.html#r_fd"><< Prev</A></TD><TD><A href="ip.html">- Up -</A></TD><TD><A href="node7.html#r_fs">Next >></A></TD></TR></TABLE><DIV id="r_fsvar"><H2><A name="r_fsvar">1.6 The class <CODE>OZ_FSetVar</CODE></A></H2><P> An instance of this class is a mapping of a finite set constraint variable on the heap of the emulator to a C/C++ data structure. The provided functionality allows to directly manipulate the domain (constraint) of the heap variable.</P><P></P><DIV id="r_fsetvar.constr"><H3><A name="r_fsetvar.constr">1.6.1 Constructor Member Functions</A></H3><P> </P><DL><DT class="constructor"><CODE>OZ_FSetVar</CODE> <A name="label114"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>constructor</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>OZ_FSetVar(<SPAN class="type">void</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This constructor creates an uninitialised instance of the class <CODE>OZ_FSetVar</CODE>, which can be initialised later by the member functions <CODE>ask()</CODE>, <CODE>read()</CODE>, or <CODE>readEncap()</CODE>. </P></DD><DT class="overloaded"><CODE>OZ_FSetVar</CODE> <A name="label115"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>overloaded constructor</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>OZ_FSetVar(<SPAN class="type">OZ_Term</SPAN> <SPAN class="variablename">v</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This constructor creates an instance of the class <CODE>OZ_FSetVar</CODE> and initialises it using <CODE>read()</CODE>. </P></DD></DL><P> </P></DIV><DIV id="r_fsetvar.op"><H3><A name="r_fsetvar.op">1.6.2 Operator Member Functions</A></H3><P> </P><DL><DT class="static"><CODE><SPAN class="keyword">new</SPAN></CODE> <A name="label116"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>static operator member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">static</SPAN> <SPAN class="type">void</SPAN> * <SPAN class="keyword">operator</SPAN> <SPAN class="keyword">new</SPAN>(<SPAN class="type">size_t</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This operator allocates memory for a single instance of class <CODE>OZ_FSetVar</CODE>. This operator must only be used inside the member function <CODE>propagate()</CODE> of the class <CODE>OZ_Propagator</CODE>. The allocated memory is automatically reclaimed when <CODE>propagate()</CODE> is left. </P></DD><DT class="static"><CODE><SPAN class="keyword">new</SPAN>[]</CODE> <A name="label117"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>static operator member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">static</SPAN> <SPAN class="type">void</SPAN> * <SPAN class="keyword">operator</SPAN> <SPAN class="keyword">new</SPAN>[](size_t);</CODE> </P></BLOCKQUOTE></DD><DD><P>This operator allocates memory for an array of instances of <CODE>OZ_FSetVar</CODE>. This operator must only be used inside the member function <CODE>propagate()</CODE> of the class <CODE>OZ_Propagator</CODE>. The allocated memory is automatically reclaimed when <CODE>propagate()</CODE> is left. </P></DD><DT class="static"><CODE><SPAN class="keyword">delete</SPAN></CODE> <A name="label118"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>static operator member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">static</SPAN> <SPAN class="type">void</SPAN> <SPAN class="keyword">operator</SPAN> <SPAN class="keyword">delete</SPAN>(<SPAN class="type">void</SPAN> *, size_t);</CODE> </P></BLOCKQUOTE></DD><DD><P>This operator is a dummy since reclaiming memory happens automatically. </P></DD><DT class="static"><CODE><SPAN class="keyword">delete</SPAN>[]</CODE> <A name="label119"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>static operator member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">static</SPAN> <SPAN class="type">void</SPAN> <SPAN class="keyword">operator</SPAN> <SPAN class="keyword">delete</SPAN>[](<SPAN class="type">void</SPAN> *, size_t);</CODE> </P></BLOCKQUOTE></DD><DD><P>This operator is a dummy since reclaiming memory happens automatically. </P></DD><DT class="operator"><CODE><SPAN class="keyword">operator</SPAN> *</CODE> <A name="label120"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>operator member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>OZ_FSetConstraint &<SPAN class="keyword">operator</SPAN> * (<SPAN class="type">void</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This operator returns a finite set constraint representing the constraint of this variable. </P></DD><DT class="operator"><CODE><SPAN class="keyword">operator</SPAN> -></CODE> <A name="label121"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>operator member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>OZ_FSetConstraint * <SPAN class="keyword">operator</SPAN> -> (<SPAN class="type">void</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This operator returns a pointer to a finite set constraint representing the constraint of this variable. </P></DD></DL><P> </P></DIV><DIV id="r_fsetvar.member"><H3><A name="r_fsetvar.member">1.6.3 Member Functions</A></H3><P> </P><DL><DT class="constant"><CODE>isTouched</CODE> <A name="label122"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>constant member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">OZ_Boolean</SPAN> <SPAN class="functionname">isTouched</SPAN>(<SPAN class="type">void</SPAN>) <SPAN class="keyword">const</SPAN>;</CODE> </P></BLOCKQUOTE></DD><DD><P>This function returns <CODE>OZ_TRUE</CODE> if at least one element has been removed from or added to the set and otherwise <CODE>OZ_FALSE</CODE>. </P></DD><DT class="member"><CODE>ask</CODE> <A name="label123"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">void</SPAN> <SPAN class="functionname">ask</SPAN>(OZ_Term);</CODE> </P></BLOCKQUOTE></DD><DD><P>This member function initialises an instance of <CODE>OZ_FSetVar</CODE> for only reading constraints from the store and it does not require a call of <CODE>leave()</CODE> or <CODE>fail()</CODE>. </P></DD><DT class="member"><CODE>read</CODE> <A name="label124"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">void</SPAN> <SPAN class="functionname">read</SPAN>(OZ_Term);</CODE> </P></BLOCKQUOTE></DD><DD><P>This member function initialises an instance of <CODE>OZ_FSetVar</CODE> for constraints to be read from and to be written to the constraint store. Using this function requires to call either <CODE>leave()</CODE> or <CODE>fail()</CODE> when leaving the member function <CODE>propagate()</CODE> of class <CODE>OZ_Propagator</CODE>. </P></DD><DT class="member"><CODE>readEncap</CODE> <A name="label125"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">void</SPAN> <SPAN class="functionname">readEncap</SPAN>(OZ_Term);</CODE> </P></BLOCKQUOTE></DD><DD><P>This member function initialises an instance of <CODE>OZ_FSetVar</CODE> for constraints to be read from the constraint store and to perform encapsulated constraint propagation as required by reified constraint propagators. Using this function requires to call either <CODE>leave()</CODE> or <CODE>fail()</CODE> when leaving the member function <CODE><SPAN class="reference">OZ_Propagator</SPAN>::propagate()</CODE>. For further details see <A href="../cpitut/node8.html#u_advanced.reified">Section 1.7.3 of ``The Mozart Constraint Extensions Tutorial''</A>. </P></DD><DT class="member"><CODE>leave</CODE> <A name="label126"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">OZ_Boolean</SPAN> <SPAN class="functionname">leave</SPAN>(<SPAN class="type">void</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This member function has to be applied to each object of type <CODE>OZ_FSetVar</CODE> when leaving the function <CODE>propagate()</CODE> of class <CODE>OZ_Propagator</CODE> and <EM>no</EM> inconsistency was detected (except it was initialised with <CODE>ask()</CODE>). If the set constraint denotes a set value this member function returns <CODE>OZ_FALSE</CODE> and else it returns <CODE>OZ_TRUE</CODE>. </P></DD><DT class="member"><CODE>fail</CODE> <A name="label127"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">void</SPAN> <SPAN class="functionname">fail</SPAN>(<SPAN class="type">void</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This member function has to be applied to each object of type <CODE>OZ_FSetVar</CODE> when leaving the function <CODE>propagate()</CODE> of class <CODE>OZ_Propagator</CODE> and inconsistency <EM>was</EM> detected (except it was initialised with <CODE>ask()</CODE>). </P></DD><DT class="member"><CODE>dropParameter</CODE> <A name="label128"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">void</SPAN> <SPAN class="functionname">dropParameter</SPAN>(<SPAN class="type">void</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This member function removes the parameter associated with <CODE>*<SPAN class="keyword">this</SPAN></CODE> 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. </P></DD></DL><P> </P></DIV></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node5.html#r_fd"><< Prev</A></TD><TD><A href="ip.html">- Up -</A></TD><TD><A href="node7.html#r_fs">Next >></A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~tmueller/">Tobias Müller</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>
|