Rhino C++ API
8.14
|
#include <opennurbs_parse.h>
Public Types | |
enum | ERROR_CONDITION { no_error = 0, program_error = 1, invalid_expression_error = 2, divide_by_zero_error = 3, overflow_error = 4 } |
Public Member Functions | |
ON_ArithmeticCalculator () | |
ON_ArithmeticCalculator (const ON_ArithmeticCalculator &) | |
ON_ArithmeticCalculator (ON_ArithmeticCalculator &&) | |
bool | Add () |
void | ClearAll () |
bool | Divide () |
ERROR_CONDITION | ErrorCondition () const |
bool | Evaluate (double *value) |
bool | ImpliedMultiplication () const |
bool | LeftParenthesis () |
bool | Multiply () |
bool | Number (double x) |
ON_ArithmeticCalculator & | operator= (const ON_ArithmeticCalculator &) |
ON_ArithmeticCalculator & | operator= (ON_ArithmeticCalculator &&) |
unsigned int | ParenthesesDepth () const |
bool | PendingImpliedMultiplication () const |
bool | PendingUnaryMinus () const |
bool | PendingUnaryOperation () const |
bool | PendingUnaryPlus () const |
bool | RightParenthesis () |
void | SetImpliedMultiplication (bool bEnable) |
bool | SimpleNumber (double x) |
bool | Subtract () |
bool | UnaryMinus () |
bool | UnaryPlus () |
Copyright (c) 1993-2022 Robert McNeel & Associates. All rights reserved. OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert McNeel & Associates.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
For complete openNURBS copyright information see http://www.opennurbs.org.
Current Status
Enumerator | |
---|---|
no_error | |
program_error | |
invalid_expression_error | The part of the computer running the ON_ArithmeticCalculator code is corrupt or damaged or there is a bug in the ON_ArithmeticCalculator code. |
divide_by_zero_error | The input expression does not make sense. |
overflow_error | A calculation requested division by zero. |
ON_ArithmeticCalculator::ON_ArithmeticCalculator | ( | ) |
ON_ArithmeticCalculator::ON_ArithmeticCalculator | ( | const ON_ArithmeticCalculator & | ) |
ON_ArithmeticCalculator::ON_ArithmeticCalculator | ( | ON_ArithmeticCalculator && | ) |
bool ON_ArithmeticCalculator::Add | ( | ) |
Description: Enter an explicit addition operator whose operands are the previous value and the next value, where a value is a number, simple number, or parenthetic expression.
void ON_ArithmeticCalculator::ClearAll | ( | ) |
Description: Clear all status, values and expressions.
bool ON_ArithmeticCalculator::Divide | ( | ) |
Description: Enter an explicit division operator whose operands are the previous value and the next value, where a value is a number, simple number, or parenthetic expression. If the second value is zero, the calculator state is set to error.
ERROR_CONDITION ON_ArithmeticCalculator::ErrorCondition | ( | ) | const |
bool ON_ArithmeticCalculator::Evaluate | ( | double * | value | ) |
Description: Calculate the current value.
bool ON_ArithmeticCalculator::ImpliedMultiplication | ( | ) | const |
Configuration Settings
bool ON_ArithmeticCalculator::LeftParenthesis | ( | ) |
Description: Begin a parenthetic expression.
bool ON_ArithmeticCalculator::Multiply | ( | ) |
Description: Enter an explicit multiplication operator whose operands are the previous value and the next value, where a value is a number, simple number, or parenthetic expression.
bool ON_ArithmeticCalculator::Number | ( | double | x | ) |
Calculator keys Description: Enter a number that can be used as an implied multiplication operand when implied multiplication is enabled and appropriate.
ON_ArithmeticCalculator& ON_ArithmeticCalculator::operator= | ( | const ON_ArithmeticCalculator & | ) |
ON_ArithmeticCalculator& ON_ArithmeticCalculator::operator= | ( | ON_ArithmeticCalculator && | ) |
unsigned int ON_ArithmeticCalculator::ParenthesesDepth | ( | ) | const |
Returns: The current number of parenthetic expressions that are not completed.
bool ON_ArithmeticCalculator::PendingImpliedMultiplication | ( | ) | const |
Returns: True if an implied multiplication will be applied to the next number or parenthetical expression.
bool ON_ArithmeticCalculator::PendingUnaryMinus | ( | ) | const |
Returns: True if a unary minus is pending and will be applied to the next number or parenthetical expression.
bool ON_ArithmeticCalculator::PendingUnaryOperation | ( | ) | const |
Returns: True if a unary plus or unary minus is pending
bool ON_ArithmeticCalculator::PendingUnaryPlus | ( | ) | const |
Returns: True if a unary plus is pending and will be applied to the next number or parenthetical expression.
bool ON_ArithmeticCalculator::RightParenthesis | ( | ) |
Description: End a parenthetic expression.
void ON_ArithmeticCalculator::SetImpliedMultiplication | ( | bool | bEnable | ) |
bool ON_ArithmeticCalculator::SimpleNumber | ( | double | x | ) |
Description: Enter a number that will never use implied multiplication.
bool ON_ArithmeticCalculator::Subtract | ( | ) |
Description: Enter an explicit subtraction operator whose operands are the previous value and the next value, where a value is a number, simple number, or parenthetic expression.
bool ON_ArithmeticCalculator::UnaryMinus | ( | ) |
Description: Enter an unary minus operator whose operand is the next number, simple number, or parenthetic expression.
bool ON_ArithmeticCalculator::UnaryPlus | ( | ) |
Description: Enter an unary plus operator whose operand is the next number, simple number, or parenthetic expression.