public function getData() { switch ($this->operator) { case TES4BinaryExpressionOperator::OPERATOR_ADD(): return $this->leftValue->getData() + $this->rightValue->getData(); case TES4BinaryExpressionOperator::OPERATOR_DIVIDE(): return $this->leftValue->getData() / $this->rightValue->getData(); case TES4BinaryExpressionOperator::OPERATOR_MULTIPLY(): return $this->leftValue->getData() * $this->rightValue->getData(); case TES4BinaryExpressionOperator::OPERATOR_SUBSTRACT(): return $this->leftValue->getData() - $this->rightValue->getData(); } throw new ConversionException("Unknown TES4BinaryExpressionOperator"); }
public function getData() { switch ($this->operator) { case TES4ArithmeticExpressionOperator::OPERATOR_EQUAL(): return $this->leftValue->getData() == $this->rightValue->getData(); case TES4ArithmeticExpressionOperator::OPERATOR_GREATER(): return $this->leftValue->getData() > $this->rightValue->getData(); case TES4ArithmeticExpressionOperator::OPERATOR_GREATER_OR_EQUAL(): return $this->leftValue->getData() >= $this->rightValue->getData(); case TES4ArithmeticExpressionOperator::OPERATOR_LESS(): return $this->leftValue->getData() < $this->rightValue->getData(); case TES4ArithmeticExpressionOperator::OPERATOR_LESS_OR_EQUAL(): return $this->leftValue->getData() <= $this->rightValue->getData(); case TES4ArithmeticExpressionOperator::OPERATOR_NOT_EQUAL(): return $this->leftValue->getData() != $this->rightValue->getData(); } throw new ConversionException("Unknown TES4ArithmeticExpressionOperator"); }
public function getData() { return $this->value->getData() === true; }