pascalinterpreter
Class Operation

java.lang.Object
  extended bypascalinterpreter.Command
      extended bypascalinterpreter.Operation
Direct Known Subclasses:
BinaryOperation, UnaryOperation

public abstract class Operation
extends Command


Field Summary
protected  Variable operand
           
 
Constructor Summary
Operation()
           
 
Method Summary
protected  void checkType(Variable operand, Operator operator)
          Metoda sprawdza, czy podany operator jest dopuszczalny dla zmiennej podanego typu.
protected  Variable getOperand()
           
 
Methods inherited from class pascalinterpreter.Command
execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

operand

protected Variable operand
Constructor Detail

Operation

public Operation()
Method Detail

getOperand

protected Variable getOperand()
Returns:

checkType

protected void checkType(Variable operand,
                         Operator operator)
                  throws AnalyseException
Metoda sprawdza, czy podany operator jest dopuszczalny dla zmiennej podanego typu.

Parameters:
operand - - sprawdzana zmienna.
operator - - sprawdzany operator.
Throws:
AnalyseException - - Wyjątek generowany, jeżeli operator nie obsługuje tego typu zmiennej.