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, TinyShort, ULong, ULongLong, UShort, UTinyShort

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.



717
718
719
720
# File 'lib/ridl/type.rb', line 717

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

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



715
716
717
# File 'lib/ridl/type.rb', line 715

def type
  @type
end

Instance Method Details

#instantiate(instantiation_context) ⇒ Object



746
747
748
# File 'lib/ridl/type.rb', line 746

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

#is_anonymous?Boolean

Returns:



738
739
740
# File 'lib/ridl/type.rb', line 738

def is_anonymous?
  t.resolved_type.is_anonymous?
end

#is_complete?Boolean

Returns:



730
731
732
# File 'lib/ridl/type.rb', line 730

def is_complete?
  @type.resolved_type.is_complete?
end

#is_local?(recurstk = []) ⇒ Boolean

Returns:



734
735
736
# File 'lib/ridl/type.rb', line 734

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

#is_node?(node_class) ⇒ Boolean

Returns:



750
751
752
# File 'lib/ridl/type.rb', line 750

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

#is_template?Boolean

Returns:



742
743
744
# File 'lib/ridl/type.rb', line 742

def is_template?
  @type.is_template?
end

#matches?(idltype) ⇒ Boolean

Returns:



758
759
760
# File 'lib/ridl/type.rb', line 758

def matches?(idltype)
  super && self.type.resolved_type.matches?(idltype.type.resolved_type)
end

#narrow(obj) ⇒ Object



726
727
728
# File 'lib/ridl/type.rb', line 726

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

#resolved_nodeObject



754
755
756
# File 'lib/ridl/type.rb', line 754

def resolved_node
  @type.resolved_node
end

#typenameObject



722
723
724
# File 'lib/ridl/type.rb', line 722

def typename
  @typename
end