Class: IDL::Type::Const

Inherits:
IDL::Type show all
Defined in:
lib/ridl/type.rb

Constant Summary

Constants inherited from IDL::Type

Long, LongLong, Octet, Short, ULong, ULongLong, UShort

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from IDL::Type

#resolved_type, #typeerror

Constructor Details

#initialize(t) ⇒ Const

Returns a new instance of Const.



473
474
475
476
# File 'lib/ridl/type.rb', line 473

def initialize(t)
  @type = t
  @typename = "const #{t.typename}"
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



472
473
474
# File 'lib/ridl/type.rb', line 472

def type
  @type
end

Instance Method Details

#instantiate(_context) ⇒ Object



495
496
497
# File 'lib/ridl/type.rb', line 495

def instantiate(_context)
  self.is_template? ? Type::Const.new(@type.instantiate(_context)) : self
end

#is_anonymous?Boolean

Returns:



489
490
491
# File 'lib/ridl/type.rb', line 489

def is_anonymous?
  t.resolved_type.is_anonymous?
end

#is_complete?Boolean

Returns:



483
484
485
# File 'lib/ridl/type.rb', line 483

def is_complete?
  @type.resolved_type.is_complete?
end

#is_local?(recurstk = []) ⇒ Boolean

Returns:



486
487
488
# File 'lib/ridl/type.rb', line 486

def is_local?(recurstk = [])
  @type.resolved_type.is_local?(recurstk)
end

#is_node?(node_class) ⇒ Boolean

Returns:



498
499
500
# File 'lib/ridl/type.rb', line 498

def is_node?(node_class)
  @type.is_node?(node_class)
end

#is_template?Boolean

Returns:



492
493
494
# File 'lib/ridl/type.rb', line 492

def is_template?
  @type.is_template?
end

#narrow(obj) ⇒ Object



480
481
482
# File 'lib/ridl/type.rb', line 480

def narrow(obj)
  @type.narrow(obj)
end

#resolved_nodeObject



501
502
503
# File 'lib/ridl/type.rb', line 501

def resolved_node
  @type.resolved_node
end

#typenameObject



477
478
479
# File 'lib/ridl/type.rb', line 477

def typename
  @typename
end