class IDL::Type::Fixed

Attributes

digits[R]
scale[R]

Public Class Methods

new(digits = nil, scale = nil) click to toggle source
# File lib/ridl/type.rb, line 263
def initialize(digits = nil, scale = nil)
  raise "significant digits for Fixed should be in the range 0-31" unless digits.nil? || (0..31) === digits.to_i

  @digits = digits.nil? ? digits : digits.to_i
  @scale = scale.nil? ? scale : scale.to_i
end

Public Instance Methods

instantiate(instantiation_context) click to toggle source
# File lib/ridl/type.rb, line 283
def instantiate(instantiation_context)
  self.is_template? ? (Type::Fixed.new(@size.instantiate(instantiation_context).value)) : self
end
is_anonymous?() click to toggle source
# File lib/ridl/type.rb, line 275
def is_anonymous?
  false
end
is_template?() click to toggle source
# File lib/ridl/type.rb, line 279
def is_template?
  (@size && @size.is_a?(IDL::Expression) && @size.is_template?)
end
narrow(obj) click to toggle source
# File lib/ridl/type.rb, line 270
def narrow(obj)
  # typeerror(obj)
  obj
end