IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
ConstraintBuilder maintains the stacks that are used in processing a ConstraintExpression. An OperatorStack is used to hold operators that are waiting for their operands to be reorganized. a ConstraintStack holds input constraints as well as the results of each operator applied. More...
Classes | |
class | ConstraintStack |
ConstraintStack is a type-safe stack for holding Constraints More... | |
class | OperatorStack |
OperatorStack is a type-safe stack for holding ConstraintOperators More... | |
Public Member Functions | |
ConstraintBuilder () | |
Initializes a new instance of the ConstraintBuilder class. More... | |
void | Append (ConstraintOperator op) |
Appends the specified operator to the expression by first reducing the operator stack and then pushing the new operator on the stack. More... | |
void | Append (Constraint constraint) |
Appends the specified constraint to the expression by pushing it on the constraint stack. More... | |
IConstraint | Resolve () |
Resolves this instance, returning a Constraint. If the Builder is not currently in a resolvable state, an exception is thrown. More... | |
Properties | |
bool | IsResolvable [get] |
Gets a value indicating whether this instance is resolvable. More... | |
Private Member Functions | |
void | SetTopOperatorRightContext (object rightContext) |
Sets the top operator right context. More... | |
void | ReduceOperatorStack (int targetPrecedence) |
Reduces the operator stack until the topmost item precedence is greater than or equal to the target precedence. More... | |
Private Attributes | |
readonly OperatorStack | ops |
readonly ConstraintStack | constraints |
object | lastPushed |
ConstraintBuilder maintains the stacks that are used in processing a ConstraintExpression. An OperatorStack is used to hold operators that are waiting for their operands to be reorganized. a ConstraintStack holds input constraints as well as the results of each operator applied.
|
inline |
Initializes a new instance of the ConstraintBuilder class.
|
inline |
Appends the specified operator to the expression by first reducing the operator stack and then pushing the new operator on the stack.
op | The operator to push. |
References NUnit.Framework.Constraints.ConstraintOperator.LeftContext, and NUnit.Framework.Constraints.ConstraintOperator.LeftPrecedence.
Referenced by NUnit.Framework.Constraints.ConstraintExpression.Append().
|
inline |
Appends the specified constraint to the expression by pushing it on the constraint stack.
constraint | The constraint to push. |
References NUnit.Framework.Constraints.Constraint.Builder.
|
inlineprivate |
Sets the top operator right context.
rightContext | The right context. |
References NUnit.Framework.Constraints.ConstraintOperator.LeftPrecedence.
|
inlineprivate |
Reduces the operator stack until the topmost item precedence is greater than or equal to the target precedence.
targetPrecedence | The target precedence. |
|
inline |
Resolves this instance, returning a Constraint. If the Builder is not currently in a resolvable state, an exception is thrown.
Implements NUnit.Framework.Constraints.IResolveConstraint.
References NUnit.Framework.Constraints.ConstraintOperator.Reduce().
Referenced by NUnit.Framework.Constraints.ConstraintExpression.ToString().
|
private |
|
private |
|
private |
|
getprivate |
Gets a value indicating whether this instance is resolvable.
true
if this instance is resolvable; otherwise, false
.