1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>libqalculate-0.9.6: DynamicVariable Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.3 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div>
<h1>DynamicVariable Class Reference</h1><!-- doxytag: class=<DynamicVariable> --><!-- doxytag: inherits=<KnownVariable> -->Abstract base class for variables with a value which is recalculated when the precision has changed.
<a href="#_details">More...</a>
<p>
<code>#include <Variable.h></code>
<p>
<p>Inheritance diagram for DynamicVariable:
<p><center><img src="classDynamicVariable.png" usemap="#DynamicVariable_map" border="0" alt=""></center>
<map name="DynamicVariable_map">
<area href="classKnownVariable.html" alt="KnownVariable" shape="rect" coords="0,112,109,136">
<area href="classVariable.html" alt="Variable" shape="rect" coords="0,56,109,80">
<area href="classExpressionItem.html" alt="ExpressionItem" shape="rect" coords="0,0,109,24">
</map>
<a href="classDynamicVariable-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0"></a><!-- doxytag: member=<DynamicVariable::DynamicVariable> ref=<a0> args=<(string cat_, string name_, string title_="", bool is_local=false, bool is_builtin=true, bool is_active=true)> -->
</td><td class="memItemRight" valign="bottom"><b>DynamicVariable</b> (string cat_, string name_, string title_="", bool is_local=false, bool is_builtin=true, bool is_active=true)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1"></a><!-- doxytag: member=<DynamicVariable::DynamicVariable> ref=<a1> args=<(const DynamicVariable *variable)> -->
</td><td class="memItemRight" valign="bottom"><b>DynamicVariable</b> (const <a class="el" href="classDynamicVariable.html">DynamicVariable</a> *variable)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4"></a><!-- doxytag: member=<DynamicVariable::copy> ref=<a4> args=<() const =0> -->
<a class="el" href="classExpressionItem.html">ExpressionItem</a> * </td><td class="memItemRight" valign="bottom"><b>copy</b> () const =0</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5"></a><!-- doxytag: member=<DynamicVariable::set> ref=<a5> args=<(const ExpressionItem *item)> -->
void </td><td class="memItemRight" valign="bottom"><b>set</b> (const <a class="el" href="classExpressionItem.html">ExpressionItem</a> *item)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classMathStructure.html">MathStructure</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classDynamicVariable.html#a6">get</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classDynamicVariable.html#a7">set</a> (const <a class="el" href="classMathStructure.html">MathStructure</a> &o)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classDynamicVariable.html#a8">set</a> (string expression_)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classDynamicVariable.html#a9">calculatedPrecision</a> () const </td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classDynamicVariable.html#a10">representsPositive</a> (bool=false)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a11"></a><!-- doxytag: member=<DynamicVariable::representsNegative> ref=<a11> args=<(bool=false)> -->
virtual bool </td><td class="memItemRight" valign="bottom"><b>representsNegative</b> (bool=false)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a12"></a><!-- doxytag: member=<DynamicVariable::representsNonNegative> ref=<a12> args=<(bool=false)> -->
virtual bool </td><td class="memItemRight" valign="bottom"><b>representsNonNegative</b> (bool=false)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a13"></a><!-- doxytag: member=<DynamicVariable::representsNonPositive> ref=<a13> args=<(bool=false)> -->
virtual bool </td><td class="memItemRight" valign="bottom"><b>representsNonPositive</b> (bool=false)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a14"></a><!-- doxytag: member=<DynamicVariable::representsInteger> ref=<a14> args=<(bool=false)> -->
virtual bool </td><td class="memItemRight" valign="bottom"><b>representsInteger</b> (bool=false)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a15"></a><!-- doxytag: member=<DynamicVariable::representsNumber> ref=<a15> args=<(bool=false)> -->
virtual bool </td><td class="memItemRight" valign="bottom"><b>representsNumber</b> (bool=false)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a16"></a><!-- doxytag: member=<DynamicVariable::representsRational> ref=<a16> args=<(bool=false)> -->
virtual bool </td><td class="memItemRight" valign="bottom"><b>representsRational</b> (bool=false)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a17"></a><!-- doxytag: member=<DynamicVariable::representsReal> ref=<a17> args=<(bool=false)> -->
virtual bool </td><td class="memItemRight" valign="bottom"><b>representsReal</b> (bool=false)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a18"></a><!-- doxytag: member=<DynamicVariable::representsComplex> ref=<a18> args=<(bool=false)> -->
virtual bool </td><td class="memItemRight" valign="bottom"><b>representsComplex</b> (bool=false)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a19"></a><!-- doxytag: member=<DynamicVariable::representsNonZero> ref=<a19> args=<(bool=false)> -->
virtual bool </td><td class="memItemRight" valign="bottom"><b>representsNonZero</b> (bool=false)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a20"></a><!-- doxytag: member=<DynamicVariable::representsEven> ref=<a20> args=<(bool=false)> -->
virtual bool </td><td class="memItemRight" valign="bottom"><b>representsEven</b> (bool=false)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a21"></a><!-- doxytag: member=<DynamicVariable::representsOdd> ref=<a21> args=<(bool=false)> -->
virtual bool </td><td class="memItemRight" valign="bottom"><b>representsOdd</b> (bool=false)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a22"></a><!-- doxytag: member=<DynamicVariable::representsUndefined> ref=<a22> args=<(bool=false, bool=false, bool=false)> -->
virtual bool </td><td class="memItemRight" valign="bottom"><b>representsUndefined</b> (bool=false, bool=false, bool=false)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a23"></a><!-- doxytag: member=<DynamicVariable::representsBoolean> ref=<a23> args=<()> -->
virtual bool </td><td class="memItemRight" valign="bottom"><b>representsBoolean</b> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a24"></a><!-- doxytag: member=<DynamicVariable::representsNonMatrix> ref=<a24> args=<()> -->
virtual bool </td><td class="memItemRight" valign="bottom"><b>representsNonMatrix</b> ()</td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b0"></a><!-- doxytag: member=<DynamicVariable::calculate> ref=<b0> args=<() const =0> -->
virtual void </td><td class="memItemRight" valign="bottom"><b>calculate</b> () const =0</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Abstract base class for variables with a value which is recalculated when the precision has changed.
<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a9"></a><!-- doxytag: member=<DynamicVariable::calculatedPrecision> ref=<a9> args=<() const > --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int DynamicVariable::calculatedPrecision </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Returns the precision of the calculated value.<p>
<dl compact><dt><b>Returns:</b></dt><dd>Precision of the calculated value or zero if the value has not yet been calculated.</dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="a6"></a><!-- doxytag: member=<DynamicVariable::get> ref=<a6> args=<()> --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">const <a class="el" href="classMathStructure.html">MathStructure</a>& DynamicVariable::get </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Returns the value of the variable. If no value is set or parsed and an expression is set, the expression is parsed and resulting value returned.<p>
<dl compact><dt><b>Returns:</b></dt><dd>The value of the variable..</dd></dl>
<p>
Reimplemented from <a class="el" href="classKnownVariable.html#a13">KnownVariable</a>. </td>
</tr>
</table>
<a class="anchor" name="a10"></a><!-- doxytag: member=<DynamicVariable::representsPositive> ref=<a10> args=<(bool=false)> --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual bool DynamicVariable::representsPositive </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">bool </td>
<td class="mdname1" valign="top" nowrap> = <code>false</code> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Returns if the variable represents a positive value.
<p>
Reimplemented from <a class="el" href="classKnownVariable.html#a14">KnownVariable</a>. </td>
</tr>
</table>
<a class="anchor" name="a8"></a><!-- doxytag: member=<DynamicVariable::set> ref=<a8> args=<(string expression_)> --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void DynamicVariable::set </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">string </td>
<td class="mdname1" valign="top" nowrap> <em>expression_</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Sets the text string expression of the variable. The value is cleared.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>expression_</em> </td><td>Expression.</td></tr>
</table>
</dl>
<p>
Reimplemented from <a class="el" href="classKnownVariable.html#a12">KnownVariable</a>. </td>
</tr>
</table>
<a class="anchor" name="a7"></a><!-- doxytag: member=<DynamicVariable::set> ref=<a7> args=<(const MathStructure &o)> --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void DynamicVariable::set </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classMathStructure.html">MathStructure</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>o</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Sets the value of the variable. If expression is set, it is cleared.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>o</em> </td><td>Value.</td></tr>
</table>
</dl>
<p>
Reimplemented from <a class="el" href="classKnownVariable.html#a11">KnownVariable</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li>libqalculate/<a class="el" href="Variable_8h.html">Variable.h</a></ul>
<hr size="1"><address style="align: right;"><small>
Generated on 17 Jun 2007 for libqalculate-0.9.6 by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.3</small></address>
</body>
</html>
|