ExpressionBuilder - YiZhang-Paul/Mock_Up_Calculator GitHub Wiki
Namespace: ExpressionsClassLibrary
Implements: IExpressionBuilder
Description: Builds up math expressions with given input stream.
Constructors | Usage |
---|---|
ExpressionBuilder(IParenthesize) | Initializes an instance of ExpressionBuilder class with injected services |
Properties | Usage |
---|---|
Expression<string> | current expression stored in builder |
Methods | Usage |
---|---|
Clear() | erase expression stored in builder |
Undo() | revoke most recent input fed into builder |
CanAddValue() | check if builder can take a numeric value as the next input |
AddValue(decimal) | feed a numeric value to builder |
AddUnary(string) | feed a unary operator to builder |
AddBinary(string) | feed a binary operator to builder |
AddParentheses(string) | feed parentheses to builder |
Build() | build a fully parenthesized expression |