589 lines
121 KiB
XML
589 lines
121 KiB
XML
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
|
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.6">
|
|
<compounddef id="ast_8hh" kind="file">
|
|
<compoundname>ast.hh</compoundname>
|
|
<includes local="no">vector</includes>
|
|
<includes local="no">string</includes>
|
|
<includes local="no">iostream</includes>
|
|
<includes local="no">cstdlib</includes>
|
|
<includedby refid="conexpr_8hh" local="no">/usr/include/gecode/flatzinc/conexpr.hh</includedby>
|
|
<includedby refid="parser_8hh" local="no">/usr/include/gecode/flatzinc/parser.hh</includedby>
|
|
<includedby refid="varspec_8hh" local="no">/usr/include/gecode/flatzinc/varspec.hh</includedby>
|
|
<includedby refid="flatzinc_8hh" local="no">/usr/include/gecode/flatzinc.hh</includedby>
|
|
<incdepgraph>
|
|
<node id="420">
|
|
<label>string</label>
|
|
</node>
|
|
<node id="419">
|
|
<label>vector</label>
|
|
</node>
|
|
<node id="418">
|
|
<label>/usr/include/gecode/flatzinc/ast.hh</label>
|
|
<link refid="ast.hh"/>
|
|
<childnode refid="419" relation="include">
|
|
</childnode>
|
|
<childnode refid="420" relation="include">
|
|
</childnode>
|
|
<childnode refid="421" relation="include">
|
|
</childnode>
|
|
<childnode refid="422" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="422">
|
|
<label>cstdlib</label>
|
|
</node>
|
|
<node id="421">
|
|
<label>iostream</label>
|
|
</node>
|
|
</incdepgraph>
|
|
<invincdepgraph>
|
|
<node id="426">
|
|
<label>/usr/include/gecode/flatzinc.hh</label>
|
|
<link refid="flatzinc_8hh_source"/>
|
|
<childnode refid="425" relation="include">
|
|
</childnode>
|
|
<childnode refid="427" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="424">
|
|
<label>/usr/include/gecode/flatzinc/conexpr.hh</label>
|
|
<link refid="conexpr_8hh_source"/>
|
|
<childnode refid="425" relation="include">
|
|
</childnode>
|
|
<childnode refid="426" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="425">
|
|
<label>/usr/include/gecode/flatzinc/parser.hh</label>
|
|
<link refid="parser_8hh_source"/>
|
|
</node>
|
|
<node id="428">
|
|
<label>/usr/include/gecode/flatzinc/varspec.hh</label>
|
|
<link refid="varspec_8hh_source"/>
|
|
<childnode refid="425" relation="include">
|
|
</childnode>
|
|
<childnode refid="426" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="427">
|
|
<label>/usr/include/gecode/flatzinc/registry.hh</label>
|
|
<link refid="registry_8hh_source"/>
|
|
</node>
|
|
<node id="423">
|
|
<label>/usr/include/gecode/flatzinc/ast.hh</label>
|
|
<link refid="ast.hh"/>
|
|
<childnode refid="424" relation="include">
|
|
</childnode>
|
|
<childnode refid="425" relation="include">
|
|
</childnode>
|
|
<childnode refid="428" relation="include">
|
|
</childnode>
|
|
<childnode refid="426" relation="include">
|
|
</childnode>
|
|
</node>
|
|
</invincdepgraph>
|
|
<innerclass refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" prot="public">Gecode::FlatZinc::AST::TypeError</innerclass>
|
|
<innerclass refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" prot="public">Gecode::FlatZinc::AST::Node</innerclass>
|
|
<innerclass refid="classGecode_1_1FlatZinc_1_1AST_1_1BoolLit" prot="public">Gecode::FlatZinc::AST::BoolLit</innerclass>
|
|
<innerclass refid="classGecode_1_1FlatZinc_1_1AST_1_1IntLit" prot="public">Gecode::FlatZinc::AST::IntLit</innerclass>
|
|
<innerclass refid="classGecode_1_1FlatZinc_1_1AST_1_1FloatLit" prot="public">Gecode::FlatZinc::AST::FloatLit</innerclass>
|
|
<innerclass refid="classGecode_1_1FlatZinc_1_1AST_1_1SetLit" prot="public">Gecode::FlatZinc::AST::SetLit</innerclass>
|
|
<innerclass refid="classGecode_1_1FlatZinc_1_1AST_1_1Var" prot="public">Gecode::FlatZinc::AST::Var</innerclass>
|
|
<innerclass refid="classGecode_1_1FlatZinc_1_1AST_1_1BoolVar" prot="public">Gecode::FlatZinc::AST::BoolVar</innerclass>
|
|
<innerclass refid="classGecode_1_1FlatZinc_1_1AST_1_1IntVar" prot="public">Gecode::FlatZinc::AST::IntVar</innerclass>
|
|
<innerclass refid="classGecode_1_1FlatZinc_1_1AST_1_1FloatVar" prot="public">Gecode::FlatZinc::AST::FloatVar</innerclass>
|
|
<innerclass refid="classGecode_1_1FlatZinc_1_1AST_1_1SetVar" prot="public">Gecode::FlatZinc::AST::SetVar</innerclass>
|
|
<innerclass refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" prot="public">Gecode::FlatZinc::AST::Array</innerclass>
|
|
<innerclass refid="classGecode_1_1FlatZinc_1_1AST_1_1Call" prot="public">Gecode::FlatZinc::AST::Call</innerclass>
|
|
<innerclass refid="classGecode_1_1FlatZinc_1_1AST_1_1ArrayAccess" prot="public">Gecode::FlatZinc::AST::ArrayAccess</innerclass>
|
|
<innerclass refid="classGecode_1_1FlatZinc_1_1AST_1_1Atom" prot="public">Gecode::FlatZinc::AST::Atom</innerclass>
|
|
<innerclass refid="classGecode_1_1FlatZinc_1_1AST_1_1String" prot="public">Gecode::FlatZinc::AST::String</innerclass>
|
|
<innernamespace refid="namespaceGecode_1_1FlatZinc_1_1AST">Gecode::FlatZinc::AST</innernamespace>
|
|
<innernamespace refid="namespaceGecode">Gecode</innernamespace>
|
|
<innernamespace refid="namespaceGecode_1_1FlatZinc">Gecode::FlatZinc</innernamespace>
|
|
<briefdescription>
|
|
</briefdescription>
|
|
<detaileddescription>
|
|
</detaileddescription>
|
|
<programlisting>
|
|
<codeline lineno="1"><highlight class="comment">/*<sp/>-*-<sp/>mode:<sp/>C++;<sp/>c-basic-offset:<sp/>2;<sp/>indent-tabs-mode:<sp/>nil<sp/>-*-<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
|
|
<codeline lineno="3"><highlight class="comment"><sp/>*<sp/><sp/>Main<sp/>authors:</highlight></codeline>
|
|
<codeline lineno="4"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Guido<sp/>Tack<sp/><tack@gecode.org></highlight></codeline>
|
|
<codeline lineno="5"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="6"><highlight class="comment"><sp/>*<sp/><sp/>Copyright:</highlight></codeline>
|
|
<codeline lineno="7"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Guido<sp/>Tack,<sp/>2007</highlight></codeline>
|
|
<codeline lineno="8"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="9"><highlight class="comment"><sp/>*<sp/><sp/>Last<sp/>modified:</highlight></codeline>
|
|
<codeline lineno="10"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>$Date:<sp/>2013-05-09<sp/>01:32:37<sp/>+0200<sp/>(Thu,<sp/>09<sp/>May<sp/>2013)<sp/>$<sp/>by<sp/>$Author:<sp/>tack<sp/>$</highlight></codeline>
|
|
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>$Revision:<sp/>13625<sp/>$</highlight></codeline>
|
|
<codeline lineno="12"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/><sp/>This<sp/>file<sp/>is<sp/>part<sp/>of<sp/>Gecode,<sp/>the<sp/>generic<sp/>constraint</highlight></codeline>
|
|
<codeline lineno="14"><highlight class="comment"><sp/>*<sp/><sp/>development<sp/>environment:</highlight></codeline>
|
|
<codeline lineno="15"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>http://www.gecode.org</highlight></codeline>
|
|
<codeline lineno="16"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/><sp/>Permission<sp/>is<sp/>hereby<sp/>granted,<sp/>free<sp/>of<sp/>charge,<sp/>to<sp/>any<sp/>person<sp/>obtaining</highlight></codeline>
|
|
<codeline lineno="18"><highlight class="comment"><sp/>*<sp/><sp/>a<sp/>copy<sp/>of<sp/>this<sp/>software<sp/>and<sp/>associated<sp/>documentation<sp/>files<sp/>(the</highlight></codeline>
|
|
<codeline lineno="19"><highlight class="comment"><sp/>*<sp/><sp/>"Software"),<sp/>to<sp/>deal<sp/>in<sp/>the<sp/>Software<sp/>without<sp/>restriction,<sp/>including</highlight></codeline>
|
|
<codeline lineno="20"><highlight class="comment"><sp/>*<sp/><sp/>without<sp/>limitation<sp/>the<sp/>rights<sp/>to<sp/>use,<sp/>copy,<sp/>modify,<sp/>merge,<sp/>publish,</highlight></codeline>
|
|
<codeline lineno="21"><highlight class="comment"><sp/>*<sp/><sp/>distribute,<sp/>sublicense,<sp/>and/or<sp/>sell<sp/>copies<sp/>of<sp/>the<sp/>Software,<sp/>and<sp/>to</highlight></codeline>
|
|
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/><sp/>permit<sp/>persons<sp/>to<sp/>whom<sp/>the<sp/>Software<sp/>is<sp/>furnished<sp/>to<sp/>do<sp/>so,<sp/>subject<sp/>to</highlight></codeline>
|
|
<codeline lineno="23"><highlight class="comment"><sp/>*<sp/><sp/>the<sp/>following<sp/>conditions:</highlight></codeline>
|
|
<codeline lineno="24"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="25"><highlight class="comment"><sp/>*<sp/><sp/>The<sp/>above<sp/>copyright<sp/>notice<sp/>and<sp/>this<sp/>permission<sp/>notice<sp/>shall<sp/>be</highlight></codeline>
|
|
<codeline lineno="26"><highlight class="comment"><sp/>*<sp/><sp/>included<sp/>in<sp/>all<sp/>copies<sp/>or<sp/>substantial<sp/>portions<sp/>of<sp/>the<sp/>Software.</highlight></codeline>
|
|
<codeline lineno="27"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="28"><highlight class="comment"><sp/>*<sp/><sp/>THE<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>"AS<sp/>IS",<sp/>WITHOUT<sp/>WARRANTY<sp/>OF<sp/>ANY<sp/>KIND,</highlight></codeline>
|
|
<codeline lineno="29"><highlight class="comment"><sp/>*<sp/><sp/>EXPRESS<sp/>OR<sp/>IMPLIED,<sp/>INCLUDING<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO<sp/>THE<sp/>WARRANTIES<sp/>OF</highlight></codeline>
|
|
<codeline lineno="30"><highlight class="comment"><sp/>*<sp/><sp/>MERCHANTABILITY,<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>AND</highlight></codeline>
|
|
<codeline lineno="31"><highlight class="comment"><sp/>*<sp/><sp/>NONINFRINGEMENT.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL<sp/>THE<sp/>AUTHORS<sp/>OR<sp/>COPYRIGHT<sp/>HOLDERS<sp/>BE</highlight></codeline>
|
|
<codeline lineno="32"><highlight class="comment"><sp/>*<sp/><sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>CLAIM,<sp/>DAMAGES<sp/>OR<sp/>OTHER<sp/>LIABILITY,<sp/>WHETHER<sp/>IN<sp/>AN<sp/>ACTION</highlight></codeline>
|
|
<codeline lineno="33"><highlight class="comment"><sp/>*<sp/><sp/>OF<sp/>CONTRACT,<sp/>TORT<sp/>OR<sp/>OTHERWISE,<sp/>ARISING<sp/>FROM,<sp/>OUT<sp/>OF<sp/>OR<sp/>IN<sp/>CONNECTION</highlight></codeline>
|
|
<codeline lineno="34"><highlight class="comment"><sp/>*<sp/><sp/>WITH<sp/>THE<sp/>SOFTWARE<sp/>OR<sp/>THE<sp/>USE<sp/>OR<sp/>OTHER<sp/>DEALINGS<sp/>IN<sp/>THE<sp/>SOFTWARE.</highlight></codeline>
|
|
<codeline lineno="35"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="36"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="37"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="38"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>__GECODE_FLATZINC_AST_HH__</highlight></codeline>
|
|
<codeline lineno="39"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#define<sp/>__GECODE_FLATZINC_AST_HH__</highlight></codeline>
|
|
<codeline lineno="40"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="41"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><vector></highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="42"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><string></highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="43"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><iostream></highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="44"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><cstdlib></highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="45"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="51"><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">Gecode<sp/>{<sp/></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">FlatZinc<sp/>{<sp/></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">AST<sp/>{</highlight></codeline>
|
|
<codeline lineno="52"><highlight class="normal"><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="53"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">Call;</highlight></codeline>
|
|
<codeline lineno="54"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">Array;</highlight></codeline>
|
|
<codeline lineno="55"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">Atom;</highlight></codeline>
|
|
<codeline lineno="56"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">SetLit;</highlight></codeline>
|
|
<codeline lineno="57"><highlight class="normal"><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="59" refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">GECODE_VTABLE_EXPORT<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref><sp/>{</highlight></codeline>
|
|
<codeline lineno="60"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">private</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/>std::string<sp/>_what;</highlight></codeline>
|
|
<codeline lineno="62"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>()<sp/>:<sp/>_what(</highlight><highlight class="stringliteral">""</highlight><highlight class="normal">)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>(std::string<sp/>what)<sp/>:<sp/>_what(what)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/>std::string<sp/>what(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>_what;<sp/>}</highlight></codeline>
|
|
<codeline lineno="66"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
|
<codeline lineno="67"><highlight class="normal"><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="71" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">GECODE_VTABLE_EXPORT<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref><sp/>{</highlight></codeline>
|
|
<codeline lineno="72"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/>~<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>append(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref>*<sp/>n);</highlight></codeline>
|
|
<codeline lineno="78"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>hasAtom(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string&<sp/></highlight><highlight class="keywordtype">id</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>isInt(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">&<sp/>i);</highlight></codeline>
|
|
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>isFloat(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal">&<sp/>i);</highlight></codeline>
|
|
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>isCall(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string&<sp/></highlight><highlight class="keywordtype">id</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Call" kindref="compound">Call</ref>*<sp/>getCall(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>hasCall(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string&<sp/></highlight><highlight class="keywordtype">id</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Call" kindref="compound">Call</ref>*<sp/>getCall(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string&<sp/></highlight><highlight class="keywordtype">id</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" kindref="compound">Array</ref>*<sp/>getArray(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Atom" kindref="compound">Atom</ref>*<sp/>getAtom(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/>std::string<sp/>getVarName(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>getIntVar(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>getBoolVar(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>getFloatVar(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>getSetVar(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>getInt(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>getBool(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>getFloat(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="115"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1SetLit" kindref="compound">SetLit</ref><sp/>*getSet(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/>std::string<sp/>getString(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="121"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>isIntVar(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>isBoolVar(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>isSetVar(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>isFloatVar(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>isInt(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>isFloat(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>isBool(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>isString(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>isArray(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>isSet(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>isAtom(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>print(std::ostream&)<sp/>=<sp/>0;</highlight></codeline>
|
|
<codeline lineno="145"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
|
<codeline lineno="146"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="148" refid="classGecode_1_1FlatZinc_1_1AST_1_1BoolLit" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">GECODE_VTABLE_EXPORT<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1BoolLit" kindref="compound">BoolLit</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref><sp/>{</highlight></codeline>
|
|
<codeline lineno="149"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>b;</highlight></codeline>
|
|
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1BoolLit" kindref="compound">BoolLit</ref>(</highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>b0)<sp/>:<sp/>b(b0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="152" refid="classGecode_1_1FlatZinc_1_1AST_1_1BoolLit_1a2b9b597d660d472ab9d5e700869c177f" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1BoolLit_1a2b9b597d660d472ab9d5e700869c177f" kindref="member">print</ref>(std::ostream&<sp/>os)<sp/>{</highlight></codeline>
|
|
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/><<<sp/></highlight><highlight class="stringliteral">"b("</highlight><highlight class="normal"><sp/><<<sp/>(b<sp/>?<sp/></highlight><highlight class="stringliteral">"true"</highlight><highlight class="normal"><sp/>:<sp/></highlight><highlight class="stringliteral">"false"</highlight><highlight class="normal">)<sp/><<<sp/></highlight><highlight class="stringliteral">")"</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="154"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="155"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
|
<codeline lineno="157" refid="classGecode_1_1FlatZinc_1_1AST_1_1IntLit" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">GECODE_VTABLE_EXPORT<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1IntLit" kindref="compound">IntLit</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref><sp/>{</highlight></codeline>
|
|
<codeline lineno="158"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
|
|
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1IntLit" kindref="compound">IntLit</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i0)<sp/>:<sp/>i(i0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="161" refid="classGecode_1_1FlatZinc_1_1AST_1_1IntLit_1a7b0eb9f1dcaebc24cb65c459e52f04be" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1IntLit_1a7b0eb9f1dcaebc24cb65c459e52f04be" kindref="member">print</ref>(std::ostream&<sp/>os)<sp/>{</highlight></codeline>
|
|
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/><<<sp/></highlight><highlight class="stringliteral">"i("</highlight><highlight class="normal"><<i<<</highlight><highlight class="stringliteral">")"</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="164"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
|
<codeline lineno="166" refid="classGecode_1_1FlatZinc_1_1AST_1_1FloatLit" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">GECODE_VTABLE_EXPORT<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1FloatLit" kindref="compound">FloatLit</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref><sp/>{</highlight></codeline>
|
|
<codeline lineno="167"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>d;</highlight></codeline>
|
|
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1FloatLit" kindref="compound">FloatLit</ref>(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>d0)<sp/>:<sp/>d(d0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="170" refid="classGecode_1_1FlatZinc_1_1AST_1_1FloatLit_1a6de3b2628e81982159b9543323268e17" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1FloatLit_1a6de3b2628e81982159b9543323268e17" kindref="member">print</ref>(std::ostream&<sp/>os)<sp/>{</highlight></codeline>
|
|
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/><<<sp/></highlight><highlight class="stringliteral">"f("</highlight><highlight class="normal"><<d<<</highlight><highlight class="stringliteral">")"</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="173"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
|
<codeline lineno="175" refid="classGecode_1_1FlatZinc_1_1AST_1_1SetLit" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">GECODE_VTABLE_EXPORT<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1SetLit" kindref="compound">SetLit</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref><sp/>{</highlight></codeline>
|
|
<codeline lineno="176"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>interval;</highlight></codeline>
|
|
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>min;<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>max;</highlight></codeline>
|
|
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/>std::vector<int><sp/>s;</highlight></codeline>
|
|
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1SetLit" kindref="compound">SetLit</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1SetLit" kindref="compound">SetLit</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>min0,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>max0)<sp/>:<sp/>interval(</highlight><highlight class="keyword">true</highlight><highlight class="normal">),<sp/>min(min0),<sp/>max(max0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1SetLit" kindref="compound">SetLit</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::vector<int>&<sp/>s0)<sp/>:<sp/>interval(</highlight><highlight class="keyword">false</highlight><highlight class="normal">),<sp/>s(s0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>empty(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
|
|
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(<sp/>(interval<sp/>&&<sp/>min>max)<sp/>||<sp/>(!interval<sp/>&&<sp/>s.size()<sp/>==<sp/>0));</highlight></codeline>
|
|
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="186" refid="classGecode_1_1FlatZinc_1_1AST_1_1SetLit_1ac8e57cdc6974a831b4a2d338ff832b4e" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1SetLit_1ac8e57cdc6974a831b4a2d338ff832b4e" kindref="member">print</ref>(std::ostream&<sp/>os)<sp/>{</highlight></codeline>
|
|
<codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/><<<sp/></highlight><highlight class="stringliteral">"s()"</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="189"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
|
<codeline lineno="190"><highlight class="normal"><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="192" refid="classGecode_1_1FlatZinc_1_1AST_1_1Var" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">GECODE_VTABLE_EXPORT<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Var" kindref="compound">Var</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref><sp/>{</highlight></codeline>
|
|
<codeline lineno="193"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="194"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;<sp/></highlight><highlight class="comment">//<<sp/>Index</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/>std::string<sp/>n;<sp/></highlight><highlight class="comment">//<<sp/>Name</highlight></codeline>
|
|
<codeline lineno="197" refid="classGecode_1_1FlatZinc_1_1AST_1_1Var_1a2239eb6f24ed2cef44422153b8078251" refkind="member"><highlight class="comment"></highlight><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Var_1a2239eb6f24ed2cef44422153b8078251" kindref="member">Var</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i0,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string&<sp/>n0)<sp/>:<sp/>i(i0),<sp/>n(n0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="198"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
|
<codeline lineno="200" refid="classGecode_1_1FlatZinc_1_1AST_1_1BoolVar" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">GECODE_VTABLE_EXPORT<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1BoolVar" kindref="compound">BoolVar</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Var" kindref="compound">Var</ref><sp/>{</highlight></codeline>
|
|
<codeline lineno="201"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="203" refid="classGecode_1_1FlatZinc_1_1AST_1_1BoolVar_1a8c11b1116821cc866023c67fe2f20bc4" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1BoolVar_1a8c11b1116821cc866023c67fe2f20bc4" kindref="member">BoolVar</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i0,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string&<sp/>n0=</highlight><highlight class="stringliteral">""</highlight><highlight class="normal">)<sp/>:<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Var" kindref="compound">Var</ref>(i0,n0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="204" refid="classGecode_1_1FlatZinc_1_1AST_1_1BoolVar_1aa10cf40aff163651e83cf673f54354b4" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1BoolVar_1aa10cf40aff163651e83cf673f54354b4" kindref="member">print</ref>(std::ostream&<sp/>os)<sp/>{</highlight></codeline>
|
|
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/><<<sp/></highlight><highlight class="stringliteral">"xb("</highlight><highlight class="normal"><<i<<</highlight><highlight class="stringliteral">")"</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="207"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
|
<codeline lineno="209" refid="classGecode_1_1FlatZinc_1_1AST_1_1IntVar" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">GECODE_VTABLE_EXPORT<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1IntVar" kindref="compound">IntVar</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Var" kindref="compound">Var</ref><sp/>{</highlight></codeline>
|
|
<codeline lineno="210"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1IntVar" kindref="compound">IntVar</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i0,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string&<sp/>n0=</highlight><highlight class="stringliteral">""</highlight><highlight class="normal">)<sp/>:<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Var" kindref="compound">Var</ref>(i0,n0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="212" refid="classGecode_1_1FlatZinc_1_1AST_1_1IntVar_1a0e3534e71debd60936cb004d1021fd75" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1IntVar_1a0e3534e71debd60936cb004d1021fd75" kindref="member">print</ref>(std::ostream&<sp/>os)<sp/>{</highlight></codeline>
|
|
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/><<<sp/></highlight><highlight class="stringliteral">"xi("</highlight><highlight class="normal"><<i<<</highlight><highlight class="stringliteral">")"</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="215"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
|
<codeline lineno="217" refid="classGecode_1_1FlatZinc_1_1AST_1_1FloatVar" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">GECODE_VTABLE_EXPORT<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1FloatVar" kindref="compound">FloatVar</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Var" kindref="compound">Var</ref><sp/>{</highlight></codeline>
|
|
<codeline lineno="218"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="219"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1FloatVar" kindref="compound">FloatVar</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i0,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string&<sp/>n0=</highlight><highlight class="stringliteral">""</highlight><highlight class="normal">)<sp/>:<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Var" kindref="compound">Var</ref>(i0,n0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="220" refid="classGecode_1_1FlatZinc_1_1AST_1_1FloatVar_1a071bcccedcb19c1403c22bcfcfcf2b8f" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1FloatVar_1a071bcccedcb19c1403c22bcfcfcf2b8f" kindref="member">print</ref>(std::ostream&<sp/>os)<sp/>{</highlight></codeline>
|
|
<codeline lineno="221"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/><<<sp/></highlight><highlight class="stringliteral">"xf("</highlight><highlight class="normal"><<i<<</highlight><highlight class="stringliteral">")"</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="223"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
|
<codeline lineno="225" refid="classGecode_1_1FlatZinc_1_1AST_1_1SetVar" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">GECODE_VTABLE_EXPORT<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1SetVar" kindref="compound">SetVar</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Var" kindref="compound">Var</ref><sp/>{</highlight></codeline>
|
|
<codeline lineno="226"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="227"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1SetVar" kindref="compound">SetVar</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i0,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string&<sp/>n0=</highlight><highlight class="stringliteral">""</highlight><highlight class="normal">)<sp/>:<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Var" kindref="compound">Var</ref>(i0,n0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="228" refid="classGecode_1_1FlatZinc_1_1AST_1_1SetVar_1a8d09114c116ba82ba2a24d76573aaef7" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1SetVar_1a8d09114c116ba82ba2a24d76573aaef7" kindref="member">print</ref>(std::ostream&<sp/>os)<sp/>{</highlight></codeline>
|
|
<codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/><<<sp/></highlight><highlight class="stringliteral">"xs("</highlight><highlight class="normal"><<i<<</highlight><highlight class="stringliteral">")"</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="231"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
|
<codeline lineno="232"><highlight class="normal"><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="234" refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">GECODE_VTABLE_EXPORT<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" kindref="compound">Array</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref><sp/>{</highlight></codeline>
|
|
<codeline lineno="235"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="236"><highlight class="normal"><sp/><sp/><sp/><sp/>std::vector<Node*><sp/>a;</highlight></codeline>
|
|
<codeline lineno="237"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" kindref="compound">Array</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::vector<Node*>&<sp/>a0)</highlight></codeline>
|
|
<codeline lineno="238"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/>a(a0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="239"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" kindref="compound">Array</ref>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref>*<sp/>n)</highlight></codeline>
|
|
<codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/>a(1)<sp/>{<sp/>a[0]<sp/>=<sp/>n;<sp/>}</highlight></codeline>
|
|
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" kindref="compound">Array</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>n=0)<sp/>:<sp/>a(n)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="242" refid="classGecode_1_1FlatZinc_1_1AST_1_1Array_1a8fad6e6065029e02a9c8262fe24922c2" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array_1a8fad6e6065029e02a9c8262fe24922c2" kindref="member">print</ref>(std::ostream&<sp/>os)<sp/>{</highlight></codeline>
|
|
<codeline lineno="243"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/><<<sp/></highlight><highlight class="stringliteral">"["</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i=0;<sp/>i<a.size();<sp/>i++)<sp/>{</highlight></codeline>
|
|
<codeline lineno="245"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>a[i]->print(os);</highlight></codeline>
|
|
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(i<a.size()-1)</highlight></codeline>
|
|
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/><<<sp/></highlight><highlight class="stringliteral">",<sp/>"</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/><<<sp/></highlight><highlight class="stringliteral">"]"</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="251"><highlight class="normal"><sp/><sp/><sp/><sp/>~<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" kindref="compound">Array</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="252"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i=a.size();<sp/>i--;)</highlight></codeline>
|
|
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">delete</highlight><highlight class="normal"><sp/>a[i];</highlight></codeline>
|
|
<codeline lineno="254"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="255"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
|
<codeline lineno="256"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="258" refid="classGecode_1_1FlatZinc_1_1AST_1_1Call" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">GECODE_VTABLE_EXPORT<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Call" kindref="compound">Call</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref><sp/>{</highlight></codeline>
|
|
<codeline lineno="259"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="260"><highlight class="normal"><sp/><sp/><sp/><sp/>std::string<sp/>id;</highlight></codeline>
|
|
<codeline lineno="261"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref>*<sp/>args;</highlight></codeline>
|
|
<codeline lineno="262"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Call" kindref="compound">Call</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string&<sp/>id0,<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref>*<sp/>args0)</highlight></codeline>
|
|
<codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/>id(id0),<sp/>args(args0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/>~<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Call" kindref="compound">Call</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{<sp/></highlight><highlight class="keyword">delete</highlight><highlight class="normal"><sp/>args;<sp/>}</highlight></codeline>
|
|
<codeline lineno="265" refid="classGecode_1_1FlatZinc_1_1AST_1_1Call_1aef502a4ef39a2e1f3ee21b0f94b9fefc" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Call_1aef502a4ef39a2e1f3ee21b0f94b9fefc" kindref="member">print</ref>(std::ostream&<sp/>os)<sp/>{</highlight></codeline>
|
|
<codeline lineno="266"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/><<<sp/></highlight><highlight class="keywordtype">id</highlight><highlight class="normal"><sp/><<<sp/></highlight><highlight class="stringliteral">"("</highlight><highlight class="normal">;<sp/>args->print(os);<sp/>os<sp/><<<sp/></highlight><highlight class="stringliteral">")"</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="267"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="268"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" kindref="compound">Array</ref>*<sp/>getArgs(</highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>n)<sp/>{</highlight></codeline>
|
|
<codeline lineno="269"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" kindref="compound">Array</ref><sp/>*a<sp/>=<sp/>args-><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a271e09414e30895a48ab802a09cfdc1a" kindref="member">getArray</ref>();</highlight></codeline>
|
|
<codeline lineno="270"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(a->a.size()<sp/>!=<sp/>n)</highlight></codeline>
|
|
<codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>(</highlight><highlight class="stringliteral">"arity<sp/>mismatch"</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="272"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a;</highlight></codeline>
|
|
<codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="274"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
|
<codeline lineno="275"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="277" refid="classGecode_1_1FlatZinc_1_1AST_1_1ArrayAccess" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">GECODE_VTABLE_EXPORT<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1ArrayAccess" kindref="compound">ArrayAccess</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref><sp/>{</highlight></codeline>
|
|
<codeline lineno="278"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref>*<sp/>a;</highlight></codeline>
|
|
<codeline lineno="280"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref>*<sp/>idx;</highlight></codeline>
|
|
<codeline lineno="281"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1ArrayAccess" kindref="compound">ArrayAccess</ref>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref>*<sp/>a0,<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref>*<sp/>idx0)</highlight></codeline>
|
|
<codeline lineno="282"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/>a(a0),<sp/>idx(idx0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="283"><highlight class="normal"><sp/><sp/><sp/><sp/>~<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1ArrayAccess" kindref="compound">ArrayAccess</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{<sp/></highlight><highlight class="keyword">delete</highlight><highlight class="normal"><sp/>a;<sp/></highlight><highlight class="keyword">delete</highlight><highlight class="normal"><sp/>idx;<sp/>}</highlight></codeline>
|
|
<codeline lineno="284" refid="classGecode_1_1FlatZinc_1_1AST_1_1ArrayAccess_1a14c02400594395c6d4e7c9be10b7f807" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1ArrayAccess_1a14c02400594395c6d4e7c9be10b7f807" kindref="member">print</ref>(std::ostream&<sp/>os)<sp/>{</highlight></codeline>
|
|
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>a-><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array_1a8fad6e6065029e02a9c8262fe24922c2" kindref="member">print</ref>(os);</highlight></codeline>
|
|
<codeline lineno="286"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/><<<sp/></highlight><highlight class="stringliteral">"["</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="287"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>idx->print(os);</highlight></codeline>
|
|
<codeline lineno="288"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/><<<sp/></highlight><highlight class="stringliteral">"]"</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="289"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="290"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
|
<codeline lineno="291"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="293" refid="classGecode_1_1FlatZinc_1_1AST_1_1Atom" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">GECODE_VTABLE_EXPORT<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Atom" kindref="compound">Atom</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref><sp/>{</highlight></codeline>
|
|
<codeline lineno="294"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="295"><highlight class="normal"><sp/><sp/><sp/><sp/>std::string<sp/>id;</highlight></codeline>
|
|
<codeline lineno="296"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Atom" kindref="compound">Atom</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string&<sp/>id0)<sp/>:<sp/>id(id0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="297" refid="classGecode_1_1FlatZinc_1_1AST_1_1Atom_1a9f8b858525768be172a0c192538c8f22" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Atom_1a9f8b858525768be172a0c192538c8f22" kindref="member">print</ref>(std::ostream&<sp/>os)<sp/>{</highlight></codeline>
|
|
<codeline lineno="298"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/><<<sp/>id;</highlight></codeline>
|
|
<codeline lineno="299"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="300"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
|
<codeline lineno="301"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="303" refid="classGecode_1_1FlatZinc_1_1AST_1_1String" refkind="compound"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">GECODE_VTABLE_EXPORT<sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1String" kindref="compound">String</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref><sp/>{</highlight></codeline>
|
|
<codeline lineno="304"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="305"><highlight class="normal"><sp/><sp/><sp/><sp/>std::string<sp/>s;</highlight></codeline>
|
|
<codeline lineno="306"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1String" kindref="compound">String</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string&<sp/>s0)<sp/>:<sp/>s(s0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="307" refid="classGecode_1_1FlatZinc_1_1AST_1_1String_1a8b3b945625fe4d5e4f00866a4d01f5d7" refkind="member"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1String_1a8b3b945625fe4d5e4f00866a4d01f5d7" kindref="member">print</ref>(std::ostream&<sp/>os)<sp/>{</highlight></codeline>
|
|
<codeline lineno="308"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/><<<sp/></highlight><highlight class="stringliteral">"s(\""</highlight><highlight class="normal"><sp/><<<sp/>s<sp/><<<sp/></highlight><highlight class="stringliteral">"\")"</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="309"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="310"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
|
|
<codeline lineno="311"><highlight class="normal"><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="312"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="313" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1aa18417070f57c9af4011b86a90dd9963" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1aa18417070f57c9af4011b86a90dd9963" kindref="member">Node::~Node</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="314"><highlight class="normal"><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="315"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="316" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a714f7b290019908fe5ef0efec1d84e04" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a714f7b290019908fe5ef0efec1d84e04" kindref="member">Node::append</ref>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref>*<sp/>newNode)<sp/>{</highlight></codeline>
|
|
<codeline lineno="317"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" kindref="compound">Array</ref>*<sp/>a<sp/>=<sp/></highlight><highlight class="keyword">dynamic_cast<</highlight><highlight class="normal"><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" kindref="compound">Array</ref>*</highlight><highlight class="keyword">></highlight><highlight class="normal">(</highlight><highlight class="keyword">this</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!a)</highlight></codeline>
|
|
<codeline lineno="319"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>(</highlight><highlight class="stringliteral">"array<sp/>expected"</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="320"><highlight class="normal"><sp/><sp/><sp/><sp/>a->a.push_back(newNode);</highlight></codeline>
|
|
<codeline lineno="321"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="322"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="323"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="324" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a88260fd0eabb620956c29f7c7b05e183" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a88260fd0eabb620956c29f7c7b05e183" kindref="member">Node::hasAtom</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string&<sp/></highlight><highlight class="keywordtype">id</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="325"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" kindref="compound">Array</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<Array*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))<sp/>{</highlight></codeline>
|
|
<codeline lineno="326"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i=a->a.size();<sp/>i--;)</highlight></codeline>
|
|
<codeline lineno="327"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Atom" kindref="compound">Atom</ref>*<sp/>at<sp/>=<sp/>dynamic_cast<Atom*>(a->a[i]))</highlight></codeline>
|
|
<codeline lineno="328"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(at->id<sp/>==<sp/></highlight><highlight class="keywordtype">id</highlight><highlight class="normal">)</highlight></codeline>
|
|
<codeline lineno="329"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="330"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Atom" kindref="compound">Atom</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<Atom*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))<sp/>{</highlight></codeline>
|
|
<codeline lineno="331"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a->id<sp/>==<sp/>id;</highlight></codeline>
|
|
<codeline lineno="332"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="333"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="334"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="335"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="336"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="337" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a95ebcdf87b7e46a1756f85905e9e444c" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a95ebcdf87b7e46a1756f85905e9e444c" kindref="member">Node::isCall</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string&<sp/></highlight><highlight class="keywordtype">id</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="338"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Call" kindref="compound">Call</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<Call*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))<sp/>{</highlight></codeline>
|
|
<codeline lineno="339"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(a->id<sp/>==<sp/></highlight><highlight class="keywordtype">id</highlight><highlight class="normal">)</highlight></codeline>
|
|
<codeline lineno="340"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="341"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="342"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="343"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="344"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="345"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Call" kindref="compound">Call</ref>*</highlight></codeline>
|
|
<codeline lineno="346" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1ad025ea160c39a800eb3b499a29f4e9c4" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1ad025ea160c39a800eb3b499a29f4e9c4" kindref="member">Node::getCall</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="347"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Call" kindref="compound">Call</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<Call*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))</highlight></codeline>
|
|
<codeline lineno="348"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a;</highlight></codeline>
|
|
<codeline lineno="349"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>(</highlight><highlight class="stringliteral">"call<sp/>expected"</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="350"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="351"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="352"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="353" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a4ddcd813748efd7e612914cfc61454c1" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a4ddcd813748efd7e612914cfc61454c1" kindref="member">Node::hasCall</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string&<sp/></highlight><highlight class="keywordtype">id</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="354"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" kindref="compound">Array</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<Array*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))<sp/>{</highlight></codeline>
|
|
<codeline lineno="355"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i=a->a.size();<sp/>i--;)</highlight></codeline>
|
|
<codeline lineno="356"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Call" kindref="compound">Call</ref>*<sp/>at<sp/>=<sp/>dynamic_cast<Call*>(a->a[i]))</highlight></codeline>
|
|
<codeline lineno="357"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(at->id<sp/>==<sp/></highlight><highlight class="keywordtype">id</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="358"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="359"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="360"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Call" kindref="compound">Call</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<Call*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))<sp/>{</highlight></codeline>
|
|
<codeline lineno="361"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a->id<sp/>==<sp/>id;</highlight></codeline>
|
|
<codeline lineno="362"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="363"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="364"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="365"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="366"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="367" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1aa5957d93c9016a66cb8218391c3a224b" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a91f7d7849685cc5d7a3ed9a731ad91c4" kindref="member">Node::isInt</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal">&<sp/>i)<sp/>{</highlight></codeline>
|
|
<codeline lineno="368"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1IntLit" kindref="compound">IntLit</ref>*<sp/>il<sp/>=<sp/>dynamic_cast<IntLit*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))<sp/>{</highlight></codeline>
|
|
<codeline lineno="369"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>i<sp/>=<sp/>il->i;</highlight></codeline>
|
|
<codeline lineno="370"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="371"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="372"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="373"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="374"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="375"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="376" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a9afcc32c6ae96e19b4dd69766de2e08b" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a7fcd5032ca4d07c686e1f915c2f3ea33" kindref="member">Node::isFloat</ref>(</highlight><highlight class="keywordtype">double</highlight><highlight class="normal">&<sp/>d)<sp/>{</highlight></codeline>
|
|
<codeline lineno="377"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1FloatLit" kindref="compound">FloatLit</ref>*<sp/>fl<sp/>=<sp/>dynamic_cast<FloatLit*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))<sp/>{</highlight></codeline>
|
|
<codeline lineno="378"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>d<sp/>=<sp/>fl->d;</highlight></codeline>
|
|
<codeline lineno="379"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="380"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="381"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="382"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="383"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="384"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Call" kindref="compound">Call</ref>*</highlight></codeline>
|
|
<codeline lineno="385" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a8edf0c873287d0f92ebafa414f652ca0" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1ad025ea160c39a800eb3b499a29f4e9c4" kindref="member">Node::getCall</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::string&<sp/></highlight><highlight class="keywordtype">id</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="386"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" kindref="compound">Array</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<Array*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))<sp/>{</highlight></codeline>
|
|
<codeline lineno="387"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i=a->a.size();<sp/>i--;)</highlight></codeline>
|
|
<codeline lineno="388"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Call" kindref="compound">Call</ref>*<sp/>at<sp/>=<sp/>dynamic_cast<Call*>(a->a[i]))</highlight></codeline>
|
|
<codeline lineno="389"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(at->id<sp/>==<sp/></highlight><highlight class="keywordtype">id</highlight><highlight class="normal">)</highlight></codeline>
|
|
<codeline lineno="390"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>at;</highlight></codeline>
|
|
<codeline lineno="391"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Call" kindref="compound">Call</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<Call*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))<sp/>{</highlight></codeline>
|
|
<codeline lineno="392"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(a->id<sp/>==<sp/></highlight><highlight class="keywordtype">id</highlight><highlight class="normal">)</highlight></codeline>
|
|
<codeline lineno="393"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a;</highlight></codeline>
|
|
<codeline lineno="394"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="395"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>(</highlight><highlight class="stringliteral">"call<sp/>expected"</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="396"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="397"><highlight class="normal"><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="398"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" kindref="compound">Array</ref>*</highlight></codeline>
|
|
<codeline lineno="399" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a271e09414e30895a48ab802a09cfdc1a" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a271e09414e30895a48ab802a09cfdc1a" kindref="member">Node::getArray</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="400"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" kindref="compound">Array</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<Array*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))</highlight></codeline>
|
|
<codeline lineno="401"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a;</highlight></codeline>
|
|
<codeline lineno="402"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>(</highlight><highlight class="stringliteral">"array<sp/>expected"</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="403"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="404"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="405"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Atom" kindref="compound">Atom</ref>*</highlight></codeline>
|
|
<codeline lineno="406" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1abe48b355694673ed8bc23e6694901d10" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1abe48b355694673ed8bc23e6694901d10" kindref="member">Node::getAtom</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="407"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Atom" kindref="compound">Atom</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<Atom*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))</highlight></codeline>
|
|
<codeline lineno="408"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a;</highlight></codeline>
|
|
<codeline lineno="409"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>(</highlight><highlight class="stringliteral">"atom<sp/>expected"</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="410"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="411"><highlight class="normal"><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="412"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/>std::string</highlight></codeline>
|
|
<codeline lineno="413" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1ad95fac54f5eeb6bec728e380177734d2" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1ad95fac54f5eeb6bec728e380177734d2" kindref="member">Node::getVarName</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="414"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Var" kindref="compound">Var</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<Var*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))</highlight></codeline>
|
|
<codeline lineno="415"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a->n;</highlight></codeline>
|
|
<codeline lineno="416"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>(</highlight><highlight class="stringliteral">"variable<sp/>expected"</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="417"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="418"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="419" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1abea8ae716612604e0b9561aae57251b5" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1abea8ae716612604e0b9561aae57251b5" kindref="member">Node::getIntVar</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="420"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1IntVar" kindref="compound">IntVar</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<IntVar*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))</highlight></codeline>
|
|
<codeline lineno="421"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a->i;</highlight></codeline>
|
|
<codeline lineno="422"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>(</highlight><highlight class="stringliteral">"integer<sp/>variable<sp/>expected"</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="423"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="424"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="425" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1add750d6f11c96d89c18337ca9a616c96" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1add750d6f11c96d89c18337ca9a616c96" kindref="member">Node::getBoolVar</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="426"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1BoolVar" kindref="compound">BoolVar</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<BoolVar*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))</highlight></codeline>
|
|
<codeline lineno="427"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a->i;</highlight></codeline>
|
|
<codeline lineno="428"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>(</highlight><highlight class="stringliteral">"bool<sp/>variable<sp/>expected"</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="429"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="430"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="431" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a63a64bde7ed095c11403636acb68822c" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a63a64bde7ed095c11403636acb68822c" kindref="member">Node::getFloatVar</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="432"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1FloatVar" kindref="compound">FloatVar</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<FloatVar*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))</highlight></codeline>
|
|
<codeline lineno="433"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a->i;</highlight></codeline>
|
|
<codeline lineno="434"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>(</highlight><highlight class="stringliteral">"integer<sp/>variable<sp/>expected"</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="435"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="436"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="437" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1aea769788996bcbe3d35530e3393f0011" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1aea769788996bcbe3d35530e3393f0011" kindref="member">Node::getSetVar</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="438"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1SetVar" kindref="compound">SetVar</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<SetVar*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))</highlight></codeline>
|
|
<codeline lineno="439"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a->i;</highlight></codeline>
|
|
<codeline lineno="440"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>(</highlight><highlight class="stringliteral">"set<sp/>variable<sp/>expected"</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="441"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="442"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="443" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1abc83be8a0565da08bbe8848643d8fdb0" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1abc83be8a0565da08bbe8848643d8fdb0" kindref="member">Node::getInt</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="444"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1IntLit" kindref="compound">IntLit</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<IntLit*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))</highlight></codeline>
|
|
<codeline lineno="445"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a->i;</highlight></codeline>
|
|
<codeline lineno="446"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>(</highlight><highlight class="stringliteral">"integer<sp/>literal<sp/>expected"</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="447"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="448"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="449" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1afb8daa455fb1050bb9457641bcd4a081" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1afb8daa455fb1050bb9457641bcd4a081" kindref="member">Node::getBool</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="450"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1BoolLit" kindref="compound">BoolLit</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<BoolLit*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))</highlight></codeline>
|
|
<codeline lineno="451"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a->b;</highlight></codeline>
|
|
<codeline lineno="452"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>(</highlight><highlight class="stringliteral">"bool<sp/>literal<sp/>expected"</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="453"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="454"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="455" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a44345c8a2177546a322a5fa5061be53e" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a44345c8a2177546a322a5fa5061be53e" kindref="member">Node::getFloat</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="456"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1FloatLit" kindref="compound">FloatLit</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<FloatLit*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))</highlight></codeline>
|
|
<codeline lineno="457"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a->d;</highlight></codeline>
|
|
<codeline lineno="458"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>(</highlight><highlight class="stringliteral">"float<sp/>literal<sp/>expected"</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="459"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="460"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1SetLit" kindref="compound">SetLit</ref>*</highlight></codeline>
|
|
<codeline lineno="461" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a7f4606088f447c00d584bc293d73d84d" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a7f4606088f447c00d584bc293d73d84d" kindref="member">Node::getSet</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="462"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1SetLit" kindref="compound">SetLit</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<SetLit*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))</highlight></codeline>
|
|
<codeline lineno="463"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a;</highlight></codeline>
|
|
<codeline lineno="464"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>(</highlight><highlight class="stringliteral">"set<sp/>literal<sp/>expected"</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="465"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="466"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/>std::string</highlight></codeline>
|
|
<codeline lineno="467" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1afc337aafc540f0222506ee3eacd4a920" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1afc337aafc540f0222506ee3eacd4a920" kindref="member">Node::getString</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="468"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1String" kindref="compound">String</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<String*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">))</highlight></codeline>
|
|
<codeline lineno="469"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a->s;</highlight></codeline>
|
|
<codeline lineno="470"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1TypeError" kindref="compound">TypeError</ref>(</highlight><highlight class="stringliteral">"string<sp/>literal<sp/>expected"</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="471"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="472"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="473" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1abd4ed66a4647062f3090048a973cabb7" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1abd4ed66a4647062f3090048a973cabb7" kindref="member">Node::isIntVar</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="474"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(dynamic_cast<IntVar*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">)<sp/>!=<sp/>NULL);</highlight></codeline>
|
|
<codeline lineno="475"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="476"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="477" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1ac58bdd215ef30a3fce05ab8958e813a0" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1ac58bdd215ef30a3fce05ab8958e813a0" kindref="member">Node::isBoolVar</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="478"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(dynamic_cast<BoolVar*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">)<sp/>!=<sp/>NULL);</highlight></codeline>
|
|
<codeline lineno="479"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="480"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="481" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a024fd8db719dd7e6a75751b7bf623730" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a024fd8db719dd7e6a75751b7bf623730" kindref="member">Node::isSetVar</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="482"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(dynamic_cast<SetVar*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">)<sp/>!=<sp/>NULL);</highlight></codeline>
|
|
<codeline lineno="483"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="484"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="485" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a350b36414263a1dd65a3021a870ae4c6" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a350b36414263a1dd65a3021a870ae4c6" kindref="member">Node::isFloatVar</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="486"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(dynamic_cast<FloatVar*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">)<sp/>!=<sp/>NULL);</highlight></codeline>
|
|
<codeline lineno="487"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="488"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="489" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a91f7d7849685cc5d7a3ed9a731ad91c4" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a91f7d7849685cc5d7a3ed9a731ad91c4" kindref="member">Node::isInt</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="490"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(dynamic_cast<IntLit*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">)<sp/>!=<sp/>NULL);</highlight></codeline>
|
|
<codeline lineno="491"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="492"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="493" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a29cabd825fb460caed03d51b624cf670" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a29cabd825fb460caed03d51b624cf670" kindref="member">Node::isBool</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="494"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(dynamic_cast<BoolLit*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">)<sp/>!=<sp/>NULL);</highlight></codeline>
|
|
<codeline lineno="495"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="496"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="497" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a7fcd5032ca4d07c686e1f915c2f3ea33" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a7fcd5032ca4d07c686e1f915c2f3ea33" kindref="member">Node::isFloat</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="498"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(dynamic_cast<FloatLit*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">)<sp/>!=<sp/>NULL);</highlight></codeline>
|
|
<codeline lineno="499"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="500"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="501" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a39f04e9a92bac33e0b34f3955ca6d979" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a39f04e9a92bac33e0b34f3955ca6d979" kindref="member">Node::isSet</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="502"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(dynamic_cast<SetLit*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">)<sp/>!=<sp/>NULL);</highlight></codeline>
|
|
<codeline lineno="503"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="504"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="505" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a8713492078dff6e5e50aa0bdca303997" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a8713492078dff6e5e50aa0bdca303997" kindref="member">Node::isString</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="506"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(dynamic_cast<String*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">)<sp/>!=<sp/>NULL);</highlight></codeline>
|
|
<codeline lineno="507"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="508"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="509" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a6e6c1cdd56b55530ef42b5f29d5b824c" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1a6e6c1cdd56b55530ef42b5f29d5b824c" kindref="member">Node::isArray</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="510"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(dynamic_cast<Array*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">)<sp/>!=<sp/>NULL);</highlight></codeline>
|
|
<codeline lineno="511"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="512"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="513" refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1abd2e0fb263a47f3364e9e209851dcc46" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node_1abd2e0fb263a47f3364e9e209851dcc46" kindref="member">Node::isAtom</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="514"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(dynamic_cast<Atom*>(</highlight><highlight class="keyword">this</highlight><highlight class="normal">)<sp/>!=<sp/>NULL);</highlight></codeline>
|
|
<codeline lineno="515"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="516"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="517"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref>*</highlight></codeline>
|
|
<codeline lineno="518"><highlight class="normal"><sp/><sp/>extractSingleton(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref>*<sp/>n)<sp/>{</highlight></codeline>
|
|
<codeline lineno="519"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Array" kindref="compound">Array</ref>*<sp/>a<sp/>=<sp/>dynamic_cast<Array*>(n))<sp/>{</highlight></codeline>
|
|
<codeline lineno="520"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(a->a.size()<sp/>==<sp/>1)<sp/>{</highlight></codeline>
|
|
<codeline lineno="521"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1FlatZinc_1_1AST_1_1Node" kindref="compound">Node</ref><sp/>*ret<sp/>=<sp/>a->a[0];</highlight></codeline>
|
|
<codeline lineno="522"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>a->a[0]<sp/>=<sp/>NULL;</highlight></codeline>
|
|
<codeline lineno="523"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">delete</highlight><highlight class="normal"><sp/>a;</highlight></codeline>
|
|
<codeline lineno="524"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
|
|
<codeline lineno="525"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="526"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="527"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>n;</highlight></codeline>
|
|
<codeline lineno="528"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="529"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="530"><highlight class="normal">}}}</highlight></codeline>
|
|
<codeline lineno="531"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="532"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight></codeline>
|
|
<codeline lineno="533"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="534"><highlight class="normal"></highlight><highlight class="comment">//<sp/>STATISTICS:<sp/>flatzinc-any</highlight><highlight class="normal"></highlight></codeline>
|
|
</programlisting>
|
|
<location file="/usr/include/gecode/flatzinc/ast.hh"/>
|
|
</compounddef>
|
|
</doxygen>
|