|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectpascalinterpreter.Operator
pascalinterpreter.BinaryOperator
pascalinterpreter.operators.Arithmetic
| Field Summary |
| Fields inherited from class pascalinterpreter.Operator |
OP_REG_VAR_NAME |
| Constructor Summary | |
Arithmetic()
|
|
| Method Summary | |
protected abstract double |
compute(double opL,
double opR)
Metoda oblicza wartosc wyrazenia. |
void |
execute(Variable operandL,
Variable operandR)
|
private void |
setRegistry(DataType type,
double value)
Metoda konwertuje wartość do wybranego typu i zapisuje do rejestru programu. |
| Methods inherited from class pascalinterpreter.BinaryOperator |
execInitialize, isPossible, makeConversion, parseDouble |
| Methods inherited from class pascalinterpreter.Operator |
getRegistry, setRegistry, setRegistry, setRegistry, setRegistry |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Arithmetic()
| Method Detail |
public void execute(Variable operandL,
Variable operandR)
throws InternalException,
RuntimeException
execute in class BinaryOperatorInternalException
RuntimeException
private void setRegistry(DataType type,
double value)
throws InternalException
type - - typ, jakiego ma być zmiennavalue - - wartość zmiennej
InternalException - - Wyjątek generowany, jeżeli operacja nie może zostać wykonana.
protected abstract double compute(double opL,
double opR)
opL - - lewy operandopR - - prawy operand
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||