org.problets.domain.model.control.selection
Class IfModel
java.lang.Object
org.problets.domain.model.DomainModel
org.problets.domain.model.control.ControlModel
org.problets.domain.model.control.ConditionControl
org.problets.domain.model.control.selection.Selection
org.problets.domain.model.control.selection.IfModel
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- IfElseModel
public class IfModel
- extends Selection
Class for the implementation of If Statements
- Author:
- Greg Tomalesky, Amruth Kumar
Fields inherited from class org.problets.domain.model.DomainModel |
BOOLEAN, BREAKPOINT, CHARACTER, DOUBLE_PRECISION_REAL, ERROR_TYPE, EVAL_STATUS, expACTION, expASSIGNMENT, expAUTO_DEALLOCATION, expCALL, expCONDITION, expDECLARATION, expDEREFERENCING, expDYNAMIC_ALLOCATION, expDYNAMIC_ALLOCATION_INITIALIZATION, expDYNAMIC_DEALLOCATION, expELSE_CLAUSE, expERROR, expEXECUTION, expIF_CLAUSE, expINITIALIZATION, expINPUT, expPARAMETER_PASSING, expPRINT, expQUESTIONABLE, expREFERENCING, expRETURN, expRUNTIME_ERROR, expSEMANTIC_ERROR, expSYNTAX_ERROR, expUPDATE, MAX_OBJECT_IDENTITY, MIN_OBJECT_IDENTITY, QUADRUPLE_PRECISION_REAL, RUNTIME_ERROR, SEMANTIC_ERROR, SIGNED_INTEGER, SIGNED_LONG, SIGNED_SHORT, SINGLE_PRECISION_REAL, SYNTAX_ERROR, UNDEFINED_TYPE, UNSIGNED_INTEGER, UNSIGNED_LONG, UNSIGNED_SHORT, WARNING |
Method Summary |
ExecutionStatus |
explainProcess(RunEnv runEnv,
Behavior behavior,
boolean stepFlag)
public void explainProcess(Vector explanation, OutputStream output, Vector errors) |
void |
getCode(java.util.Vector codeText,
OutputStream output)
public void getCode(Vector codeText, OutputStream output)
Generate the If Statement Header |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IDENTITY
public static final int IDENTITY
- See Also:
- Constant Field Values
IfModel
public IfModel(ActivationRecord parent,
HeapModel heap,
java.lang.String in_template)
- Constructor
- Parameters:
parent
- - the nested scope's parent activation recordheap
- - the heap to be usedin_template
- - the template to be parsedin_Type
- - the type of variable to be created
getCode
public void getCode(java.util.Vector codeText,
OutputStream output)
- public void getCode(Vector codeText, OutputStream output)
Generate the If Statement Header
- Overrides:
getCode
in class ControlModel
- Parameters:
codeText
- - a Vector that holds the code
explainProcess
public ExecutionStatus explainProcess(RunEnv runEnv,
Behavior behavior,
boolean stepFlag)
- public void explainProcess(Vector explanation, OutputStream output, Vector errors)
- Overrides:
explainProcess
in class ControlModel
- Parameters:
explanation
- - a Vector for the explanation of the codeerrors
- - a Vector to hold any errors
- Returns:
- - none
main
public static void main(java.lang.String[] args)