Value representing the result of a binary operation.
More...
#include <Value.h>
Value representing the result of a binary operation.
◆ BinaryOpValue() [1/2]
Copy constructor, disabled.
- Parameters
-
[in] | value | The value to copy. |
◆ BinaryOpValue() [2/2]
BinaryOpValue::BinaryOpValue |
( |
ValuePtr |
left, |
|
|
ValuePtr |
right, |
|
|
std::string |
oper |
|
) |
| |
Constructor.
- Parameters
-
[in] | left | Value representing the left side of the operator. |
[in] | right | Value representing the right side of the operator. |
[in] | oper | The operator for this value. |
◆ GetPrecedence()
int BinaryOpValue::GetPrecedence |
( |
| ) |
const |
|
overridevirtual |
Retrieves the operator precedence for this operation.
Lower values bind stronger, i.e. they are resolved earlier. If an operand has a higher precedence value than the operator, parentheses are not required for that operand.
- Returns
- the order of precedence for the operation.
Reimplemented from Value.
◆ Negate()
Negates a value.
- Returns
- The value, negated.
Reimplemented from Value.
◆ operator=()
Copy constructor, disabled.
- Parameters
-
[in] | value | The value to copy. |
◆ Print()
std::ostream & BinaryOpValue::Print |
( |
std::ostream & |
output | ) |
const |
|
overridevirtual |
Print the value to a stream.
- Parameters
-
[out] | output | The stream to write to. |
- Returns
- The stream used for output.
Implements Value.
◆ left_val_
Value at the left side of the operator.
◆ oper_
const std::string BinaryOpValue::oper_ |
|
protected |
◆ right_val_
const ValuePtr BinaryOpValue::right_val_ |
|
protected |
Value at the right side of the operator.
The documentation for this class was generated from the following files: