|
coan
6.0.1
A C/C++ Configuration Analyzer
|
struct evaluation represents the result of evaluating a putative expression.
More...
#include <evaluation.h>
Public Member Functions | |
| evaluation (integer const &val) | |
Explicitly construct from an integer. More... | |
| evaluation (int val) | |
Explicitly construct from int. More... | |
| bool | resolved () const |
| Say whether the expression has been resolved. | |
| bool | is_true () const |
| Say whether the expression is true. | |
| bool | is_false () const |
| Say whether the expression is false. | |
| bool | insoluble () const |
| Say whether the expression is insoluble. | |
| bool | empty () const |
| Say whether the expression is empty. | |
| unsigned short & | net_infix_ops () |
| Get/set the residual number of binary operators in the expression, after simplification. More... | |
| integer const & | value () const |
| Get the integral value of the expression. | |
| void | set_value (integer const &val) |
| Set the integral value of the expression. | |
| void | set_value (int val) |
| Set the integral value of the expression. | |
| void | set_insoluble () |
| Classify the expression as insoluble. | |
| void | set_empty () |
| Classify the expression as empty. | |
| void | set_parens_off (size_t loff, size_t roff) |
| Set the text offsets of surrounding parentheses. | |
| void | clear_parens_off () |
| Clear the text offsets of surrounding parentheses. | |
| size_t | lparen_off () const |
| Get the text offset of the left parenthesis, if any. -1 if none. | |
| size_t | rparen_off () const |
| Get the text offset of the right parenthesis, if any. -1 if none. | |
Private Attributes | |
| integer | _value {INT_UNDEF} |
| The integer value of the evaluated expression if it is soluble. | |
| unsigned short | _net_infix_ops = 0 |
| Number of binary operators remaining in the evaluated expression after simplification. | |
| bool | _empty = false |
| Is the expression empty? | |
| bool | _insoluble = false |
| Is the expression insoluble;. | |
| size_t | _lparen_off = size_t(-1) |
| size_t | _rparen_off = size_t(-1) |
| Text offset of right parenethesis, if any. | |
struct evaluation represents the result of evaluating a putative expression.
Definition at line 48 of file evaluation.h.
|
inlineexplicit |
Explicitly construct from an integer.
| val | An integer to be evaluated. |
Definition at line 55 of file evaluation.h.
|
inlineexplicit |
Explicitly construct from int.
| val | An int to be evaluated. |
Definition at line 61 of file evaluation.h.
|
inline |
Get/set the residual number of binary operators in the expression, after simplification.
Definition at line 93 of file evaluation.h.
|
private |
Has the expression been simplified? Text offset of left parenethesis, if any
Definition at line 160 of file evaluation.h.