File: classKnownVariable.html

package info (click to toggle)
libqalculate 0.9.7-9.2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 8,764 kB
  • ctags: 6,001
  • sloc: cpp: 40,541; sh: 9,291; makefile: 64
file content (526 lines) | stat: -rw-r--r-- 29,431 bytes parent folder | download | duplicates (4)
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
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>libqalculate-0.9.7: KnownVariable Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.5 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li class="current"><a href="classes.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>KnownVariable Class Reference</h1><!-- doxytag: class="KnownVariable" --><!-- doxytag: inherits="Variable" -->A variable with a known value.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;Variable.h&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for KnownVariable:</div>
<div class="dynsection">

<p><center><img src="classKnownVariable.png" usemap="#KnownVariable_map" border="0" alt=""></center>
<map name="KnownVariable_map">
<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">
<area href="classDynamicVariable.html" alt="DynamicVariable" shape="rect" coords="0,168,109,192">
</map>
</div>

<p>
<a href="classKnownVariable-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="classKnownVariable.html#b5e159d27ccfd5129045f6fa611b61f3">KnownVariable</a> (string cat_, string name_, const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;o, string title_=&quot;&quot;, 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="classKnownVariable.html#371317c99c7a07820898d45b788431ca">KnownVariable</a> (string cat_, string name_, string expression_, string title_=&quot;&quot;, 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="classKnownVariable.html#6794900dc47e127cae001a5ec8af5e9b">KnownVariable</a> ()</td></tr>

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

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4c8d2bf7465ba186fe6a4879f492ae5a"></a><!-- doxytag: member="KnownVariable::copy" ref="4c8d2bf7465ba186fe6a4879f492ae5a" 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="3451de7a4c3c0848c14178af345100d9"></a><!-- doxytag: member="KnownVariable::set" ref="3451de7a4c3c0848c14178af345100d9" 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="classKnownVariable.html#76552c2fc02c6e9c41c9ba10acdc0efc">isKnown</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="classKnownVariable.html#78bc3730ecce97f44c907f25b5cd3136">isExpression</a> () const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKnownVariable.html#f421aaa4b74c8f3b7a1047b974085df4">expression</a> () const </td></tr>

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

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKnownVariable.html#b4602f4613094017ecd3dcc7c9989948">set</a> (const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;o)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKnownVariable.html#8e4025fe1a16385e24ad9662947a538c">set</a> (string expression_)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKnownVariable.html#f35979ac213868a22044422201f1fd1c">get</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKnownVariable.html#bb6707edd7e47c78b5dba7e840428523">representsPositive</a> (bool=false)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="17becb8ffc4dc5ed1d74b346922b78f3"></a><!-- doxytag: member="KnownVariable::representsNegative" ref="17becb8ffc4dc5ed1d74b346922b78f3" 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="0ad3236d79cbdca1ed4b60e94bc88c9e"></a><!-- doxytag: member="KnownVariable::representsNonNegative" ref="0ad3236d79cbdca1ed4b60e94bc88c9e" 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="3d60e107a90576dbba8275a67e665044"></a><!-- doxytag: member="KnownVariable::representsNonPositive" ref="3d60e107a90576dbba8275a67e665044" 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="aaa7afe4ed69fd24be5acf939391171b"></a><!-- doxytag: member="KnownVariable::representsInteger" ref="aaa7afe4ed69fd24be5acf939391171b" 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="33edfd16b2a0d9ec702e15fa633470a0"></a><!-- doxytag: member="KnownVariable::representsNumber" ref="33edfd16b2a0d9ec702e15fa633470a0" 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="daf80c5f0f00dba9a2ea0b05772fd921"></a><!-- doxytag: member="KnownVariable::representsRational" ref="daf80c5f0f00dba9a2ea0b05772fd921" 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="ecd4ce3d592aa2dc1652b20af630591a"></a><!-- doxytag: member="KnownVariable::representsReal" ref="ecd4ce3d592aa2dc1652b20af630591a" 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="162f7bc2ff447c104b31e93b5a0541ba"></a><!-- doxytag: member="KnownVariable::representsComplex" ref="162f7bc2ff447c104b31e93b5a0541ba" 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="3f6faf7c68bed4653ce3908fddeb0626"></a><!-- doxytag: member="KnownVariable::representsNonZero" ref="3f6faf7c68bed4653ce3908fddeb0626" 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="efb16afae80b7922ae581512b7a87e6c"></a><!-- doxytag: member="KnownVariable::representsEven" ref="efb16afae80b7922ae581512b7a87e6c" args="(bool=false)" -->
virtual bool&nbsp;</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="e66b9b0ebb5efa5932e3b189d6e61942"></a><!-- doxytag: member="KnownVariable::representsOdd" ref="e66b9b0ebb5efa5932e3b189d6e61942" args="(bool=false)" -->
virtual bool&nbsp;</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="b0284127b534e8364bb0fe8ee71a780b"></a><!-- doxytag: member="KnownVariable::representsUndefined" ref="b0284127b534e8364bb0fe8ee71a780b" args="(bool=false, bool=false, bool=false)" -->
virtual bool&nbsp;</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="f32d07c88005834bea188a15d1615da2"></a><!-- doxytag: member="KnownVariable::representsBoolean" ref="f32d07c88005834bea188a15d1615da2" args="()" -->
virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>representsBoolean</b> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="55f8218ce70a37d529e0d8883ea87909"></a><!-- doxytag: member="KnownVariable::representsNonMatrix" ref="55f8218ce70a37d529e0d8883ea87909" 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="595f537509d2d0adb877ec4e819413b5"></a><!-- doxytag: member="KnownVariable::mstruct" ref="595f537509d2d0adb877ec4e819413b5" args="" -->
<a class="el" href="classMathStructure.html">MathStructure</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><b>mstruct</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c422687ac96ecfabaca4fa6a6a486971"></a><!-- doxytag: member="KnownVariable::b_expression" ref="c422687ac96ecfabaca4fa6a6a486971" args="" -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>b_expression</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1d445df211540d5ccce5c95e504f2698"></a><!-- doxytag: member="KnownVariable::calculated_precision" ref="1d445df211540d5ccce5c95e504f2698" args="" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><b>calculated_precision</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="024a2084c2f3b0ef79232480e3bad3dc"></a><!-- doxytag: member="KnownVariable::sexpression" ref="024a2084c2f3b0ef79232480e3bad3dc" args="" -->
string&nbsp;</td><td class="memItemRight" valign="bottom"><b>sexpression</b></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A variable with a known value. 
<p>
Known variables have an associated value. The value can be a simple number or a full mathematical expression. The known variable class is used both for variable values and constants.<p>
The value can be provided as an expression in the form of a text string or as a mathematical value in the form of an object of the <a class="el" href="classMathStructure.html" title="A structure representing a mathematical value/expression/result.">MathStructure</a> class. The text string is parsed when needed, which saves time when loading many variable definitions which might not be used, at least not immediately. <hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="b5e159d27ccfd5129045f6fa611b61f3"></a><!-- doxytag: member="KnownVariable::KnownVariable" ref="b5e159d27ccfd5129045f6fa611b61f3" args="(string cat_, string name_, const MathStructure &amp;o, string title_=&quot;&quot;, bool is_local=true, bool is_builtin=false, bool is_active=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KnownVariable::KnownVariable           </td>
          <td>(</td>
          <td class="paramtype">string&nbsp;</td>
          <td class="paramname"> <em>cat_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string&nbsp;</td>
          <td class="paramname"> <em>name_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>o</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string&nbsp;</td>
          <td class="paramname"> <em>title_</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>is_local</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>is_builtin</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>is_active</em> = <code>true</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create a known variable with a value.<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>o</em>&nbsp;</td><td>Value. </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>

</div>
</div><p>
<a class="anchor" name="371317c99c7a07820898d45b788431ca"></a><!-- doxytag: member="KnownVariable::KnownVariable" ref="371317c99c7a07820898d45b788431ca" args="(string cat_, string name_, string expression_, string title_=&quot;&quot;, bool is_local=true, bool is_builtin=false, bool is_active=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KnownVariable::KnownVariable           </td>
          <td>(</td>
          <td class="paramtype">string&nbsp;</td>
          <td class="paramname"> <em>cat_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string&nbsp;</td>
          <td class="paramname"> <em>name_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string&nbsp;</td>
          <td class="paramname"> <em>expression_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">string&nbsp;</td>
          <td class="paramname"> <em>title_</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>is_local</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>is_builtin</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>is_active</em> = <code>true</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create a known variable with an text string expression.<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>expression_</em>&nbsp;</td><td>Expression. </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>

</div>
</div><p>
<a class="anchor" name="6794900dc47e127cae001a5ec8af5e9b"></a><!-- doxytag: member="KnownVariable::KnownVariable" ref="6794900dc47e127cae001a5ec8af5e9b" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KnownVariable::KnownVariable           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create an empty known variable. Primarily for internal use. 
</div>
</div><p>
<a class="anchor" name="9ca24b6ae1b7caa636a43f16694e33bf"></a><!-- doxytag: member="KnownVariable::KnownVariable" ref="9ca24b6ae1b7caa636a43f16694e33bf" args="(const KnownVariable *variable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KnownVariable::KnownVariable           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classKnownVariable.html">KnownVariable</a> *&nbsp;</td>
          <td class="paramname"> <em>variable</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create a copy of a known 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>Known variable to copy. </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="76552c2fc02c6e9c41c9ba10acdc0efc"></a><!-- doxytag: member="KnownVariable::isKnown" ref="76552c2fc02c6e9c41c9ba10acdc0efc" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KnownVariable::isKnown           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>Implements <a class="el" href="classVariable.html#1d3615b28d01c5a84346a63a97b64316">Variable</a>.</p>

</div>
</div><p>
<a class="anchor" name="78bc3730ecce97f44c907f25b5cd3136"></a><!-- doxytag: member="KnownVariable::isExpression" ref="78bc3730ecce97f44c907f25b5cd3136" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool KnownVariable::isExpression           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns if the variable has an text string expression instead of a value.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if the variable has an expression instead of a value. </dd></dl>

</div>
</div><p>
<a class="anchor" name="f421aaa4b74c8f3b7a1047b974085df4"></a><!-- doxytag: member="KnownVariable::expression" ref="f421aaa4b74c8f3b7a1047b974085df4" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual string KnownVariable::expression           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the variable's string expression or an empty string if it has not got an expression.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The variable's expression. </dd></dl>

</div>
</div><p>
<a class="anchor" name="dbccee6770fa72d8074e70337871cc5b"></a><!-- doxytag: member="KnownVariable::subtype" ref="dbccee6770fa72d8074e70337871cc5b" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KnownVariable::subtype           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>Reimplemented from <a class="el" href="classVariable.html#3e6d81fe2467b8627b09af909e835742">Variable</a>.</p>

<p>References <a class="el" href="Variable_8h-source.html#l00068">SUBTYPE_KNOWN_VARIABLE</a>.</p>

</div>
</div><p>
<a class="anchor" name="b4602f4613094017ecd3dcc7c9989948"></a><!-- doxytag: member="KnownVariable::set" ref="b4602f4613094017ecd3dcc7c9989948" args="(const MathStructure &amp;o)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void KnownVariable::set           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classMathStructure.html">MathStructure</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>o</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<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>&nbsp;</td><td>Value. </td></tr>
  </table>
</dl>

<p>Reimplemented in <a class="el" href="classDynamicVariable.html#e449e0df12e0a71de7cbcbdf5794a852">DynamicVariable</a>.</p>

</div>
</div><p>
<a class="anchor" name="8e4025fe1a16385e24ad9662947a538c"></a><!-- doxytag: member="KnownVariable::set" ref="8e4025fe1a16385e24ad9662947a538c" args="(string expression_)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void KnownVariable::set           </td>
          <td>(</td>
          <td class="paramtype">string&nbsp;</td>
          <td class="paramname"> <em>expression_</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<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>&nbsp;</td><td>Expression. </td></tr>
  </table>
</dl>

<p>Reimplemented in <a class="el" href="classDynamicVariable.html#1c480cef3c985e7ec4ea4d0cbb033706">DynamicVariable</a>.</p>

</div>
</div><p>
<a class="anchor" name="f35979ac213868a22044422201f1fd1c"></a><!-- doxytag: member="KnownVariable::get" ref="f35979ac213868a22044422201f1fd1c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="classMathStructure.html">MathStructure</a>&amp; KnownVariable::get           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<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 class="return" compact><dt><b>Returns:</b></dt><dd>The value of the variable.. </dd></dl>

<p>Reimplemented in <a class="el" href="classDynamicVariable.html#09f39a44b6495d9da4a42f826e7243c4">DynamicVariable</a>.</p>

</div>
</div><p>
<a class="anchor" name="bb6707edd7e47c78b5dba7e840428523"></a><!-- doxytag: member="KnownVariable::representsPositive" ref="bb6707edd7e47c78b5dba7e840428523" args="(bool=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool KnownVariable::representsPositive           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> = <code>false</code>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns if the variable represents a positive value. 
<p>Reimplemented from <a class="el" href="classVariable.html#4b34b6e7e72601c7915613498ef69744">Variable</a>.</p>

<p>Reimplemented in <a class="el" href="classDynamicVariable.html#3219611453495b5e6125c2da970077ca">DynamicVariable</a>.</p>

</div>
</div><p>
<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>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Jan 5 08:26:29 2010 for libqalculate-0.9.7 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>
</html>