Class: IDL::Expression::Operation::Float2

Inherits:
Integer2 show all
Defined in:
lib/ridl/expression.rb

Direct Known Subclasses

Add, Div, Minus, Mult

Constant Summary collapse

Applicable =
[
  IDL::Type::LongDouble, IDL::Type::Double, IDL::Type::Float,
  IDL::Type::Fixed
] + Integer2::Applicable

Constants inherited from Integer2

Integer2::NUMBER_OF_OPERANDS

Constants inherited from IDL::Expression::Operation

NUMBER_OF_OPERANDS

Instance Attribute Summary

Attributes inherited from IDL::Expression::Operation

#operands

Attributes inherited from IDL::Expression

#idltype, #value

Class Method Summary collapse

Methods inherited from Integer2

#set_type, suite_sign

Methods inherited from IDL::Expression::Operation

#initialize, #instantiate, #is_template?, #set_type, suite_type

Methods inherited from IDL::Expression

#instantiate, #is_template?, #typename

Constructor Details

This class inherits a constructor from IDL::Expression::Operation

Class Method Details

.checktype(t1, t2) ⇒ Object



189
190
191
192
193
194
195
196
197
198
# File 'lib/ridl/expression.rb', line 189

def Float2.checktype(t1, t2)
  superclass.checktype(*types)

  # it's expected that Double, LongDouble is a Float.
  s1,s2 = IDL::Type::Float, IDL::Type::Fixed
  if (t1 === s1 && t2 === s2) or (t1 === s2 && t2 === s1)
    raise RuntimeError,
      "#{self.name} about #{t1.typename} and #{t2.typename} is illegal."
  end
end