C# Class PclUnit.Constraints.Pieces.ConstraintBuilder.ConstraintStack

ConstraintStack is a type-safe stack for holding Constraints
Show file Open project: jbtule/PclUnit

Public Methods

Method Description
ConstraintStack ( ConstraintBuilder builder ) : System

Initializes a new instance of the T:ConstraintStack class.

Pop ( ) : Constraint

Pops this topmost constrait from the stack. As a side effect, the constraint's builder field is set to null.

Push ( Constraint constraint ) : void

Pushes the specified constraint. As a side effect, the constraint's builder field is set to the ConstraintBuilder owning this stack.

Method Details

ConstraintStack() public method

Initializes a new instance of the T:ConstraintStack class.
public ConstraintStack ( ConstraintBuilder builder ) : System
builder ConstraintBuilder The builder.
return System

Pop() public method

Pops this topmost constrait from the stack. As a side effect, the constraint's builder field is set to null.
public Pop ( ) : Constraint
return Constraint

Push() public method

Pushes the specified constraint. As a side effect, the constraint's builder field is set to the ConstraintBuilder owning this stack.
public Push ( Constraint constraint ) : void
constraint Constraint The constraint.
return void