edu.mit.sketch.ddlcompiler
Class ConstraintNode

java.lang.Object
  |
  +--edu.mit.sketch.ddlcompiler.ConstraintNode
All Implemented Interfaces:
ASTNode
Direct Known Subclasses:
AboveConstraintNode, AngleConstraintNode, AttachedConstraintNode, BelowConstraintNode, LeftConstraintNode, LowerLeftConstraintNode, LowerRightConstraintNode, MeetConstraintNode, ParallelConstraintNode, PerpendicularConstraintNode, RightConstraintNode, TouchConstraintNode, UpperLeftConstraintNode, UpperRightConstraintNode

public abstract class ConstraintNode
extends Object
implements ASTNode

Parsing can be thought of as generating and AST. This class represents a constraint node in such an AST. All legal constraint nodes should extend implement this interface.


Constructor Summary
ConstraintNode()
           
 
Method Summary
abstract  String[] getConstraintIdentifiers()
          Returns a string array consisting of the constraint indentifiers
abstract  String toInstanceMethodCall()
          The method call string which uses arg*_instance instead of arg*
abstract  String toMethodCall()
          The method call string.
 String toString()
          The string representation.
abstract  boolean usesMember(String input_id)
          Return true if a member variable of this constraint has the same name as the input string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstraintNode

public ConstraintNode()
Method Detail

toMethodCall

public abstract String toMethodCall()
The method call string.

toInstanceMethodCall

public abstract String toInstanceMethodCall()
The method call string which uses arg*_instance instead of arg*

usesMember

public abstract boolean usesMember(String input_id)
Return true if a member variable of this constraint has the same name as the input string.

getConstraintIdentifiers

public abstract String[] getConstraintIdentifiers()
Returns a string array consisting of the constraint indentifiers

toString

public String toString()
The string representation.
Specified by:
toString in interface ASTNode
Overrides:
toString in class Object