edu.toronto.cs.yasm.pprogram
Class IfPStmt

java.lang.Object
  extended by edu.toronto.cs.yasm.pprogram.PStmt
      extended by edu.toronto.cs.yasm.pprogram.IfPStmt
Direct Known Subclasses:
WhilePStmt

public class IfPStmt
extends PStmt

IfPStmt.java Created: Fri Jun 25 14:25:25 2004

Version:
1.0
Author:
Kelvin Ku

Constructor Summary
IfPStmt(PFunctionDef parent, Block sourceBlock, PCond _cond, PStmt _thenStmt, PStmt _elseStmt)
           
IfPStmt(PFunctionDef parent, Expr sourceExpr, PCond _cond, PStmt _thenStmt, PStmt _elseStmt)
           
 
Method Summary
 PCond getCond()
           
 GotoPStmt getElseGoto()
           
 PStmt getElseStmt()
           
 GotoPStmt getExitGoto()
           
 int getLineNum()
          Returns line number of this statement, or -1 if the line number is unknown.
 GotoPStmt getThenGoto()
           
 PStmt getThenStmt()
           
 void printMe(java.io.PrintWriter out)
           
 void setCond(PCond _cond)
           
 void setElseStmt(PStmt _elseStmt)
           
 void setThenStmt(PStmt _thenStmt)
           
 
Methods inherited from class edu.toronto.cs.yasm.pprogram.PStmt
exprFac, getDest, getId, getLabel, getLast, getNext, getParent, getPProgram, getRefinerInfo, getSourceBlock, getSourceExpr, print, print, printMe, setDest, setId, setLabel, setNext, setParent, setRefinerInfo, setSourceBlock, setTail, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IfPStmt

public IfPStmt(PFunctionDef parent,
               Block sourceBlock,
               PCond _cond,
               PStmt _thenStmt,
               PStmt _elseStmt)

IfPStmt

public IfPStmt(PFunctionDef parent,
               Expr sourceExpr,
               PCond _cond,
               PStmt _thenStmt,
               PStmt _elseStmt)
Method Detail

getThenStmt

public PStmt getThenStmt()

setThenStmt

public void setThenStmt(PStmt _thenStmt)

getElseStmt

public PStmt getElseStmt()

setElseStmt

public void setElseStmt(PStmt _elseStmt)

getCond

public PCond getCond()

setCond

public void setCond(PCond _cond)

getThenGoto

public GotoPStmt getThenGoto()

getElseGoto

public GotoPStmt getElseGoto()

getExitGoto

public GotoPStmt getExitGoto()

printMe

public void printMe(java.io.PrintWriter out)
Overrides:
printMe in class PStmt

getLineNum

public int getLineNum()
Description copied from class: PStmt
Returns line number of this statement, or -1 if the line number is unknown.

Overrides:
getLineNum in class PStmt
Returns:
an int value