C# 클래스 PclUnit.Constraints.Pieces.ConstraintBuilder

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 reognized. a ConstraintStack holds input constraints as well as the results of each operator applied.
파일 보기 프로젝트 열기: jbtule/PclUnit 1 사용 예제들

공개 메소드들

메소드 설명
Append ( Constraint constraint ) : void

Appends the specified constraint to the expresson by pushing it on the constraint stack.

Append ( ConstraintOperator op ) : void

Appends the specified operator to the expression by first reducing the operator stack and then pushing the new operator on the stack.

ConstraintBuilder ( ) : System

Initializes a new instance of the T:ConstraintBuilder class.

Resolve ( ) : Constraint

Resolves this instance, returning a Constraint. If the builder is not currently in a resolvable state, an exception is thrown.

비공개 메소드들

메소드 설명
ReduceOperatorStack ( int targetPrecedence ) : void

Reduces the operator stack until the topmost item precedence is greater than or equal to the target precedence.

SetTopOperatorRightContext ( object rightContext ) : void

Sets the top operator right context.

메소드 상세

Append() 공개 메소드

Appends the specified constraint to the expresson by pushing it on the constraint stack.
public Append ( Constraint constraint ) : void
constraint Constraint The constraint to push.
리턴 void

Append() 공개 메소드

Appends the specified operator to the expression by first reducing the operator stack and then pushing the new operator on the stack.
public Append ( ConstraintOperator op ) : void
op ConstraintOperator The operator to push.
리턴 void

ConstraintBuilder() 공개 메소드

Initializes a new instance of the T:ConstraintBuilder class.
public ConstraintBuilder ( ) : System
리턴 System

Resolve() 공개 메소드

Resolves this instance, returning a Constraint. If the builder is not currently in a resolvable state, an exception is thrown.
public Resolve ( ) : Constraint
리턴 Constraint