Class: IDL::Expression::Operation::Integer2
- Inherits:
-
IDL::Expression::Operation
- Object
- IDL::Expression
- IDL::Expression::Operation
- IDL::Expression::Operation::Integer2
- Defined in:
- lib/ridl/expression.rb
Overview
of class Unary
Constant Summary collapse
- NUMBER_OF_OPERANDS =
2- Applicable =
[ IDL::Type::LongLong, IDL::Type::ULongLong, IDL::Type::Long, IDL::Type::ULong, IDL::Type::Short, IDL::Type::UShort, IDL::Type::TinyShort, IDL::Type::UTinyShort, IDL::Type::Octet ]
Instance Attribute Summary
Attributes inherited from IDL::Expression::Operation
Attributes inherited from IDL::Expression
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from IDL::Expression::Operation
#initialize, #instantiate, #is_template?, 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
.suite_sign(_t, _v) ⇒ Object
155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/ridl/expression.rb', line 155 def Integer2.suite_sign(_t, _v) [[IDL::Type::LongLong, IDL::Type::ULongLong], [IDL::Type::Long, IDL::Type::ULong], [IDL::Type::Short, IDL::Type::UShort], [IDL::Type::TinyShort, IDL::Type::UTinyShort] ].each do |t| next unless t.include? _t return (if _v.negative? then t[0] else t[1] end) end end |
Instance Method Details
#set_type ⇒ Object
167 168 169 170 171 |
# File 'lib/ridl/expression.rb', line 167 def set_type if Integer2::Applicable.include? @idltype @idltype = self.class.suite_sign(@idltype, @value) end end |