|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.problets.domain.model.DomainModel
org.problets.domain.model.control.ControlModel
public abstract class ControlModel
A Wrapper class for different control statements i.e. if/else for-loops, switch-case
Field Summary | |
---|---|
static int |
ABORT_EXECUTION
|
static int |
BREAK_EXECUTION
|
static int |
CONTINUE_EXECUTION
|
static int |
END_EXECUTION
|
static int |
INFINITE_EXECUTION
|
static int |
RETURN_EXECUTION
|
static int |
RUN_TIME_ERROR_EXECUTION
|
static int |
SKIP_EXECUTION
|
Constructor Summary | |
---|---|
ControlModel(java.lang.String inTemplate)
|
Method Summary | |
---|---|
ExecutionStatus |
explainProcess(RunEnv runEnv,
Behavior behavior,
boolean stepFlag)
public void explainProcess(Vector explanation, Vector errors, int lineNumber); Generate the explanation for the control object |
void |
getCode(java.util.Vector codeText,
OutputStream output)
public void getCode(Vector codeText, String template, int lineNumber); Generate the code for the control object |
int |
getCodeLength()
public int getTotalBlockSize(); Return the total number of lines for the control object |
java.lang.String |
getName()
Get the name of this control construct - for generation of error menus |
abstract java.lang.String[] |
getPossibleErrors()
Method to return errors for variables May want to post-process based on Student Model |
int |
getStartLineNumber()
Method to return the starting line number of this scope in the code |
static void |
main(java.lang.String[] args)
|
Methods inherited from class org.problets.domain.model.DomainModel |
---|
clone, getId, getIdName, grade |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CONTINUE_EXECUTION
public static final int END_EXECUTION
public static final int RETURN_EXECUTION
public static final int BREAK_EXECUTION
public static final int SKIP_EXECUTION
public static final int ABORT_EXECUTION
public static final int INFINITE_EXECUTION
public static final int RUN_TIME_ERROR_EXECUTION
Constructor Detail |
---|
public ControlModel(java.lang.String inTemplate)
Method Detail |
---|
public int getCodeLength()
-
- none
public int getStartLineNumber()
public java.lang.String getName()
public abstract java.lang.String[] getPossibleErrors()
public void getCode(java.util.Vector codeText, OutputStream output)
codeText
- - a Vector that holds the codepublic ExecutionStatus explainProcess(RunEnv runEnv, Behavior behavior, boolean stepFlag)
explanation
- - a Vector for the explanation of the codeerrors
- - a Vector to hold any errorslineNumber
- - line number of code we are explaining
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |