File: classUnknownVariable.html

package info (click to toggle)
libqalculate 0.9.6-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 8,096 kB
  • ctags: 5,501
  • sloc: cpp: 40,337; sh: 9,010; makefile: 67
file content (379 lines) | stat: -rw-r--r-- 18,759 bytes parent folder | download
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
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
<!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: UnknownVariable 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&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>UnknownVariable Class Reference</h1><!-- doxytag: class=<UnknownVariable> --><!-- doxytag: inherits=<Variable> -->A variable with unknown value.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;Variable.h&gt;</code>
<p>
<p>Inheritance diagram for UnknownVariable:
<p><center><img src="classUnknownVariable.png" usemap="#UnknownVariable_map" border="0" alt=""></center>
<map name="UnknownVariable_map">
<area href="classVariable.html" alt="Variable" shape="rect" coords="0,56,111,80">
<area href="classExpressionItem.html" alt="ExpressionItem" shape="rect" coords="0,0,111,24">
</map>
<a href="classUnknownVariable-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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnknownVariable.html#a0">UnknownVariable</a> (string cat_, string name_, string title_="", bool is_local=true, bool is_builtin=false, bool is_active=true)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnknownVariable.html#a1">UnknownVariable</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnknownVariable.html#a2">UnknownVariable</a> (const <a class="el" href="classUnknownVariable.html">UnknownVariable</a> *variable)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4"></a><!-- doxytag: member=<UnknownVariable::copy> ref=<a4> args=<() const > -->
virtual <a class="el" href="classExpressionItem.html">ExpressionItem</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><b>copy</b> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5"></a><!-- doxytag: member=<UnknownVariable::set> ref=<a5> args=<(const ExpressionItem *item)> -->
virtual void&nbsp;</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">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnknownVariable.html#a6">isKnown</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnknownVariable.html#a7">setAssumptions</a> (<a class="el" href="classAssumptions.html">Assumptions</a> *ass)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classAssumptions.html">Assumptions</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnknownVariable.html#a8">assumptions</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnknownVariable.html#a9">subtype</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classUnknownVariable.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=<UnknownVariable::representsNegative> ref=<a11> args=<(bool=false)> -->
virtual bool&nbsp;</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=<UnknownVariable::representsNonNegative> ref=<a12> args=<(bool=false)> -->
virtual bool&nbsp;</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=<UnknownVariable::representsNonPositive> ref=<a13> args=<(bool=false)> -->
virtual bool&nbsp;</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=<UnknownVariable::representsInteger> ref=<a14> args=<(bool=false)> -->
virtual bool&nbsp;</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=<UnknownVariable::representsNumber> ref=<a15> args=<(bool=false)> -->
virtual bool&nbsp;</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=<UnknownVariable::representsRational> ref=<a16> args=<(bool=false)> -->
virtual bool&nbsp;</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=<UnknownVariable::representsReal> ref=<a17> args=<(bool=false)> -->
virtual bool&nbsp;</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=<UnknownVariable::representsComplex> ref=<a18> args=<(bool=false)> -->
virtual bool&nbsp;</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=<UnknownVariable::representsNonZero> ref=<a19> args=<(bool=false)> -->
virtual bool&nbsp;</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=<UnknownVariable::representsNonMatrix> ref=<a20> args=<()> -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>representsNonMatrix</b> ()</td></tr>

<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p0"></a><!-- doxytag: member=<UnknownVariable::o_assumption> ref=<p0> args=<> -->
<a class="el" href="classAssumptions.html">Assumptions</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><b>o_assumption</b></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A variable with unknown value. 
<p>
Unknown variables have an associated assumption object.
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a0"></a><!-- doxytag: member=<UnknownVariable::UnknownVariable> ref=<a0> args=<(string cat_, string name_, string title_="", bool is_local=true, bool is_builtin=false, bool is_active=true)> --><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">UnknownVariable::UnknownVariable           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">string&nbsp;</td>
          <td class="mdname" nowrap> <em>cat_</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>string&nbsp;</td>
          <td class="mdname" nowrap> <em>name_</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>string&nbsp;</td>
          <td class="mdname" nowrap> <em>title_</em> = <code>""</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>is_local</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>is_builtin</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>is_active</em> = <code>true</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create an unknown.<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>cat_</em>&nbsp;</td><td>Category that the variable belongs to. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name_</em>&nbsp;</td><td>Initial name of the variable. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>title_</em>&nbsp;</td><td>Descriptive name. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>is_local</em>&nbsp;</td><td>If the variable is local/user-defined or global. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>is_builtin</em>&nbsp;</td><td>If the variable is builtin and not modifiable. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>is_active</em>&nbsp;</td><td>If the variable is active and can be used in expressions.</td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a1"></a><!-- doxytag: member=<UnknownVariable::UnknownVariable> ref=<a1> 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">UnknownVariable::UnknownVariable           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create an empty unknown variable.    </td>
  </tr>
</table>
<a class="anchor" name="a2"></a><!-- doxytag: member=<UnknownVariable::UnknownVariable> ref=<a2> args=<(const UnknownVariable *variable)> --><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">UnknownVariable::UnknownVariable           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="classUnknownVariable.html">UnknownVariable</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>variable</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create a copy of an unknown variable.<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>variable</em>&nbsp;</td><td>Unknown variable to copy.</td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a8"></a><!-- doxytag: member=<UnknownVariable::assumptions> ref=<a8> 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"><a class="el" href="classAssumptions.html">Assumptions</a>* UnknownVariable::assumptions           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the assumptions of the unknown variable.<p>
<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="classAssumptions.html">Assumptions</a> of the unknown variable.</dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a6"></a><!-- doxytag: member=<UnknownVariable::isKnown> ref=<a6> 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">bool UnknownVariable::isKnown           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns if the variable has a known value (as oppossed to assumptions).<p>
<dl compact><dt><b>Returns:</b></dt><dd>true if the variable is of class <a class="el" href="classKnownVariable.html">KnownVariable</a>, false if UnknownVariable.</dd></dl>

<p>
Implements <a class="el" href="classVariable.html#a8">Variable</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a10"></a><!-- doxytag: member=<UnknownVariable::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 UnknownVariable::representsPositive           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">bool&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> = <code>false</code>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns if the variable represents a positive value.
<p>
Reimplemented from <a class="el" href="classVariable.html#a9">Variable</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a7"></a><!-- doxytag: member=<UnknownVariable::setAssumptions> ref=<a7> args=<(Assumptions *ass)> --><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 UnknownVariable::setAssumptions           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classAssumptions.html">Assumptions</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>ass</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets the assumptions of the unknown variable.<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>ass</em>&nbsp;</td><td><a class="el" href="classAssumptions.html">Assumptions</a>.</td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a9"></a><!-- doxytag: member=<UnknownVariable::subtype> 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 UnknownVariable::subtype           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the subtype of the variable, corresponding to which subsubclass the object belongs to.<p>
<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="Variable_8h.html#a19">VariableSubtype</a>.</dd></dl>

<p>
Reimplemented from <a class="el" href="classVariable.html#a7">Variable</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&nbsp;<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>